Register Account

Cloud9Trader API

REST API

The REST API can be queried over HTTPS requests and returns JSON.


Get Currencies

List available currencies.

GET https://www.cloud9trader.com/api/v1/currencies

Response

Example:

[
    {
        "symbol": "USD",
        "name": "US Dollars"
    },
    {
        "symbol": "EUR",
        "name": "Euro"
    },
    {
        "symbol": "BTC",
        "name": "Bitcoin"
    },
    ...
]

Get Currency Rates

Returns currency with real time exchange rate and market data, updated every minute (forex) or hourly (crypto).

GET https://www.cloud9trader.com/api/v1/currency/<symbol>

Path parameters

ParameterRequiredValues
symbol
The currency symbol
e.g. "BTC"

Query parameters

ParameterRequiredValues
quote
Comma-separated list of currencies to convert to. Defaults to "USD"
e.g. "USD,GBP,EUR"

Request

Example:

curl "https://www.cloud9trader.com/api/v1/currency/BTC?quote=USD,EUR,ETH"

Response

Example:

{
    "currency": "BTC",
    "name": "Bitcoin",
    "maxSupply": 21000000,
    "circulatingSupply": 18283137,
    "totalSupply": 18283137,
    "updated": "2020-03-23T14:00:00.000Z",
    "quotes": {
        "USD": {
            "price": 6159.73622,
            "percentChange24h": 1.593,
            "updated": "2020-03-23T13:59:59.874Z"
        },
        "EUR": {
            "price": 5708.21631,
            "percentChange24h": 0.8295,
            "updated": "2020-03-23T13:59:59.060Z"
        },
        "ETH": {
            "price": 47.62456,
            "percentChange24h": 1.3146,
            "updated": "2020-03-23T13:59:25.000Z"
        }
    }
}

Get Instruments

Fetch configuration for all available instruments (tradeable markets) across exchanges.

GET https://www.cloud9trader.com/api/v1/instruments

Response

Example:

[
    {
        "id": "EUR_USD:OANDA",
        "broker": "OANDA",
        "symbol": "EUR_USD",
        "displaySymbol": "EUR/USD",
        "displayName": "EUR/USD",
        "product": "Forex",
        "productId": 1,
        "dealt": "EUR",
        "quote": "USD",
        "precision": 5,
        "pip": "0.0001",
        "pipSize": 0.0001,
        "pipPrecision": 1,
        "maxTradeUnits": 10000000,
        "maxQuantity": 10000000,
        "minTrailingStop": 5,
        "maxTrailingStop": 10000,
        "marginRate": 0.05,
        "contractMultiplier": 1,
        "factor": 1,
        "lotSize": 1
    },
    ...
]

Get Historical Price

Fetch historical price bars or recent tick data.

GET https://price.cloud9trader.com/historical?instrumentId=<instrumentId>&interval=<interval>&start=<startDate>&end=endDate

Query parameters

ParameterRequiredValues
instrumentId
The instrument ID
e.g. "XBTUSD:BitMEX"
interval
The bar interval
"Tick", "S5", "S10", "M2", "M5", "M10", "M15", "M30", "H1", "H2", "H4", "H8", "H12", "D1"
startDate
Range start (ISO 8601 format)
e.g. "2019-08-01T00:00:00.000Z"
endDate
Range end (ISO 8601 format)
e.g. "2019-09-01T00:00:00.000Z"

Response

Responses are minified to reduce transfer sizes.

Example:

[
    [
        "2019-09-07T10:00:00.000Z", // Open time
        10880,                      // Open bid
        10892.17,                   // High bid
        10830.06,                   // Low bid
        10856.79,                   // Close bid
        10881.54,                   // Open ask
        10892.2,                    // High ask
        10832.13,                   // Low ask
        10859.24,                   // Close ask
        48732                       // Volume
    ],
    ...
]

Was this page useful? If you find any errors or have any questions please get in touch at support@cloud9trader.com.