Balance
The Balance API allows you to manage your SOL balance on the IPTO platform. This guide covers checking balance, making deposits, and processing withdrawals.
Get User Balance
Retrieve your current balance and transaction history.
curl -X GET https://api.ipto.ai/balance \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response
{
"balance": 10.5,
"total_earned": 25.0,
"total_spent": 14.5
}
Deposit Balance
Deposit SOL into your account balance.
curl -X POST https://api.ipto.ai/balance/deposit \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"amount": 1.0
}'
Request Parameters
Parameter | Type | Required | Description |
---|---|---|---|
amount | Number | Yes | Amount of SOL to deposit |
Response
{
"balance": 11.5,
"total_earned": 25.0,
"total_spent": 14.5
}
Withdraw Balance
Withdraw SOL from your account balance.
curl -X POST https://api.ipto.ai/balance/withdraw \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"amount": 0.5
}'
Request Parameters
Parameter | Type | Required | Description |
---|---|---|---|
amount | Number | Yes | Amount of SOL to withdraw |
Response
{
"balance": 11.0,
"total_earned": 25.0,
"total_spent": 14.5
}
Transaction Types
The platform supports the following transaction types:
Type | Description |
---|---|
deposit | Adding SOL to your balance |
withdrawal | Removing SOL from your balance |
purchase | Spending SOL on asset purchases |
earnings | Receiving SOL from asset sales |
Minimum Amounts
- Minimum deposit: 0.1 SOL
- Minimum withdrawal: 0.1 SOL
- Minimum balance for withdrawal: 0.2 SOL
Transaction Fees
- Deposit: No fee
- Withdrawal: 0.01 SOL network fee
- Purchase: No additional fee
- Earnings: 2.5% platform fee
Error Responses
Insufficient Balance
{
"detail": "Insufficient balance for withdrawal"
}
Invalid Amount
{
"detail": "Amount must be greater than 0.1 SOL"
}
Network Error
{
"detail": "Failed to process blockchain transaction"
}
Best Practices
- Keep sufficient balance for purchases
- Monitor transaction history
- Consider network fees for withdrawals
- Track earnings from asset sales
- Maintain minimum balance requirements
Security Considerations
- Always verify transaction amounts
- Keep your access token secure
- Monitor for unauthorized transactions
- Use secure networks for transactions
- Enable 2FA if available