Skip to main content

Wallet & Assets Guide

On BigONE, your assets are segregated into different "Accounts" (wallets) for different purposes. Understanding how to move funds between these accounts is critical for advanced trading strategies.

Account Types

  1. Funding Account (FUND): The central hub. Deposits land here, and withdrawals start here.
  2. Spot Account (SPOT): Used for Spot Trading.
  3. Contract Account (CONTRACT): Used for Contract (Perpetual) Trading.
info

You cannot trade Contract with funds sitting in your Spot Account. You must Transfer them first.


Lesson 1: Internal Transfers

Internal transfers are instant and free. They are essential for arbitrage bots or moving profits to safety.

Endpoint: POST /viewer/transfer

The Logic

To move 1 BTC from Spot to Contract:

  • from: "SPOT"
  • to: "CONTRACT"
  • symbol: "BTC"
  • amount: "1.0"
import requests
import time
import jwt
import uuid

# Auth Setup ...
# ...

payload = {
"guid": str(uuid.uuid4()), # Unique ID for idempotency
"symbol": "BTC",
"amount": "1.00000000",
"from": "SPOT",
"to": "CONTRACT"
}

response = requests.post(f"{BASE_URL}/viewer/transfer", json=payload, headers=headers)
print(response.json())

Lesson 2: Handling Deposits

To receive funds, you need an address.

Endpoint: GET /viewer/assets/{symbol}/address

The Logic

  1. Request the address for a specific chain (e.g., TRC20 for USDT).
  2. Show this address to the user or sender.
  3. Monitor: Use GET /viewer/deposits to detect when funds arrive.
# Get USDT-TRC20 Address
res = requests.get(f"{BASE_URL}/viewer/assets/USDT/address", headers=headers)
addresses = res.json()
trc20 = next(a for a in addresses if a['chain'] == 'TRX')

print(f"Deposit USDT to: {trc20['value']}")

Lesson 3: Automating Withdrawals

Withdrawals allow you to move funds off-exchange.

Endpoint: POST /withdrawals

Prerequisites

  • Whitelist: The destination address must be added to your Trusted Address list in the BigONE UI.
  • 2FA: API Keys used for withdrawals usually require IP whitelisting and special permissions.
payload = {
"guid": str(uuid.uuid4()),
"symbol": "USDT",
"amount": "100.0",
"target_address": "Txyz123...", # Must be whitelisted
"gateway_name": "Tron" # Specify Chain
}

response = requests.post(f"{BASE_URL}/withdrawals", json=payload, headers=headers)
print(f"Withdrawal ID: {response.json()['id']}")

Conclusion

Managing asset flow is just as important as trading strategy.

Key Takeaways:

  • Segregation: Always check which account (SPOT vs CONTRACT) your funds are in.
  • Idempotency: Always send a unique guid for transfers and withdrawals to prevent double-spending during network retries.
  • Security: Withdrawals require stricter API permissions and address whitelisting.

Next Steps: