Get Balance

Endpoint to retrieve a user's wallet ballance

Get Balance

GET https://api.withmystic.xyz/marketplace-api/get-balance

Receives a wallet address and chain Id and returns the respective wallet balance.

Query Parameters

Name
Type
Description

address*

String

Wallet address whose balance we want to get

chainId*

Number

Id of the blockchain whose wallet balance we want to get

Headers

Name
Type
Description

Bearer token*

String

Your API key

0.126623085507287526

Example

Let's try retrieving the balance of the user who created and validated the swap in the Create Swap / Offer example. In this case, what we'd query the API with would be:

https://api.withmystic.xyz/marketplace-api/get-balance?address=string&chainId=number

And here we can find the response we would get from making this call:

0.126623085507287526

Here is an example API call, for you to copy and modify:

https://api.withmystic.xyz/marketplace-api/get-balance?address=string&chainId=number

Happy coding!

Last updated