Big.One API Documentation
website·Indexed 34 days ago
https://open.big.oneREST API reference for Big.One, providing endpoints for spot trading, contract trading, and wallet management. Includes functionality for managing orders, accessing market data such as order books and candlesticks, adjusting leverage and risk limits, and handling asset withdrawals.
What's inside Big.One
- The Convert API provides a fast method for exchanging digital assets by instantly matching and executing trades at the best available market price, bypassing the need to place traditional spot orders. It is designed for users prioritizing speed and efficiency over precise price control.
Understand BigONE account types
BigONE segregates assets into three primary account types. Funds must be transferred between these accounts to be used for their specific purposes; for example, funds in a Spot account cannot be used for Contract trading without first being transferred.Connect to the big.one WebSocket API
The big.one WebSocket API provides real-time market and user data. The default protocol is JSON, but Google Protocol Buffers (Proto) is supported for lower latency and smaller payloads, which is recommended for high-frequency trading.Endpoint: wss://api.big.one/ws/v2Manage assets and balances with the Wallet API
The Wallet API provides functionality to manage Funding Account balances and move assets. Key capabilities include:
- Asset Management: Retrieve supported assets and public network settings.
- Funding Account: View current balances of your funding wallet.
- Deposits: Retrieve deposit addresses and view deposit history.
- Withdrawals: Submit withdrawal requests and track withdrawal history.
- Transfers: Move assets between Funding, Spot, and Contract accounts.
BigONE API Authentication and Data Features
The BigONE Developer API utilizes a RESTful design and supports the following core features:
- Authentication: Private endpoints require JWT (JSON Web Token) authentication.
- Real-time Data: WebSocket streams are available for market data and order updates.
- Market Data: Access to asset pairs, tickers, order books, trades, and candles.
BigONE Contract API Prerequisites and Authentication
The BigONE Contract API uses a different data format than the Spot API. Most numeric fields (such asprice,size, andleverage) must be sent as JSON Numbers (Integers or Floats) rather than Strings. Authentication requires a Bearer Token (JWT).Base URL: https://api.big.one/api/contract/v2 Authentication: Bearer Token (JWT)Retrieve withdrawal details by GUID
Use the GET/viewer/withdrawals/:guidendpoint to retrieve detailed information about a specific withdrawal. You must provide the unique identifier (GUID) of the withdrawal as a path parameter.GET /viewer/withdrawals/{guid}Retrieve transfer information by GUID
Use theGET /viewer/transferendpoint to retrieve detailed information about a specific transfer. The request requires a GUID to identify the transfer. A successful request returns a 200 status code with the transfer information in the response body.GET /viewer/transferSet up BigONE Convert API authentication
To use the BigONE Convert service, you must use the following base URL and authentication requirements:
- Base URL:
https://api.big.one/sapi/v1/convert - Authentication: Bearer Token (JWT)
- Required Scope:
convert assets
- Base URL:
Authenticate BigONE API requests using JWT
BigONE API uses JSON Web Tokens (JWT) with theHS256algorithm for authentication. To authenticate a request, you must create a JWT token using your API Key and API Secret and include it in theAuthorizationheader as a Bearer token.curl "https://api.big.one/api/v3/viewer/accounts" \ -H 'Authorization: Bearer <YOUR_TOKEN>'Implement Spot-Contract Arbitrage with Linear Contracts
For simpler calculations, use Linear Contracts (USDT-margined) instead of Inverse Contracts. In Linear Contracts, the ratio is simplified to1 BTC = 1 Contract.Verify Available Funds for Trading
Use the
GET /viewer/accountsendpoint to check if there is sufficient balance before placing an order.- balance: Amount available for new trades or withdrawals.
- locked_balance: Amount tied up in open orders.
When a limit order is placed, the required funds move from
balancetolocked_balance. If the order is cancelled, funds return tobalance; if filled,locked_balancedecreases and the base asset increases.# Check funds before ordering accounts = requests.get(f"{BASE_URL}/viewer/accounts", headers=headers).json() usdt_wallet = next((a for a in accounts if a['asset_symbol'] == 'USDT'), None) if usdt_wallet and float(usdt_wallet['balance']) > 50.0: print("Sufficient funds.") else: print("Insufficient funds.")