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

ParameterTypeRequiredDescription
amountNumberYesAmount 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

ParameterTypeRequiredDescription
amountNumberYesAmount 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:

TypeDescription
depositAdding SOL to your balance
withdrawalRemoving SOL from your balance
purchaseSpending SOL on asset purchases
earningsReceiving 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

  1. Keep sufficient balance for purchases
  2. Monitor transaction history
  3. Consider network fees for withdrawals
  4. Track earnings from asset sales
  5. Maintain minimum balance requirements

Security Considerations

  1. Always verify transaction amounts
  2. Keep your access token secure
  3. Monitor for unauthorized transactions
  4. Use secure networks for transactions
  5. Enable 2FA if available