POST
/
credit
/
balance
curl --request POST \
  --url https://api.openformat.tech/v1/credit/balance \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '{
  "chain": "arbitrum-sepolia",
  "token_id": "0xd1f09c70f6f2838a3ab6209c1465af68594667ec",
  "user_id": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266"
}'
{
  "success": true,
  "balance": "12345123000000000000000",
  "balance_formatted": "12345.123",
  "decimals": 18
}
{
  "success": true,
  "balance": "12345123000000000000000",
  "balance_formatted": "12345.123",
  "decimals": 18
}

Authorizations

X-API-KEY
string
header
required

Body

application/json
chain
string
required

Blockchain network to use

Required string length: 1 - 255
Example:

"arbitrum-sepolia"

token_id
string
required

Ethereum address of the credit token

Example:

"0xd1f09c70f6f2838a3ab6209c1465af68594667ec"

user_id
string
required

Ethereum address of the user account

Example:

"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266"

Response

200
application/json
Credit Balance
success
boolean
required

Successful response

Example:

true

balance
string
required

Credit balance of the account

Example:

"12345"

balance_formatted
string
required

Credit balance formatted to the token decimals

Example:

"12345.123"

decimals
integer
required

Credit decimals

Example:

18