NAV Navbar
  • Trade API 2.0 (Beta)
  • Market data
  • Trading
  • Account
  • Authentication
  • Order Types
  • Handling Errors
  • Trade API 2.0 (Beta)

    Trade API 2.0 is a publicly available RESTful API that provides programmatic access to trading functionality of CREX24 crypto exchange. Previous version of the API is supported and available here.

    Base URL: https://api.crex24.com/v2/

    The API requests and responses are in JSON format. Basic data types:

    Type Example Description
    string "some text" Text
    boolean true Logical data type, an instance can have either of two values: true or false
    int 1203 Integer number
    decimal 0.12345 Floating point number, used for financial and monetary data
    datetime "2017-11-07T18:40:01Z" String representation of UTC date and time in ISO8601 format.
    List of recognized input formats:
    YYYY-MM-DDThh:mm:ssZ, YYYY-MM-DDThh:mm:ss
    YYYY-MM-DDThh:mmZ, YYYY-MM-DDThh:mm
    YYYY-MM-DDThhZ, YYYY-MM-DDThh
    YYYY-MM-DDZ, YYYY-MM-DD
    YYYY-MMZ, YYYY-MM
    YYYYZ, YYYY
    YYYYMMDDThhmmssZ, YYYYMMDDThhmmss
    YYYYMMDDThhmmZ, YYYYMMDDThhmm
    YYYYMMDDThhZ, YYYYMMDDThh
    YYYYMMDDZ, YYYYMMDD
    Output format:
    YYYY-MM-DDThh:mm:ssZ

    Market data

    Base URL: https://api.crex24.com/v2/public

    This section of API is currently under development. More methods will be available soon.

    Currencies

    GET https://api.crex24.com/v2/public/currencies
    

    The above request returns JSON structured like this:

    [
      {
        "symbol": "$PAC",
        "name": "PACCoin",
        "isFiat": false,
        "depositsAllowed": true,
        "depositConfirmationCount": 8,
        "minDeposit": 0.0,
        "withdrawalsAllowed": true,
        "withdrawalPrecision": 8,
        "minWithdrawal": 4.0,
        "maxWithdrawal": null,
        "flatWithdrawalFee": 2.0,
        "isDelisted": false
      },
      {
        "symbol": "2GIVE",
        "name": "2Give",
        "isFiat": false,
        "depositsAllowed": false,
        "depositConfirmationCount": 8,
        "minDeposit": 0.0,
        "withdrawalsAllowed": false,
        "withdrawalPrecision": 8,
        "minWithdrawal": 2.0,
        "maxWithdrawal": null,
        "flatWithdrawalFee": null,
        "isDelisted": true
      },
      ...
    ]
    
    GET https://api.crex24.com/v2/public/currencies?filter=ETH,USD
    

    The above request returns JSON structured like this:

    [
      {
        "symbol": "ETH",
        "name": "Ethereum",
        "isFiat": false,
        "depositsAllowed": true,
        "depositConfirmationCount": 12,
        "minDeposit": 0.01,
        "withdrawalsAllowed": true,
        "withdrawalPrecision": 8,
        "minWithdrawal": 0.01,
        "maxWithdrawal": 5000.0,
        "flatWithdrawalFee": 0.005,
        "isDelisted": false
      },
      {
        "symbol": "USD",
        "name": "US dollar",
        "isFiat": true,
        "depositsAllowed": true,
        "depositConfirmationCount": null,
        "minDeposit": null,
        "withdrawalsAllowed": true,
        "withdrawalPrecision": 2,
        "minWithdrawal": null,
        "maxWithdrawal": null,
        "flatWithdrawalFee": null,
        "isDelisted": false
      }
    ]
    

    GET https://api.crex24.com/v2/public/currencies

    Returns the list of available currencies (including coins, tokens, etc.) with detailed information

    Parameters:

    Name Type Description
    filter string Optional. Comma-separated list of currencies for which the information is requested. If the parameter is not specified, the full list of available currencies is returned

    Response:

    Returns a JSON array of Currency objects, each with the following structure:

    Field Type Description
    symbol string Unique identifier of the currency, e.g. "BTC"
    name string Currency name, e.g. "Bitcoin"
    isFiat boolean Reports whether the currency is fiat
    depositsAllowed boolean Contains the value false if deposits for the currency are not accepted at the moment
    depositConfirmationCount int The number of blockchain confirmations the deposit is required to receive before the funds are credited to the account (for cryptocurrencies only; in case of fiat currency, the field contains the value null)
    minDeposit decimal Minimum deposit threshold (for cryptocurrencies only; in case of fiat currency, the field contains the value null)
    If the deposit doesn’t meet the minimum threshold, the funds will not be credited to the account until the moment, when in the result of following deposits, their total amount will have reached the threshold
    withdrawalsAllowed boolean Contains the value false if withdrawals are not currently available for the currency
    withdrawalPrecision int Precision of withdrawal amount, expressed in the number of decimal places (digits to the right of a decimal point)
    minWithdrawal decimal Minimum withdrawal amount (for cryptocurrencies only; in case of fiat currency, the field contains the value null)
    maxWithdrawal decimal Maximum withdrawal amount (for cryptocurrencies only; in case of fiat currency, the field contains the value null). If a currency doesn’t have an upper withdrawal limit, the field contains the value null
    flatWithdrawalFee decimal The amount of fee charged per withdrawal (this field is for cryptocurrencies with flat withdrawal fee only, in case of cryptocurrency with non-flat fee or in case of fiat currency, the field contains the value null).
    For cryptocurrencies with non-flat withdrawal fee, its size can be estimated using the previewWithdrawal method
    isDelisted boolean Reports whether the currency is delisted

    Trade Instruments

    GET https://api.crex24.com/v2/public/instruments
    

    The above request returns JSON structured like this:

    [
      {
        "symbol": "$PAC-BTC",
        "baseCurrency": "$PAC",
        "quoteCurrency": "BTC",
        "feeCurrency": "BTC",
        "tickSize": 0.00000001,
        "minPrice": 0.00000001,
        "minVolume": 1.0,
        "supportedOrderTypes": [
          "limit"
        ],
        "state": "active"
      },
      {
        "symbol": "AAA-BTC",
        "baseCurrency": "AAA",
        "quoteCurrency": "BTC",
        "feeCurrency": "BTC",
        "tickSize": 0.00000001,
        "minPrice": 0.00000001,
        "minVolume": 1.0,
        "supportedOrderTypes": [
          "limit"
        ],
        "state": "active"
      },
      ...
    ]
    
    GET https://api.crex24.com/v2/public/instruments?filter=ETH-BTC,BTC-USD
    

    The above request returns JSON structured like this:

    [
      {
        "symbol": "BTC-USD",
        "baseCurrency": "BTC",
        "quoteCurrency": "USD",
        "feeCurrency": "USD",
        "tickSize": 0.01,
        "minPrice": 0.01,
        "minVolume": 0.00001,
        "supportedOrderTypes": [
          "limit"
        ],
        "state": "active"
      },
      {
        "symbol": "ETH-BTC",
        "baseCurrency": "ETH",
        "quoteCurrency": "BTC",
        "feeCurrency": "BTC",
        "tickSize": 0.00000001,
        "minPrice": 0.00000001,
        "minVolume": 0.0001,
        "supportedOrderTypes": [
          "limit"
        ],
        "state": "active"
      }
    ]
    

    GET https://api.crex24.com/v2/public/instruments

    Returns the list of available trade instruments with detailed information

    Parameters:

    Name Type Description
    filter string Optional. Comma-separated list of instruments for which the detailed information is requested. If the parameter is not specified, the full list of available instruments is returned

    Response:

    Returns a JSON array of Instrument objects, each with the following structure:

    Field Type Description
    symbol string Unique identifier of the instrument, e.g. "LTC-BTC" for trading in LTC/BTC pair
    baseCurrency string Base currency of the instrument
    quoteCurrency string Quote currency of the instrument
    feeCurrency string Currency in which the fee is charged (rebate is paid), when trading the instrument
    tickSize decimal The minimum price movement of the instrument (the smallest price increment of an order placed for the instrument)
    minPrice decimal Minimum price of an order placed for the instrument
    minVolume decimal Minimum volume of an order placed for the instrument
    supportedOrderTypes string[] Array of order types supported by the instrument. May contain the following items:
    "limit" - limit order;
    "market" - market order;
    "stopLimit" - stop-limit order.
    More about order types in the corresponding section of documentation
    state string Instrument state, can have one of the following values:
    "active" - working in a normal mode;
    "suspended" - trading is suspended;
    "delisted" - instrument is delisted

    Quotes (Tickers)

    GET https://api.crex24.com/v2/public/tickers
    

    The above request returns JSON structured like this:

    [
      {
        "instrument": "$PAC-BTC",
        "last": 0.0000005,
        "percentChange": 8.6957,
        "low": 0.00000046,
        "high": 0.0000005,
        "baseVolume": 144.855144855145,
        "quoteVolume": 0.0000724275724275725,
        "volumeInBtc": 0.0000724275724275725,
        "volumeInUsd": 0.538195529470530008725,
        "ask": 0.0000005,
        "bid": 0.00000046,
        "timestamp": "2018-05-31T12:48:56Z"
      },
      {
        "instrument": "AAA-BTC",
        "last": 0.00000002,
        "percentChange": 0.0,
        "low": 0.00000001,
        "high": 0.00000002,
        "baseVolume": 1549096.693306693307,
        "quoteVolume": 0.02048589386613386614,
        "volumeInBtc": 0.02048589386613386614,
        "volumeInUsd": 152.2267849994061938517734,
        "ask": 0.00000002,
        "bid": null,
        "timestamp": "2018-05-31T12:48:56Z"
      },
      ...
    ]
    
    GET https://api.crex24.com/v2/public/tickers?instrument=ETH-BTC,BTC-USD
    

    The above request returns JSON structured like this:

    [
      {
        "instrument": "BTC-USD",
        "last": 7344.94,
        "percentChange": -0.7441,
        "low": 7000.0,
        "high": 7764.75,
        "baseVolume": 0.886784471668,
        "quoteVolume": 6851.76442297023847614352,
        "volumeInBtc": 0.886784471668,
        "volumeInUsd": 6851.76442297023847614352,
        "ask": 7664.74899,
        "bid": 7344.94,
        "timestamp": "2018-06-01T14:01:52Z"
      },
      {
        "instrument": "ETH-BTC",
        "last": 0.07699474,
        "percentChange": 8.4433,
        "low": 0.07099998,
        "high": 0.07787616,
        "baseVolume": 34.047449402419,
        "quoteVolume": 2.56736839796582148878,
        "volumeInBtc": 2.56736839796582148878,
        "volumeInUsd": 19433.371660632660251438979571,
        "ask": 0.0771,
        "bid": 0.07699474,
        "timestamp": "2018-06-01T14:01:52Z"
      }
    ]
    

    GET https://api.crex24.com/v2/public/tickers

    Returns the list of tickers with detailed information

    Parameters:

    Name Type Description
    instrument string Optional. Comma-separated list of tickers for which the detailed information is requested. If the parameter is not specified, the full list of tickers is returned

    Response:

    Returns a JSON array of Ticker objects, each with the following structure:

    Field Type Description
    instrument string Unique ticker identifier, e.g. "LTC-BTC"
    last decimal Last price of base currency. If this information is not available, the field contains the value null
    percentChange decimal Percentage change of the price over the last 24 hours. If this information is not available, the field contains the value null
    low decimal Lowest price over the last 24 hours. If this information is not available, the field contains the value null
    high decimal Highest price over the last 24 hours. If this information is not available, the field contains the value null
    baseVolume decimal Total trading volume of the instrument over the last 24 hours, expressed in base currency
    quoteVolume decimal Total trading volume of the instrument over the last 24 hours, expressed in quote currency
    volumeInBtc decimal Total trading volume of the instrument over the last 24 hours, expressed in BTC
    volumeInUsd decimal Total trading volume of the instrument over the last 24 hours, expressed in USD
    ask decimal Best ask price.
    If there are no active selling orders, the field contains the value null
    bid decimal Best bid price.
    If there are no active buying orders at the moment, the field contains the value null
    timestamp datetime Date and time when the ticker was updated

    Recent Trades

    GET https://api.crex24.com/v2/public/recentTrades?instrument=LTC-BTC
    

    The above request returns JSON structured like this:

    [
      {
        "price": 0.0159019,
        "volume": 0.043717,
        "side": "buy",
        "timestamp": "2018-05-31T10:08:53Z"
      },
      {
        "price": 0.0158989,
        "volume": 0.045283,
        "side": "buy",
        "timestamp": "2018-05-31T10:08:53Z"
      },
      {
        "price": 0.0158989,
        "volume": 0.242679,
        "side": "buy",
        "timestamp": "2018-05-31T10:08:45Z"
      },
      ...
    ]
    
    GET https://api.crex24.com/v2/public/recentTrades?instrument=LTC-BTC&limit=2
    

    The above request returns JSON structured like this:

    [
      {
        "price": 0.0159019,
        "volume": 0.043717,
        "side": "buy",
        "timestamp": "2018-05-31T10:08:53Z"
      },
      {
        "price": 0.0158989,
        "volume": 0.045283,
        "side": "buy",
        "timestamp": "2018-05-31T10:08:53Z"
      }
    ]
    

    GET https://api.crex24.com/v2/public/recentTrades

    Returns the list of recent trades made with the specified instrument, sorted from newest to oldest

    Parameters:

    Name Type Description
    instrument string Trade instrument for which the trades are requested
    limit int Optional. Maximum number of results per call. Accepted values: 1 - 1000. If the parameter is not specified, the number of results is limited to 100

    Response:

    Returns an array of JSON objects, each with the following structure:

    Field Type Description
    price decimal Price for which the base currency was bought or sold
    volume decimal Trade volume (the amount of base currency that was bought or sold)
    side string Trade direction, can have either of the two values: "buy" or "sell"
    timestamp datetime Date and time when the trade took place

    Order Book

    GET https://api.crex24.com/v2/public/orderBook?instrument=LTC-BTC
    

    The above request returns JSON structured like this:

    {
      "buyLevels": [
        {
          "price": 0.01573481,
          "volume": 0.032
        },
        {
          "price": 0.01500001,
          "volume": 0.75
        },
        ...
        {
          "price": 0.00000001,
          "volume": 10309.0
        }
      ],
      "sellLevels": [
        {
          "price": 0.01593,
          "volume": 0.059355644356
        },
        {
          "price": 0.01594994,
          "volume": 0.3
        },
        ...
        {
          "price": 1566320.0,
          "volume": 0.135
        }
      ]
    }
    
    GET https://api.crex24.com/v2/public/orderBook?instrument=LTC-BTC&limit=2
    

    The above request returns JSON structured like this:

    {
      "buyLevels": [
        {
          "price": 0.01573481,
          "volume": 0.032
        },
        {
          "price": 0.01500001,
          "volume": 0.75
        }
      ],
      "sellLevels": [
        {
          "price": 0.01593,
          "volume": 0.059355644356
        },
        {
          "price": 0.01594994,
          "volume": 0.3
        }
      ]
    }
    

    GET https://api.crex24.com/v2/public/orderBook

    Returns information about bids and asks for the specified instrument, organized by price level

    Parameters:

    Name Type Description
    instrument string Trade instrument for which the order book is requested
    limit int Optional. Maximum number of returned price levels (both buying and selling) per call. If the parameter is not specified, the number of levels is limited to 100

    Response:

    Returns a JSON object with the following structure:

    Field Type Description
    buyLevels PriceLevel[] An array of price levels for buying orders, sorted by price from highest to lowest
    sellLevels PriceLevel[] An array of price levels for selling orders, sorted by price from lowest to highest

    Structure of PriceLevel object:

    Field Type Description
    price decimal Price for which the base currency is bought or sold
    volume decimal Total volume of base currency that is bought or sold on the price level

    Trading

    Base URL: https://api.crex24.com/v2/trading

    Order Placement

    POST https://api.crex24.com/v2/trading/placeOrder
    {
      "instrument": "BTS-BTC",
      "side": "buy",
      "volume": 4,
      "price": 0.000025
    }
    

    The above request returns JSON structured like this:

    {
      "id": 469594855,
      "timestamp": "2018-06-08T16:59:44Z",
      "instrument": "BTS-BTC",
      "side": "buy",
      "type": "limit",
      "status": "submitting",
      "cancellationReason": null,
      "timeInForce": "GTC",
      "volume": 4.0,
      "price": 0.000025,
      "stopPrice": null,
      "remainingVolume": 4.0,
      "lastUpdate": null,
      "parentOrderId": null,
      "childOrderId": null
    }
    

    POST https://api.crex24.com/v2/trading/placeOrder

    Places a new order

    Parameters:

    The parameters should be passed in the body of POST request as fields of a JSON object:

    Parameter Type Description
    instrument string Trade instrument for which the order should be placed, e.g. "ETH-BTC"
    side string Order side, can have either of the two values:
    "buy" - buying order;
    "sell" - selling order
    type string Optional. Order type. Accepted values:
    "limit" - limit order;
    "market" - market order;
    "stopLimit" - stop-limit order.
    The value must comply with the list of order types supported by the instrument (see the value of parameter supportedOrderTypes of the Instrument).
    If the parameter is not specified, the default value "limit" is used.
    More about order types in the corresponding section of documentation
    timeInForce string Optional. Sets the length of time over which the order will continue working before it’s cancelled. Accepted values:
    "GTC" - Good-Til-Cancelled;
    "IOC" - Immediate-Or-Cancel (currently not supported, reserved for future use);
    "FOK" - Fill-Or-Kill (currently not supported, reserved for future use).
    If the parameter is not specified, the default value "GTC" is used for limit orders.
    More about limit order lifecycle in the section Limit Order
    volume decimal The amount of base currency to be bought or sold
    price decimal Order price.
    This parameter is not necessary for market-orders (if set explicitly, the value is ignored)
    stopPrice decimal Stop-price.
    This parameter is mandatory for stop-limit orders only. In case of alternate order types, the value is ignored
    strictValidation boolean Optional. Values of parameters price and stopPrice must be a multiple of tickSize of the Instrument. This field defines how such values should be processed, if they don’t meet the requirement:
    false - prices will be rounded to meet the requirement;
    true - execution of the method will be aborted and an error message will be returned.
    The default value is false

    Response:

    Returns a JSON object Order with the following structure:

    Field Type Description
    id int Unique order identifier
    timestamp datetime Date and time of creation
    instrument string Trade instrument identifier
    side string Direction of trade, can have either of the two values:
    "buy" - buying order;
    "sell" - selling order
    type string Order type, can have one of the following values:
    "limit" - limit order;
    "market" - market order;
    "stopLimit" - stop-limit order
    status string Order status, can have one of the following values:
    "submitting" - in the process of submission;
    "unfilledActive" - active, no trades have taken place yet;
    "partiallyFilledActive" - part of the order is active, the other part has already been filled;
    "filled" - the order has been filled and is no longer active;
    "unfilledCancelled" - cancelled, no trades had been completed;
    "partiallyFilledCancelled" - cancelled being partially filled: part of the order has been filled, the other part has been cancelled.
    "waiting" - stop-limit order is waiting to be triggered to place a limit order;

    More about order statuses in the section Order types
    cancellationReason string Reason why the order has been cancelled (only for orders, that have status "unfilledCancelled" or "partiallyFilledCancelled", in other cases the field contains the value null). Can have one of the following values:
    "cancelledByUser" - the user has cancelled the order;
    "failedToFillRightAway" - an attempt to immediately fill an IOC or FOK order has failed, consequently the order has been cancelled;
    "failedToPassValidation" - the order has not passed validation;
    "marketClosed" - the instrument has been suspended from trading;
    "orderExpired" - the order has expired (reserved for future use)

    Reserved for future use. Currently is always set to null
    timeInForce string Length of time over which the order will continue working before it’s cancelled, can have one of the following values:
    "GTC" - Good-Til-Cancelled;
    "IOC" - Immediate-Or-Cancel;
    "FOK" - Fill-Or-Kill.
    This field is for limit orders only. If the order is of different type, the field contains the value null.
    More about limit order lifecycle in the section Limit Order
    volume decimal Initial volume of the order
    price decimal Initial price of the order. In case of market order, this field contains the value null
    stopPrice decimal Stop-price (for stop-limit orders only; if the order is of different type, this field contains the value null)
    remainingVolume decimal Remaining volume of the order (volume that hasn’t been filled)
    lastUpdate datetime Stores the last time when the order undergone changes, such as change of status or change in remaining volume.
    Reserved for future use. Currently is always set to null
    parentOrderId int ID of an order that served as a base order for the current one. This field contains an integer value if the current order has been placed due to triggering of a stop-limit order or as a result of modification of another order. Otherwise the field contains the value null.
    Reserved for future use. Currently is always set to null
    childOrderId int ID of an order that has been created based on the current order. This field contains an integer value if the current order is a stop-limit order that has been triggered or the current order is a limit order that has been modified. Otherwise the field contains the value null.
    Reserved for future use. Currently is always set to null

    Comments:

    Order submission is not instantaneous, it’s a process that takes some time (usually less than one second). Consequently, if one sends a request to place an order which implies immediate execution, the response may still contain the status "submitting". In this situation the orderStatus method may be of use to track the status of order execution later.

    Order Status

    GET https://api.crex24.com/v2/trading/orderStatus?id=466747915
    

    The above request returns JSON structured like this:

    [
      {
        "id": 466747915,
        "timestamp": "2018-05-26T06:43:49Z",
        "instrument": "UNI-BTC",
        "side": "sell",
        "type": "limit",
        "status": "partiallyFilledActive",
        "cancellationReason": null,
        "timeInForce": "GTC",
        "volume": 5700.0,
        "price": 0.000005,
        "stopPrice": null,
        "remainingVolume": 1.948051948052,
        "lastUpdate": null,
        "parentOrderId": null,
        "childOrderId": null
      }
    ]
    
    GET https://api.crex24.com/v2/trading/orderStatus?id=466747915,466748077
    

    The above request returns JSON structured like this:

    [
      {
        "id": 466747915,
        "timestamp": "2018-05-26T06:43:49Z",
        "instrument": "UNI-BTC",
        "side": "sell",
        "type": "limit",
        "status": "partiallyFilledActive",
        "cancellationReason": null,
        "timeInForce": "GTC",
        "volume": 5700.0,
        "price": 0.000005,
        "stopPrice": null,
        "remainingVolume": 1.948051948052,
        "lastUpdate": null,
        "parentOrderId": null,
        "childOrderId": null
      },
      {
        "id": 466748077,
        "timestamp": "2018-05-26T06:45:29Z",
        "instrument": "PRJ-BTC",
        "side": "sell",
        "type": "limit",
        "status": "partiallyFilledActive",
        "cancellationReason": null,
        "timeInForce": "GTC",
        "volume": 10000.0,
        "price": 0.0000007,
        "stopPrice": null,
        "remainingVolume": 9975.0,
        "lastUpdate": null,
        "parentOrderId": null,
        "childOrderId": null
      }
    ]
    

    GET https://api.crex24.com/v2/trading/orderStatus

    Returns detailed information about the specified order(s)

    Parameters:

    Name Type Description
    id int Comma-separated list of identifiers of orders for which the detailed information is requested

    Response:

    Returns a JSON array of Order objects, each with the structure described in the section Order Placement

    Order Trades

    GET https://api.crex24.com/v2/trading/orderTrades?id=416475861
    

    The above request returns JSON structured like this:

    [
      {
        "id": 1939477,
        "orderId": 416475861,
        "timestamp": "2018-03-15T10:22:10Z",
        "instrument": "LTC-BTC",
        "side": "buy",
        "price": 0.02,
        "volume": 0.02,
        "fee": 0.00002,
        "feeCurrency": "LTC"
      },
      {
        "id": 1939478,
        "orderId": 416475861,
        "timestamp": "2018-03-15T10:22:10Z",
        "instrument": "LTC-BTC",
        "side": "buy",
        "price": 0.02,
        "volume": 0.169,
        "fee": 0.000169,
        "feeCurrency": "LTC"
      },
      {
        "id": 1939479,
        "orderId": 416475861,
        "timestamp": "2018-03-15T10:22:10Z",
        "instrument": "LTC-BTC",
        "side": "buy",
        "price": 0.02,
        "volume": 0.02,
        "fee": 0.00002,
        "feeCurrency": "LTC"
      },
      ...
    ]
    

    GET https://api.crex24.com/v2/trading/orderTrades

    Returns information about trades generated by the specified order

    Parameters:

    Name Type Description
    id int ID of the order for which the information about trades is requested

    Response:

    Returns a JSON array of Trade objects, each with the structure described in the section Trade History

    Order Modification

    POST https://api.crex24.com/v2/trading/modifyOrder
    {
      "id": 469708782,
      "newPrice": 0.000028,
      "newVolume": 3.14
    }
    

    The above request returns JSON structured like this:

    {
      "id": 469708849,
      "timestamp": "2018-06-09T16:57:35Z",
      "instrument": "B2C-BTC",
      "side": "buy",
      "type": "limit",
      "status": "submitting",
      "cancellationReason": null,
      "timeInForce": "GTC",
      "volume": 3.14,
      "price": 0.000028,
      "stopPrice": null,
      "remainingVolume": 3.14,
      "lastUpdate": null,
      "parentOrderId": null,
      "childOrderId": null
    }
    

    POST https://api.crex24.com/v2/trading/modifyOrder

    Modifies certain parameters of an existing order

    Parameters:

    The parameters should be passed in the body of POST request as fields of a JSON object:

    Name Type Description
    id int Identifier of the order that you would like to modify
    newPrice decimal Optional. New value of price.
    If the parameter is not specified or its value is null or 0, the price of the order will be left unchanged
    newVolume decimal Optional. New value of volume.
    If the parameter is not specified or its value is null or 0, the volume of the order will be left unchanged
    strictValidation boolean Optional. The value of parameter newPrice must be a multiple of tickSize of the Instrument. This field defines how the value should be processed, if it doesn’t meet the requirement:
    false - price will be rounded to meet the requirement;
    true - execution of the method will be aborted and an error message will be returned

    Comments:

    This method is for active limit GTC orders only, invoking it for any other order will result in error.

    Essentially, this method cancels an existing order and places a new one with different price and/or volume instead of it. As a result, the order is moved to the back of the price level queue of the order book after modification. If, however, the modification is not necessary (the new price and volume are the same as the ones of the current order), then the current order is returned without any changes.

    This method allows modifying the price and volume only. If modification of other parameters is necessary, one should cancel an existing order and place a new one (with required characteristics) instead of it manually.

    Response:

    Returns a JSON object Order that contains information about the modified order. The structure of the object is described in the section Order Placement

    Active Orders

    GET https://api.crex24.com/v2/trading/activeOrders
    

    The above request returns JSON structured like this:

    [
      {
        "id": 466747915,
        "timestamp": "2018-05-26T06:43:49Z",
        "instrument": "UNI-BTC",
        "side": "sell",
        "type": "limit",
        "status": "partiallyFilledActive",
        "cancellationReason": null,
        "timeInForce": "GTC",
        "volume": 5700.0,
        "price": 0.000005,
        "stopPrice": null,
        "remainingVolume": 1.948051948052,
        "lastUpdate": null,
        "parentOrderId": null,
        "childOrderId": null
      },
      {
        "id": 466748077,
        "timestamp": "2018-05-26T06:45:29Z",
        "instrument": "PRJ-BTC",
        "side": "sell",
        "type": "limit",
        "status": "partiallyFilledActive",
        "cancellationReason": null,
        "timeInForce": "GTC",
        "volume": 10000.0,
        "price": 0.0000007,
        "stopPrice": null,
        "remainingVolume": 9975.0,
        "lastUpdate": null,
        "parentOrderId": null,
        "childOrderId": null
      },
      ...
    ]
    
    GET https://api.crex24.com/v2/trading/activeOrders?instrument=UNI-BTC,BTC-USD
    

    The above request returns JSON structured like this:

    [
      {
        "id": 466747915,
        "timestamp": "2018-05-26T06:43:49Z",
        "instrument": "UNI-BTC",
        "side": "sell",
        "type": "limit",
        "status": "partiallyFilledActive",
        "cancellationReason": null,
        "timeInForce": "GTC",
        "volume": 5700.0,
        "price": 0.000005,
        "stopPrice": null,
        "remainingVolume": 1.948051948052,
        "lastUpdate": null,
        "parentOrderId": null,
        "childOrderId": null
      },
      {
        "id": 468298748,
        "timestamp": "2018-06-01T09:09:52Z",
        "instrument": "BTC-USD",
        "side": "sell",
        "type": "limit",
        "status": "unfilledActive",
        "cancellationReason": null,
        "timeInForce": "GTC",
        "volume": 0.0163813,
        "price": 7830.0,
        "stopPrice": null,
        "remainingVolume": 0.0163813,
        "lastUpdate": null,
        "parentOrderId": null,
        "childOrderId": null
      },
      ...
    ]
    

    GET https://api.crex24.com/v2/trading/activeOrders

    Returns the list of active orders with detailed information

    Parameters:

    Name Type Description
    instrument string Optional. Comma-separated list of trade instruments for which the active orders are requested. If the parameter is not specified, the active orders for all instruments are returned

    Response:

    Returns a JSON array of Order objects, each with the structure described in the section Order Placement

    Order Cancellation

    Cancellation by ID

    POST https://api.crex24.com/v2/trading/cancelOrdersById
    {
      "ids": [465448358, 468364313]
    }
    

    The above request returns JSON structured like this:

    [
      465448358,
      468364313
    ]
    

    POST https://api.crex24.com/v2/trading/cancelOrdersById

    Cancels orders with the specified identifiers

    Parameters:

    The parameters should be passed in the body of POST request as fields of a JSON object:

    Name Type Description
    ids int[] Array of identifiers of orders that should be cancelled

    Cancellation by Instrument

    POST https://api.crex24.com/v2/trading/cancelOrdersByInstrument
    {
      "instruments": ["LTC-BTC", "ETH-BTC"]
    }
    

    The above request returns JSON structured like this:

    [
      465448350,
      468364474,
      468904570
    ]
    

    POST https://api.crex24.com/v2/trading/cancelOrdersByInstrument

    Cancels all orders for each of the specified trade instruments

    Parameters:

    The parameters should be passed in the body of POST request as fields of a JSON object:

    Name Type Description
    instruments string[] Array of identifiers of trade instruments for which all orders should be cancelled

    Cancellation of All Orders

    POST https://api.crex24.com/v2/trading/cancelAllOrders
    

    The above request returns JSON structured like this:

    [
      465448350,
      465448358,
      468364313,
      468364474,
      468904570
    ]
    

    POST https://api.crex24.com/v2/trading/cancelAllOrders

    Cancels all active orders and all orders that are in the process of submission

    Parameters:

    None (body of POST request is empty)

    Response

    Each of the above listed methods returns a JSON array of identifiers of successfully cancelled orders

    Order History

    GET https://api.crex24.com/v2/trading/orderHistory
    

    The above request returns JSON structured like this:

    [
      {
        "id": 468535711,
        "timestamp": "2018-06-02T16:42:40Z",
        "instrument": "BTC-EUR",
        "side": "sell",
        "type": "limit",
        "status": "submitting",
        "cancellationReason": null,
        "timeInForce": "GTC",
        "volume": 0.00770733,
        "price": 6724.9,
        "stopPrice": null,
        "remainingVolume": 0.00770733,
        "lastUpdate": null,
        "parentOrderId": null,
        "childOrderId": null
      },
      {
        "id": 468535707,
        "timestamp": "2018-06-02T16:42:37Z",
        "instrument": "BTG-BTC",
        "side": "buy",
        "type": "limit",
        "status": "unfilledActive",
        "cancellationReason": null,
        "timeInForce": "GTC",
        "volume": 0.0173737,
        "price": 0.00589027,
        "stopPrice": null,
        "remainingVolume": 0.0173737,
        "lastUpdate": null,
        "parentOrderId": null,
        "childOrderId": null
      },
      ...
    ]
    
    GET https://api.crex24.com/v2/trading/orderHistory?instrument=BTC-USD,BTC-EUR
    

    The above request returns JSON structured like this:

    [
      {
        "id": 468536104,
        "timestamp": "2018-06-02T16:46:30Z",
        "instrument": "BTC-EUR",
        "side": "sell",
        "type": "limit",
        "status": "unfilledActive",
        "cancellationReason": null,
        "timeInForce": "GTC",
        "volume": 0.0258004,
        "price": 6718.8323081,
        "stopPrice": null,
        "remainingVolume": 0.0258004,
        "lastUpdate": null,
        "parentOrderId": null,
        "childOrderId": null
      },
      {
        "id": 468536059,
        "timestamp": "2018-06-02T16:46:10Z",
        "instrument": "BTC-USD",
        "side": "buy",
        "type": "limit",
        "status": "unfilledActive",
        "cancellationReason": null,
        "timeInForce": "GTC",
        "volume": 0.0035647,
        "price": 7485.16,
        "stopPrice": null,
        "remainingVolume": 0.0035647,
        "lastUpdate": null,
        "parentOrderId": null,
        "childOrderId": null
      },
      ...
    ]
    
    GET https://api.crex24.com/v2/trading/orderHistory?from=2018-04-01
    

    The above request returns JSON structured like this:

    [
      {
        "id": 429924578,
        "timestamp": "2018-04-01T00:00:13Z",
        "instrument": "BTC-CNY",
        "side": "buy",
        "type": "limit",
        "status": "unfilledCancelled",
        "cancellationReason": null,
        "timeInForce": "GTC",
        "volume": 0.00936817,
        "price": 41455.3,
        "stopPrice": null,
        "remainingVolume": 0.00936817,
        "lastUpdate": null,
        "parentOrderId": null,
        "childOrderId": null
      },
      {
        "id": 429924503,
        "timestamp": "2018-04-01T00:00:12Z",
        "instrument": "XMR-BTC",
        "side": "sell",
        "type": "limit",
        "status": "unfilledCancelled",
        "cancellationReason": null,
        "timeInForce": "GTC",
        "volume": 0.465514,
        "price": 0.025869,
        "stopPrice": null,
        "remainingVolume": 0.465514,
        "lastUpdate": null,
        "parentOrderId": null,
        "childOrderId": null
      },
      ...
    ]
    

    GET https://api.crex24.com/v2/trading/orderHistory

    Returns the list of trader’s orders with detailed information

    Parameters:

    Name Type Description
    instrument string Optional. Comma-separated list of trade instruments for which the information about orders is requested. If the parameter is not specified, the information about orders is provided for all instruments
    from datetime Optional. The start point of the time frame from which the information about orders should be collected
    till datetime Optional. The end point of the time frame from which the information about orders should be collected
    limit int Optional. Maximum number of results per call. Accepted values: 1 - 1000. If the parameter is not specified, the number of results is limited to 100

    Comments:

    If parameters from and till are not specified, the most recent orders are returned.

    If the value of parameter from is set, the set of orders after the specified date is returned.

    If the value of parameter till is set, the set of orders before the specified date is returned.

    If both the parameters - from and till - are specified, then either all orders from the time frame are returned, if their number doesn’t exceed the limit, or the latest orders from the time frame are returned otherwise.

    Response:

    Returns a JSON array of Order objects, each with the structure described in the section Order Placement

    Trade History

    GET https://api.crex24.com/v2/trading/tradeHistory
    

    The above request returns JSON structured like this:

    [
      {
        "id": 3005866,
        "orderId": 468533093,
        "timestamp": "2018-06-02T16:26:27Z",
        "instrument": "BCH-ETH",
        "side": "buy",
        "price": 1.78882,
        "volume": 0.027,
        "fee": 0.0000483,
        "feeCurrency": "ETH"
      },
      {
        "id": 3005812,
        "orderId": 468515771,
        "timestamp": "2018-06-02T16:16:05Z",
        "instrument": "ETC-BTC",
        "side": "sell",
        "price": 0.00210958,
        "volume": 0.05994006,
        "fee": -0.000000063224,
        "feeCurrency": "BTC"
      },
      ...
    ]
    
    GET https://api.crex24.com/v2/trading/tradeHistory?instrument=LTC-BTC
    

    The above request returns JSON structured like this:

    [
      {
        "id": 3005729,
        "orderId": 468529980,
        "timestamp": "2018-06-02T16:07:45Z",
        "instrument": "LTC-BTC",
        "side": "buy",
        "price": 0.0159865,
        "volume": 0.03235111,
        "fee": -0.000000258591,
        "feeCurrency": "BTC"
      },
      {
        "id": 3005663,
        "orderId": 468527248,
        "timestamp": "2018-06-02T15:57:41Z",
        "instrument": "LTC-BTC",
        "side": "buy",
        "price": 0.01595213,
        "volume": 0.0497125,
        "fee": -0.00000039651,
        "feeCurrency": "BTC"
      },
      ...
    ]
    
    GET https://api.crex24.com/v2/trading/tradeHistory?instrument=LTC-BTC&from=2018-03-15T09:00&till=2018-03-15T11:00
    

    The above request returns JSON structured like this:

    [
      {
        "id": 1939487,
        "orderId": 416476592,
        "timestamp": "2018-03-15T10:23:12Z",
        "instrument": "LTC-BTC",
        "side": "buy",
        "price": 0.0201,
        "volume": 0.02,
        "fee": 0.00002,
        "feeCurrency": "LTC"
      },
      {
        "id": 1939464,
        "orderId": 416442461,
        "timestamp": "2018-03-15T09:29:00Z",
        "instrument": "LTC-BTC",
        "side": "buy",
        "price": 0.0199,
        "volume": 0.017,
        "fee": 0.000017,
        "feeCurrency": "LTC"
      }
    ]
    

    GET https://api.crex24.com/v2/trading/tradeHistory

    Returns the list of trades with detailed information

    Parameters:

    Name Type Description
    instrument string Optional. Comma-separated list of trade instruments for which the information about trades is requested. If the parameter is not specified, the information about trades is provided for all instruments
    from datetime Optional. The start point of the time frame from which the information about trades should be collected
    till datetime Optional. The end point of the time frame from which the information about trades should be collected
    limit int Optional. Maximum number of results per call. Accepted values: 1 - 1000. If the parameter is not specified, the number of results is limited to 100

    Comments:

    If parameters from and till are not specified, the most recent trades are returned.

    If the value of parameter from is set, the set of trades after the specified date is returned.

    If the value of parameter till is set, the set of trades before the specified date is returned.

    If both the parameters - from and till - are specified, then either all trades from the time frame are returned, if their number doesn’t exceed the limit, or the latest trades from the time frame are returned otherwise.

    Response:

    Returns a JSON array of Trade objects, each with the following structure:

    Field Type Description
    id int Unique* trade identifier
    orderId int Identifier of the order that generated the trade
    timestamp datetime Date and time when the trade took place
    instrument string Trade instrument identifier
    side string Trade direction, can have either of the two values: "buy" or "sell"
    price decimal Price for which the base currency was bought or sold
    volume decimal Trade volume (the amount of base currency that was bought or sold)
    fee decimal The amount of fee charged (negative value means rebate)
    feeCurrency string Fee/rebate currency

    * If a user acts both as a buyer and a seller in the same trade, the response will contain two results for such trade - one with information for the buyer and the other with information for the seller - both with the same trade ID

    Trade Fee and Rebate

    GET https://api.crex24.com/v2/trading/tradeFee
    

    The above request returns JSON structured like this:

    {
      "makerFeeRate": -0.0001,
      "takerFeeRate": 0.001,
      "tradeVolume": 1.1201,
      "lastUpdate" : "2017-12-31T23:59:59Z"
    }
    

    GET https://api.crex24.com/v2/trading/tradeFee

    Returns information about trade commissions: market-taker fee and market-maker fee/rebate. Both values depend on trader’s 30-day trailing volume (expressed in BTC) and updated at least once every 24 hours. More about trade commissions in the Fees section of the website

    Parameters:

    None

    Response:

    Returns a JSON object with the following structure:

    Field Type Description
    makerFeeRate decimal Relative size of market-maker fee, e.g. the value 0.001 stands for a fee that amounts to 0.1% of the trade value (negative value means rebate)
    takerFeeRate decimal Relative size of market-taker fee, e.g. the value 0.001 stands for a fee that amounts to 0.1% of the trade value
    tradeVolume decimal Total volume of trades that took place over the last 30 days, expressed in BTC
    lastUpdate datetime Date and time when the values of trade fees and trailing 30-day volume were last updated

    Account

    Base URL: https://api.crex24.com/v2/account

    Balances

    GET https://api.crex24.com/v2/account/balance
    

    The above request returns JSON structured like this:

    [
      {
        "currency": "ALPS",
        "available": 0.0979,
        "reserved": 0.0
      },
      {
        "currency": "BCD",
        "available": 12.43897,
        "reserved": 0.0
      },
      {
        "currency": "BCH",
        "available": 1.3394,
        "reserved": 1.4013
      },
      ...
    ]
    
    GET https://api.crex24.com/v2/account/balance?currency=BBN,ETH&nonZeroOnly=false
    

    The above request returns JSON structured like this:

    [
      {
        "currency": "BBN",
        "available": 0.0,
        "reserved": 0.0
      },
      {
        "currency": "ETH",
        "available": 0.4778,
        "reserved": 3.5261
      }
    ]
    

    GET https://api.crex24.com/v2/account/balance

    Returns information about trader’s balances in different currencies

    Parameters:

    Name Type Description
    currency string Optional. Comma-separated list of currencies for which the balance information is requested. If the parameter is not specified, the balance information is requested for all currencies
    nonZeroOnly boolean Optional. Can have either of the two values:
    true - return only non-zero balances;
    false - return all balances.
    The default value is true

    Response:

    Returns a JSON array of objects, each with the following structure:

    Field Type Description
    currency string Currency identifier, e.g. "BTC"
    available decimal Available balance (funds that can be withdrawn or used for trading)
    reserved decimal Reserved balance (funds that are being used in active orders and, consequently, can’t be withdrawn or used elsewhere at the moment)

    Crypto Deposit Address

    GET https://api.crex24.com/v2/account/depositAddress?currency=BTC
    

    The above request returns JSON structured like this:

    {
      "currency": "BTC",
      "address": "5xF3EVqwOf53PLeU78iGJpbWz45qzPIfnd",
      "paymentId": null
    }
    
    GET https://api.crex24.com/v2/account/depositAddress?currency=BTS
    

    The above request returns JSON structured like this:

    {
      "currency": "BTS",
      "address": "crex24",
      "paymentId": "0fg4da4186741579"
    }
    

    GET https://api.crex24.com/v2/account/depositAddress

    Returns the address (and Payment ID, if necessary) for cryptocurrency deposit

    Parameters:

    Name Type Description
    currency string Identifier of the cryptocurrency, that you would like to deposit

    Response:

    Returns a JSON object with the following structure:

    Field Type Description
    currency string Cryptocurrency identifier
    address string Address of the wallet to send the cryptocurrency to
    paymentId string Additional information (Payment ID, Message or Memo) that should be specified when sending the deposit. If there’s no need to specify an additional information, the field contains the value null

    Money Transfer History

    GET https://api.crex24.com/v2/account/moneyTransfers
    

    The above request returns JSON structured like this:

    [
      {
        "id": 756446,
        "type": "deposit",
        "currency": "ETH",
        "address": "0x451d5a1b7519aa75164f440df78c74aac96023fe",
        "paymentId": null,
        "amount": 0.142,
        "fee": null,
        "txId": "0x2b49098749840a9482c4894be94f94864b498a1306b6874687a5640cc9871918",
        "createdAt": "2018-06-02T19:30:28Z",
        "processedAt": "2018-06-02T21:10:41Z",
        "confirmationsRequired": 12,
        "confirmationCount": 12,
        "status": "success",
        "errorDescription": null
      },
      {
        "id": 755417,
        "type": "deposit",
        "currency": "BTC",
        "address": "1Hre55iru4Gewk4ewYGUiyugh44rBYUGFB",
        "paymentId": null,
        "amount": 0.01,
        "fee": null,
        "txId": "74979a487960c987d7918ddfa74978a9717c0879877098e7809831084ff09874",
        "createdAt": "2018-06-02T17:39:56Z",
        "processedAt": "2018-06-02T17:45:12Z",
        "confirmationsRequired": 1,
        "confirmationCount": 1,
        "status": "success",
        "errorDescription": null
      },
      {
        "id": 754618,
        "type": "deposit",
        "currency": "BTC",
        "address": "1IgNfmERVcier4IhfGEfutkLfu4AcmeiUC",
        "paymentId": null,
        "amount": 0.09,
        "fee": null,
        "txId": "6876541687a9187e987c9187654f7198b9718af974641687b19a87987f91874f",
        "createdAt": "2018-06-02T16:19:44Z",
        "processedAt": "2018-06-02T16:20:50Z",
        "confirmationsRequired": 1,
        "confirmationCount": 1,
        "status": "success",
        "errorDescription": null
      },
      ...
    ]
    
    GET https://api.crex24.com/v2/account/moneyTransfers?currency=ETH
    

    The above request returns JSON structured like this:

    [
      {
        "id": 756446,
        "type": "deposit",
        "currency": "ETH",
        "address": "0x451d5a1b7519aa75164f440df78c74aac96023fe",
        "paymentId": null,
        "amount": 0.142,
        "fee": null,
        "txId": "0x2b49098749840a9482c4894be94f94864b498a1306b6874687a5640cc9871918",
        "createdAt": "2018-06-02T19:30:28Z",
        "processedAt": "2018-06-02T21:10:41Z",
        "confirmationsRequired": 12,
        "confirmationCount": 12,
        "status": "success",
        "errorDescription": null
      },
      {
        "id": 737551,
        "type": "withdrawal",
        "currency": "ETH",
        "address": "0x184189a9187c918ef91875641f9781a9187b75a7",
        "paymentId": "",
        "amount": 54.1,
        "fee": 0.005,
        "txId": "0x1983645416f16a16c1687643086f7c91767a9817b981765140c8176871fc79fa",
        "createdAt": "2018-06-01T06:48:32Z",
        "processedAt": "2018-06-01T07:12:15Z",
        "confirmationsRequired": 12,
        "confirmationCount": 12,
        "status": "success",
        "errorDescription": null
      }
    ]
    
    GET https://api.crex24.com/v2/account/moneyTransfers?currency=BTC&from=2018-06-02T15:00&till=2018-06-02T20:30
    

    The above request returns JSON structured like this:

    [
     {
        "id": 755417,
        "type": "deposit",
        "currency": "BTC",
        "address": "1Hre55iru4Gewk4ewYGUiyugh44rBYUGFB",
        "paymentId": null,
        "amount": 0.01,
        "fee": null,
        "txId": "74979a487960c987d7918ddfa74978a9717c0879877098e7809831084ff09874",
        "createdAt": "2018-06-02T17:39:56Z",
        "processedAt": "2018-06-02T17:45:12Z",
        "confirmationsRequired": 1,
        "confirmationCount": 1,
        "status": "success",
        "errorDescription": null
      },
      {
        "id": 754618,
        "type": "deposit",
        "currency": "BTC",
        "address": "1IgNfmERVcier4IhfGEfutkLfu4AcmeiUC",
        "paymentId": null,
        "amount": 0.09,
        "fee": null,
        "txId": "6876541687a9187e987c9187654f7198b9718af974641687b19a87987f91874f",
        "createdAt": "2018-06-02T16:19:44Z",
        "processedAt": "2018-06-02T16:20:50Z",
        "confirmationsRequired": 1,
        "confirmationCount": 1,
        "status": "success",
        "errorDescription": null
      }
    ]
    

    GET https://api.crex24.com/v2/account/moneyTransfers

    Returns information about deposits and withdrawals

    Parameters:

    Name Type Description
    type string Optional. Filters money transfers by type, can have either of the two values:
    "deposit" - get deposits only;
    "withdrawal" - get withdrawals only.
    If the parameter is not specified, both the deposits and withdrawals are returned
    currency string Optional. Comma-separated list of currencies for which the money transfer history is requested. If the parameter is not specified, the money transfers are returned for all currencies
    from datetime Optional. The start point of the time frame from which the money transfer history is collected
    till datetime Optional. The end point of the time frame from which the money transfer history is collected

    Comments:

    If parameters from and till are not specified, the most recent money transfers are returned.

    If the value of parameter from is set, the set of money transfers after the specified date is returned.

    If the value of parameter till is set, the set of money transfers before the specified date is returned.

    If both the parameters - from and till - are specified, then either all money transfers from the time frame are returned, if their number doesn’t exceed the limit, or the latest money transfers from the time frame are returned otherwise.

    Parameters from and till filter the results based on the value of createdAt field.

    Response:

    Returns a JSON array of MoneyTransfer objects, sorted from newest to oldest, each with the following structure:

    Field Type Description
    id int Unique identifier of money transfer
    type string Type of money transfer, can have either of the two values: "deposit" or "withdrawal"
    currency string Cryptocurrency identifier
    address string Cryptocurrency wallet address.
    In case of cryptocurrency deposit, this field contains the address of the CREX24 wallet associated with trader’s account.
    In case of cryptocurrency withdrawal, this field contains the address of external wallet, to which the money were transferred from trader’s account.
    For fiat deposits and withdrawals, this field contains the value null. The field also contains the value null for cryptocurrency deposits and withdrawals, if the information about the wallet address is unavailable
    paymentId string Additional information (such as Payment ID, Message, Memo, etc.) that was specified along with the wallet address.
    For fiat deposits and withdrawals, this field contains the value null. The field also contains the value null for cryptocurrency deposits and withdrawals, if such information is not unavailable
    amount decimal The amount of currency that was deposited or withdrawn
    fee decimal The amount of fee charged for money transfer. If this information is not available, the field contains the value null
    txId string Identifier of the transaction in the cryptocurrency blockchain.
    For fiat deposits and withdrawals, this field contains the value null. The field also contains the value null for cryptocurrency deposits and withdrawals, if the information about the transaction ID is unavailable
    createdAt datetime Date and time when the money transfer was initiated
    processedAt datetime Date and time when the money transfer was processed. If this information is not available or the money transfer hasn’t been processed yet, the field contains the value null
    confirmationsRequired int The number of blockchain confirmations the cryptocurrency deposit is required to receive before the funds are credited to the account, or the number of confirmations the cryptocurrency withdrawal is required to receive before it is considered successful.
    In case of fiat deposits and withdrawals, this field contains the value null
    confirmationCount int Current number of blockchain confirmations of the cryptocurrency deposit/withdrawal (in case of fiat deposits and withdrawals, the field contains the value null)
    status string Money transfer status, can have one of the following values:
    "pending" - transfer is in progress;
    "success" - completed successfully;
    "failed" - aborted at some point (money will be credited back to the account of origin)
    errorDescription string Error description (only for money transfers with status "failed", in other cases the field contains the value null)

    Money Transfer Status

    GET https://api.crex24.com/v2/trading/moneyTransferStatus?id=756446
    

    The above request returns JSON structured like this:

    [
      {
        "id": 756446,
        "type": "deposit",
        "currency": "ETH",
        "address": "0x451d5a1b7519aa75164f440df78c74aac96023fe",
        "paymentId": null,
        "amount": 0.142,
        "fee": null,
        "txId": "0x2b49098749840a9482c4894be94f94864b498a1306b6874687a5640cc9871918",
        "createdAt": "2018-06-02T19:30:28Z",
        "processedAt": "2018-06-02T21:10:41Z",
        "confirmationsRequired": 12,
        "confirmationCount": 12,
        "status": "success",
        "errorDescription": null
      }
    ]
    
    GET https://api.crex24.com/v2/trading/moneyTransferStatus?id=756446,737551
    

    The above request returns JSON structured like this:

    [
      {
        "id": 756446,
        "type": "deposit",
        "currency": "ETH",
        "address": "0x451d5a1b7519aa75164f440df78c74aac96023fe",
        "paymentId": null,
        "amount": 0.142,
        "fee": null,
        "txId": "0x2b49098749840a9482c4894be94f94864b498a1306b6874687a5640cc9871918",
        "createdAt": "2018-06-02T19:30:28Z",
        "processedAt": "2018-06-02T21:10:41Z",
        "confirmationsRequired": 12,
        "confirmationCount": 12,
        "status": "success",
        "errorDescription": null
      },
      {
        "id": 737551,
        "type": "withdrawal",
        "currency": "ETH",
        "address": "0x184189a9187c918ef91875641f9781a9187b75a7",
        "paymentId": "",
        "amount": 54.1,
        "fee": 0.005,
        "txId": "0x1983645416f16a16c1687643086f7c91767a9817b981765140c8176871fc79fa",
        "createdAt": "2018-06-01T06:48:32Z",
        "processedAt": "2018-06-01T07:12:15Z",
        "confirmationsRequired": 12,
        "confirmationCount": 12,
        "status": "success",
        "errorDescription": null
      }
    ]
    

    GET https://api.crex24.com/v2/trading/moneyTransferStatus

    Returns information about the specified money transfer(s)

    Parameters:

    Name Type Description
    id int Comma-separated list of identifiers of money transfers for which the detailed information is requested

    Response:

    Returns a JSON array of MoneyTransfer objects, each with the structure described in the section Money Transfer History

    Crypto Withdrawal Preview

    GET https://api.crex24.com/v2/account/previewWithdrawal?currency=BTC&amount=1.5
    

    The above request returns JSON structured like this:

    {
      "warning": null,
      "balanceDeduction": 1.5005,
      "fee": 0.0005,
      "payout": 1.5
    }
    
    GET https://api.crex24.com/v2/account/previewWithdrawal?currency=LTC&amount=10&includeFee=true
    

    The above request returns JSON structured like this:

    {
      "warning": null,
      "balanceDeduction": 10.0,
      "fee": 0.002,
      "payout": 9.998
    }
    
    GET https://api.crex24.com/v2/account/previewWithdrawal?currency=LTC&amount=10&includeFee=false
    

    The above request returns JSON structured like this:

    {
      "warning": null,
      "balanceDeduction": 10.002,
      "fee": 0.002,
      "payout": 10.0
    }
    

    GET https://api.crex24.com/v2/account/previewWithdrawal

    Allows previewing a cryptocurrency withdrawal without actually conducting it. Useful for estimating the size of non-flat withdrawal fee and ensuring that the withdrawal meets formal requirements

    Parameters:

    Name Type Description
    currency string The value of parameter currency that will be specified in the actual withdrawal request
    amount decimal The value of parameter amount that will be specified in the actual withdrawal request
    includeFee bool Optional. The value of parameter includeFee that will be specified in the actual withdrawal request

    Response:

    Returns a JSON object with the following structure:

    Field Type Description
    warning string If withdrawal meets formal requirements (minimum and maximum limits, withdrawal amount covers the fee, etc.), the field contains the value null, and the fields below provide a preview information for a withdrawal with the specified parameters.

    Otherwise this field contains a warning message indicating the source of the problem, and the fields below provide information for a substitute withdrawal that is close to the original one but would meet formal requirements. It is up to your software to decide whether to use the suggested modification of the withdrawal or not. An attempt to perform an actual withdrawal with the originally specified parameters will result in an error
    balanceDeduction decimal The total amount that will be debited from the account (subtracted from the balance), if the withdrawal is performed
    fee decimal The size of the fee that will be charged, if the withdrawal is performed
    payout decimal The amount that will be transferred to the specified address, if the withdrawal is performed

    Crypto Withdrawal

    POST https://api.crex24.com/v2/account/withdraw
    {
      "currency": "ETH",
      "amount": 54.1,
      "address": "0x184189a9187c918ef91875641f9781a9187b75a7"
    }
    

    The above request returns JSON structured like this:

    {
      "id": 737551,
      "type": "withdrawal",
      "currency": "ETH",
      "address": "0x184189a9187c918ef91875641f9781a9187b75a7",
      "paymentId": "",
      "amount": 54.1,
      "fee": 0.005,
      "txId": "0x1983645416f16a16c1687643086f7c91767a9817b981765140c8176871fc79fa",
      "createdAt": "2018-06-01T06:48:32Z",
      "processedAt": "2018-06-01T07:20:14Z",
      "confirmationsRequired": 12,
      "confirmationCount": 12,
      "status": "success",
      "errorDescription": null
    }
    

    POST https://api.crex24.com/v2/account/withdraw

    Withdraws certain amount of cryptocurrency from the account and sends it to the specified crypto address

    Parameters:

    Name Type Description
    currency string Currency identifier
    amount decimal Withdrawal amount (the precision is limited to a number of decimal places specified in the withdrawalPrecision field of the Currency, the value is rounded automatically to meet the precision limitation)
    address string Crypto address to which the money will be transferred
    paymentId string Optional. Additional information (such as Payment ID, Message, Memo, etc.) that specifies the destination of money transfer along with the address. If this information is not required or not supported by the cryptocurrency, the parameter should be omitted
    includeFee boolean Optional. Sets whether the specified amount includes fee, can have either of the two values:
    true - balance will be decreased by amount, whereas [amount - fee] will be transferred to the specified address;
    false - amount will be deposited to the specified address, whereas the balance will be decreased by [amount + fee].
    The default value is false

    Comments

    The total amount debited from the account in the result of withdrawal must be not less than the value of minWithdrawal field and not greater than the value of maxWithdrawal field of withdrawing Currency, otherwise the request will result in an error. You may find calling the method previewWithdrawal prior to performing an actual withdrawal useful as it provides assistance in planning the withdrawal and ensuring its conformity to the formal requirements.

    Response:

    Returns a JSON object MoneyTransfer. The structure of the object is described in the section Money Transfer History

    Authentication

    Authentication Keys and Access Rights

    Some parts of the API require authentication. In order to access them, you need to obtain an authentication key. You can generate one on the API keys tab of the account management page.

    Each authentication key contains a pair of credentials: public key (API key), that acts both as trader’s identifier and access token, and private key (Secret), that is used to sign API calls. It is important to keep the private key (Secret) confidential: it should not be disclosed to any third party, including the CREX24 customer support. On the contrary, public key (API key) is not confidential and may be shared with CREX24 support, if necessary.

    It is possible to generate multiple authentication keys, each having custom access rights associated with it. The following access permissions can be granted to an authentication key:

    You can temporary disable an authentication key or delete it completely at any time. It is recommended that you delete old authentication keys that are no longer in use.

    Authentication Process

    CREX Trade API 2.0 uses a custom HTTP scheme based on HMAC-SHA512 for authentication. A request to an authenticated endpoint should contain the following headers:

    Header Description
    X-CREX24-API-KEY Your public key (API key)
    X-CREX24-API-NONCE Arbitrary integer value that increases with each request (Nonce)
    X-CREX24-API-SIGN HMAC-generated request signature (Signature)

    X-CREX24-API-NONCE Header

    Nonce is a value that varies with each request. It serves the purpose of preventing replay attacks (i.e., when one of the previously sent valid requests is intercepted and fraudulently repeated by an attacker).

    The value of Nonce must be in the range from 1 to 18 446 744 073 709 551 615 (maximum unsigned 64-bit integer) and must be greater in each consecutive request than in the previous one. For instance, system time expressed in milliseconds elapsed since certain moment in the past may be used as Nonce.

    The value of previously used Nonce is stored on the server and can not be reset for security reasons. If you accidentally used too large number, you may have to delete an existing authentication key and generate a new one instead of it with the same access privileges. The same may apply to a situation when you would like to switch from one nonce-generation algorithm to another.

    X-CREX24-API-SIGN Header

    Request signature is a string generated by HMAC-SHA512 algorithm, it ensures that the request was sent by you and wasn’t modified by a 3rd party on the way.

    In order to sign the request, one should perform HMAC-SHA512 with the following parameters:

    Parameter Value
    Key Base64-decoded Secret
    Message The result of concatenation Path + Nonce + Body, where
    Path is a URL-path of the request with parameters, e.g. /v2/account/balance?currency=LTC,
    Body is a request body string that contains a JSON object with request parameters (in case of POST request) or omitted (in case of GET request)

    The result of HMAC-SHA512 execution is then Base64-encoded and passed in the request as a value of X-CREX24-API-SIGN header.

    Examples

    The following code samples demonstrate the process of sending GET and POST requests to authenticated endpoints:

    C# (GET)
    string baseUrl = "https://api.crex24.com";
    string apiKey = "-- Your API key --";
    string secret = "-- Your secret --";
    
    
    string path = "/v2/account/balance?currency=BTC";
    string nonce = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds().ToString();
    
    
    byte[] key = Convert.FromBase64String(secret);
    byte[] message = Encoding.UTF8.GetBytes(path + nonce);
    HMACSHA512 hmac = new HMACSHA512(key);
    string signature = Convert.ToBase64String(hmac.ComputeHash(message));
    
    
    WebRequest request = WebRequest.Create(baseUrl + path);
    request.Method = "GET";
    request.Headers.Add("X-CREX24-API-KEY", apiKey);
    request.Headers.Add("X-CREX24-API-NONCE", nonce);
    request.Headers.Add("X-CREX24-API-SIGN", signature);
    
    
    HttpWebResponse response;
    try
    {
        response = (HttpWebResponse)request.GetResponse();
    }
    catch (WebException exception)
    {
        response = (HttpWebResponse)exception.Response;
    }
    
    HttpStatusCode responseStatusCode = response.StatusCode;
    
    string responseBody;
    using (Stream stream = response.GetResponseStream())
        using (StreamReader streamReader = new StreamReader(stream))
            responseBody = streamReader.ReadToEnd();
    C# (POST)
    string baseUrl = "https://api.crex24.com";
    string apiKey = "-- Your API key --";
    string secret = "-- Your secret --";
    
    
    string path = "/v2/trading/placeOrder";
    string body = @"{
                        ""instrument"": ""ETH-BTC"",
                        ""side"": ""sell"",
                        ""volume"": 1,
                        ""price"": 12345.67
                    }";
    string nonce = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds().ToString();
    
    
    byte[] key = Convert.FromBase64String(secret);
    byte[] message = Encoding.UTF8.GetBytes(path + nonce + body);
    HMACSHA512 hmac = new HMACSHA512(key);
    string signature = Convert.ToBase64String(hmac.ComputeHash(message));
    
    
    WebRequest request = WebRequest.Create(baseUrl + path);
    request.Method = "POST";
    request.Headers.Add("X-CREX24-API-KEY", apiKey);
    request.Headers.Add("X-CREX24-API-NONCE", nonce);
    request.Headers.Add("X-CREX24-API-SIGN", signature);
    
    byte[] requestBody = Encoding.UTF8.GetBytes(body);
    request.ContentLength = requestBody.Length;
    using (Stream stream = request.GetRequestStream())
        stream.Write(requestBody, 0, requestBody.Length);
    
    
    HttpWebResponse response;
    try
    {
        response = (HttpWebResponse) request.GetResponse();
    }
    catch (WebException exception)
    {
        response = (HttpWebResponse) exception.Response;
    }
    
    HttpStatusCode responseStatusCode = response.StatusCode;
    
    string responseBody;
    using (Stream stream = response.GetResponseStream())
        using (StreamReader streamReader = new StreamReader(stream))
            responseBody = streamReader.ReadToEnd();
    NodeJS (GET)
    const crypto = require("crypto");
    const request = require("request");
    
    var baseUrl = "https://api.crex24.com";
    var apiKey = "-- Your API key --";
    var secret = "-- Your secret --";
    
    var path = "/v2/account/balance?currency=BTC";
    var nonce = Date.now();
    
    var key = Buffer(secret, "base64");
    var message = path + nonce;
    var hmac = crypto.createHmac("sha512", key);
    var signature = hmac.update(message).digest("base64");
    
    request({
            url: baseUrl + path,
            method: "GET",
            headers: {
                "X-CREX24-API-KEY": apiKey,
                "X-CREX24-API-NONCE": nonce,
                "X-CREX24-API-SIGN": signature
            }
        },
        function (error, response, body) {
            console.log("error:", error);
            console.log("statusCode:", response && response.statusCode);
            console.log("body:", body);
        }
    );
    NodeJS (POST)
    const crypto = require("crypto");
    const request = require("request");
    
    var baseUrl = "https://api.crex24.com";
    var apiKey = "-- Your API key --";
    var secret = "-- Your secret --";
    
    var path = "/v2/trading/placeOrder";
    var body = JSON.stringify({
        instrument: "ETH-BTC",
        side: "sell",
        volume: 1,
        price: 12345.67
    });
    var nonce = Date.now();
    
    var key = Buffer(secret, "base64");
    var message = path + nonce + body;
    var hmac = crypto.createHmac("sha512", key);
    var signature = hmac.update(message).digest('base64');
    
    request({
            url: baseUrl + path,
            method: "POST",
            headers: {
                "X-CREX24-API-KEY": apiKey,
                "X-CREX24-API-NONCE": nonce,
                "X-CREX24-API-SIGN": signature
            },
            body: body
        },
        function (error, response, body) {
            console.log("error:", error);
            console.log("statusCode:", response && response.statusCode);
            console.log("body:", body);
        }
    );
    PHP (GET)
    $baseUrl = 'https://api.crex24.com';
    $apiKey = '-- Your API key --';
    $secret = '-- Your secret --';
    
    $path = '/v2/account/balance?currency=BTC';
    $nonce = round(microtime(true) * 1000);
    
    $key = base64_decode($secret);
    $message = $path . $nonce;
    $signature = base64_encode(hash_hmac('sha512', $message, $key, true));
    
    $curl = curl_init($baseUrl . $path);
    curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'GET');
    curl_setopt($curl, CURLOPT_HTTPHEADER, [
        'X-CREX24-API-KEY:' . $apiKey,
        'X-CREX24-API-NONCE:' . $nonce,
        'X-CREX24-API-SIGN:' . $signature
    ]);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    
    $responseBody = curl_exec($curl);
    $responseStatusCode = curl_getinfo($curl, CURLINFO_RESPONSE_CODE);
    curl_close($curl);
    PHP (POST)
    $baseUrl = 'https://api.crex24.com';
    $apiKey = '-- Your API key --';
    $secret = '-- Your secret --';
    
    $path = '/v2/trading/placeOrder';
    $body = '{
        "instrument": "ETH-BTC",
        "side": "sell",
        "volume": 1,
        "price": 12345.67
    }';
    $nonce = round(microtime(true) * 1000);
    
    $key = base64_decode($secret);
    $message = $path . $nonce . $body;
    $signature = base64_encode(hash_hmac('sha512', $message, $key, true));
    
    $curl = curl_init($baseUrl . $path);
    curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
    curl_setopt($curl, CURLOPT_HTTPHEADER, [
        'Content-Length:' . strlen($body),
        'X-CREX24-API-KEY:' . $apiKey,
        'X-CREX24-API-NONCE:' . $nonce,
        'X-CREX24-API-SIGN:' . $signature
    ]);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $body);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    
    $responseBody = curl_exec($curl);
    $responseStatusCode = curl_getinfo($curl, CURLINFO_RESPONSE_CODE);
    curl_close($curl); 
    Python (GET)
    import datetime
    import base64
    import hmac
    from hashlib import sha512
    from urllib.request import urlopen, Request
    from urllib.error import HTTPError
    
    baseUrl = "https://api.crex24.com"
    apiKey = "-- Your API key --"
    secret = "-- Your secret --"
    
    path = "/v2/account/balance?currency=BTC"
    nonce = round(datetime.datetime.now().timestamp() * 1000)
    
    key = base64.b64decode(secret)
    message = str.encode(path + str(nonce), "utf-8")
    hmac = hmac.new(key, message, sha512)
    signature = base64.b64encode(hmac.digest()).decode()
    
    request = Request(baseUrl + path)
    request.method = "GET"
    request.add_header("X-CREX24-API-KEY", apiKey)
    request.add_header("X-CREX24-API-NONCE", nonce)
    request.add_header("X-CREX24-API-SIGN", signature)
    
    try:
        response = urlopen(request)
    except HTTPError as e:
        response = e
    
    status = response.getcode()
    body = bytes.decode(response.read())
    
    print("Status code: " + str(status))
    print(body)
    Python (POST)
    import datetime
    import base64
    import hmac
    import json
    from hashlib import sha512
    from urllib.request import urlopen, Request
    from urllib.error import HTTPError
    
    baseUrl = "https://api.crex24.com"
    apiKey = "-- Your API key --"
    secret = "-- Your secret --"
    
    path = "/v2/trading/placeOrder"
    body = json.dumps({
            "instrument": "ETH-BTC",
            "side": "sell",
            "volume": 1,
            "price": 12345.67
        }, separators=(',', ':'))
    nonce = round(datetime.datetime.now().timestamp() * 1000)
    
    key = base64.b64decode(secret)
    message = str.encode(path + str(nonce) + body, "utf-8")
    hmac = hmac.new(key, message, sha512)
    signature = base64.b64encode(hmac.digest()).decode()
    
    request = Request(baseUrl + path)
    request.method = "POST"
    request.data = str.encode(body, "utf-8")
    request.add_header("Content-Length", len(body))
    request.add_header("X-CREX24-API-KEY", apiKey)
    request.add_header("X-CREX24-API-NONCE", nonce)
    request.add_header("X-CREX24-API-SIGN", signature)
    
    try:
        response = urlopen(request)
    except HTTPError as e:
        response = e
    
    status = response.getcode()
    body = bytes.decode(response.read())
    
    print("Status code: " + str(status))
    print(body)

    Order Types

    Limit Order

    A limit order is an order to buy or sell a limited amount of a specified currency at a specified price or better. A buying order is executed at a price lower or equal to the specified, whereas a selling order is executed at a price higher or equal to the specified. Since the market doesn’t necessarily have the required amount of the currency to offer at the given price, a limit order is not guaranteed to execute.

    Main Parameters:

    Name Description
    Volume The amount of base currency that a trader would like to buy or sell
    Price The worst price for which the base currency should be bought or sold
    Time In Force (TIF) Sets the strategy that regulates how long an order should remain active before it is filled:
    • Good-Til-Cancelled (GTC) - order stays active until it is filled or cancelled
    • Immediate-Or-Cancel (IOC) - order must be filled (entirely or partially) immediately or it is cancelled
    • Fill-Or-Kill (FOK) - entire order must be filled immediately or it is cancelled

    Lifecycle:

    A newly created limit order has a status "submitting" until it has been processed. This status changes during the lifetime of an order and can have different values depending on the value of the parameter Time In Force.

    Good-Til-Cancelled (GTC) orders

    Once the order has been processed, its status can have either of the following values:

    Immediate-Or-Cancel (IOC) orders

    Once the order has been processed, its status can have either of the following values:

    Fill-Or-Kill (FOK) orders

    Once the order has been processed, its status can have either of the following values:

    Market Order

    A market order is an order to immediately buy or sell a limited amount of a specified currency at a current market price. The execution of the order starts from the best price available on the market and, if the order is not entirely filled by it, continues at the next best price and so on. If there’s not enough liquidity at the market to fill the order immediately, it is filled partially and the unfilled part is cancelled.

    Main Parameters:

    Name Description
    Volume The amount of base currency that a trader would like to buy or sell at a current market price

    Lifecycle:

    A newly created market order has a status "submitting" until it has been processed. Once the order has been processed, its status can have either of the following values:

    Stop-Limit Order

    A stop-limit order is an order that waits for the market price to reach a certain threshold (called the stop price) and when it happens, creates a new limit order with predefined characteristics. A buying stop-limit order is triggered when the market price becomes equal to or greater than the stop price, whereas a selling stop-limit order is triggered when the market price becomes equal to or less than the stop price.

    Main Parameters:

    Name Description
    Stop Price The price at which the order is triggered and a new limit order with predefined characteristics is placed
    Volume Predefined volume of the new limit order (see the Limit Order section of documentation)
    Price Predefined price of the new limit order (see the Limit Order section of documentation)
    Time In Force (TIF) Predefined TIF of the new limit order (see the Limit Order section of documentation)

    Lifecycle:

    A newly created stop-limit order has a status "submitting" until it has been processed. Once the order has been processed, its status can have either of the following values:

    Handling Errors

    GET https://api.crex24.com/v2/public/currencies?filter=ASDFASDF
    

    The above request executes with code 400 and returns JSON structured like this:

    {
      "errorDescription":"Parameter 'filter' contains invalid value."
    }
    
    GET https://api.crex24.com/v2/public/recentTrades
    

    The above request executes with code 400 and returns JSON structured like this:

    {
      "errorDescription":"Mandatory parameter 'instrument' is missing."
    }
    
    GET https://api.crex24.com/v2/trading/tradeHistory?from=2018-04&till=2018-03
    

    The above request executes with code 400 and returns JSON structured like this:

    {
      "errorDescription":"The value of parameter 'till' must be greater than or equal to the value of parameter 'from'."
    }
    

    Successfully executed API calls return the HTTP status-code 200 OK.

    Failed API calls return one of the following status-codes:

    Status-code Description
    400 Bad Request Request is incorrect, for more information see the error description in the response
    401 Unauthorized Method requires authentication, but the request either doesn’t contain the authentication data or the authentication data is not valid. For more information see the error description in the response.
    More about the process of authentication in the corresponding section of documentation
    403 Forbidden Token used for authentication is either disabled or doesn’t have the necessary rights. For more information see the error description in the response.
    More about managing authentication keys in the section Authentication Keys and Access Rights
    429 Too Many Requests The request rate quota is exceeded. Cut down the number of requests per second or contact the support to have your personal request rate limit raised
    500 Internal Server Error Internal server error. Try sending the request again later
    503 Service Unavailable Server is temporarily unavailable due to maintenance works
    504 Gateway Timeout Server response timeout exceeded. Check the internet connection and try sending the request again later

    In case of an error with HTTP code 400, 401, 403 or 429, a JSON object with the following structure is returned:

    Name Type Description
    errorDescription string Information about the source of the error