Skip to content

Base Endpoint

RESTful API Base Endpoint

Test Environment

    https://demoapi.dipcoin.io/exchange/

Production Environment

    https://gray-api.dipcoin.io

Important Notes

  • All API responses are in JSON format
  • All times and timestamps are UNIX time (milliseconds)
  • Important: All numeric type parameters and return values are multiplied by 10^18 (e.g., 1 ETH = 1000000000000000000)
  • Each interface may throw exceptions, exception response format is as follows:

        {
            "code": 10001,
            "message": "Invalid Parameter.",
            "data": null
        }
    
  • Parameter order is not required

Numeric Format Description

All numeric values (prices, quantities, amounts, etc.) need to be multiplied by 10^18 (10 to the power of 18).

Examples: - 1 ETH = 1000000000000000000 - 2500 USDT = 2500000000000000000000 - 0.5 ETH = 500000000000000000

API Service Endpoints

Authentication Service (Gateway)

/api/authorize

Market Data Service (Market API)

/api/perp-market-api

Trading Service (Trade API)

/api/perp-trade-api

Response Format

All API responses follow a unified format:

{
    "code": 200,
    "message": "success",
    "data": {}
}
  • code: Response code, 200 indicates success
  • message: Response message
  • data: Response data