Check the Native Balance of a Wallet
The native coin on Playfix wallet is $MATIC. To check the balance of a native coin stored in a wallet, send a GET request to the /wallet/<wallet_name>/balance
endpoint.
Check balance of native coin in a wallet
GET
https://api.playfix.io/wallet/<wallet_name>/balance
Path Parameters
Name
Type
Description
wallet_name*
String
TName of the wallet containing the native coin. This should be the value of name
from a previously created wallet. It begins with wallets/
followed by a ULID.
Headers
Name
Type
Description
Authorization*
String
Bearer <your_bearer_token>
{
"balance": "0.2"
}
Example Curl API Call
curl --request GET \
--url 'https://api.playfix.io/wallet/<wallet_name>/balance' \
--header 'Authorization: Bearer <your_bearer_token>'
Example Python API Call
import requests
import json
wallet = "<wallet_name>"
r = requests.get(
"https://api.playfix.io/wallet/" + wallet + "/balance",
headers={
"Authorization": "Bearer <your_bearer_token"
}
)
print(r.text)
Response
{
"balance": "0.2"
}
The response is the balance of the native coin in the wallet.
Last updated