Check Allowance

This SunPump endpoint checks if, and how many, Tokens are currently Approved for trading (selling).

Endpoint

  • URL: /sunpump/allowance

  • Method: GET

  • Content-Type: application/json

  • API Key Header: api-key: your-api-key

Parameters

ParameterTypeRequiredDescription

tokenAddress

string

Yes

Token Contract Address

userAddress

string

Yes

Public Tron Address of sender

Example Allowance Requests

curl -X POST https://api.dangeracorn.com/sunpump/allowance\
-H "Content-Type: application/json" \
-H "api-key: your-api-key" \
-d '{
  "tokenAddress": "token-contract-address",
  "userAddress": "sender-public-tron-address"
}'

Example Response JSON

{
  "amount": "999999999000000000000000000000",
  "status": "unsigned",
  "code": "200"
}

Error Responses

Invalid Parameters

{
  "error": "Invalid parameters",
  "message": "You must only provide tokenAddress and userAddress",
  "code": "400"
}

Notes

  • Rate Limiting: This endpoint is rate-limited according to your plan's API key limits. Ensure that you handle these limits in your application.

Last updated