Trading Pairs

This endpoint allows you to retrieve available tradings pairs

Get List of Trading Pairs

To fetch a list of trading pairs, you can perform a GET request to the StockHero API.

GET https://api.aitrade.com/api/api/exchange_pair/list

Query Params

No query parameters are needed for this request.

Response:

  • The successful request returns a code of 200 with a message of "Success", accompanying an array under the key of category. for example , usd ( all usd pairs ) which contains the details of each trading pair, such as pair_id , name, price_precision, amount_precision, and images for both quote and base assets.

  • Example successful response includes trading pair information like AAPL/USD and AMZN/USD, detailing precision for price and amount, activity status, and images for both assets involved in the pair.

  • An unsuccessful attempt due to authentication issues will result in a code of 401 and a "message" indicating "Unauthenticated."

{
    "code": 200,
    "message": "Success",
    "exchange": {
        "order": 1,
        "id": 1,
        "name": "Mirae Asset",
        "image": "https://stockhero.s3.ap-southeast-1.amazonaws.com/public/exchanges/mirae_asset.png",
        "active": 1,
        "status": "ok",
        "require_param": null,
        "start_at_minute": 120,
        "end_at_minute": 950,
        "holiday": "2024-07-07,2024-08-17,2024-09-16,2024-12-25,2024-12-26",
        "is_future": 0,
        "need_auth": 0,
        "doc_link": "https://docs.stockhero.ai/connecting-exchanges/",
        "note": null
    },
    "transaction_fee": [],
    "usd": [
         {
            "id": 1,
            "exchange_id": 1,
            "pair_id": 1,
            "name": "AAPL-USD",
            "pair": {
                "id": 1,
                "from": "AAPL",
                "to": "USD",
                "quote_image": "",
                "base_image": ""
            }
        },
        ...
    ]
}

Last updated