Big.One API Documentation

website·Indexed 34 days ago

https://open.big.one

REST 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.

Tokens
19.1K
Snippets
129
Records
177
Agent score
62%

What's inside Big.One

  1. Overview of the Convert API

    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.
  2. 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.
  3. 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/v2
  4. Manage 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.
  5. 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.
  6. BigONE Contract API Prerequisites and Authentication

    The BigONE Contract API uses a different data format than the Spot API. Most numeric fields (such as price, size, and leverage) 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)
  7. Retrieve withdrawal details by GUID

    Use the GET /viewer/withdrawals/:guid endpoint 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}
  8. Retrieve transfer information by GUID

    Use the GET /viewer/transfer endpoint 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/transfer
  9. Set 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
  10. Authenticate BigONE API requests using JWT

    BigONE API uses JSON Web Tokens (JWT) with the HS256 algorithm for authentication. To authenticate a request, you must create a JWT token using your API Key and API Secret and include it in the Authorization header as a Bearer token.
    curl "https://api.big.one/api/v3/viewer/accounts" \
         -H 'Authorization: Bearer <YOUR_TOKEN>'
  11. 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 to 1 BTC = 1 Contract.
  12. Verify Available Funds for Trading

    Use the GET /viewer/accounts endpoint 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 balance to locked_balance. If the order is cancelled, funds return to balance; if filled, locked_balance decreases 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.")