We've detected that you're using a small display. Want to switch to the mobile version of the site?
  • Sign in or Create an Account to start trading.
    • ALERT:
      Dismiss this Alert
      There are no new alerts.
      Posted by Poloniex Team on 2018-05-25 19:34:48

API Documentation

Examples

PHP wrapper by compcentral: http://pastebin.com/iuezwGRZ

Python wrapper by oipminer: http://pastebin.com/fbkheaRb

Changelog

: New order status trading API method added.

: New account notifications channel added.

Table of Contents

General

Introduction

Poloniex supports a few different API methods. Poloniex provides a websocket API for receiving push notifications about the public order book, and your private account. There are two classes of REST endpoints: a public API for retrieving informations about the order book, and a trading API for placing orders. Finally, there is a deprecated API described in https://poloniex.com/support/api/v1/ using the WAMP protocol and autobahn. This method has been deprecated.

Authentication

To use private endpoints such as the account notifications channel, or the trading API, you will need to create an API key. Private endpoints require a nonce, which must be an integer greater than the previous nonce used. There is no requirement that nonces increase by a specific amount, so the current epoch time in milliseconds is an easy choice. Note that each API key has its own nonce tracking.

Websockets

Introduction

All websockets data uses the following URL:

wss://api2.poloniex.com

They can be read by any standard websockets library. Websockets data is organized into channels to which an API client may subscribe.

Requests and Responses

There are two type of requests supported; subscribe and unsubscribe. The requests are for a specific channel. For non-book requests, the first response is always an acknowledgement of the request. All channel updates are of the following format

[<channel>, <sequence id>, <update data...>]

<sequence id> is a number increasing by one with each update and is unique within its channel. The sequence-id is always null for non-book channels.

Subscribing and Unsubscribing

To receive updates from a channel you must subscribe to it. To subscribe to a public channel (all except the account notifications channel), determine its channel ID (provided with the description of each channel, and summarized here), send a JSON message with the following properties:

{
  "command": "subscribe",
  "channel": "<channel id>"
}

To subscribe to a private channel, the parameters described in the authentication section are required in the subscription message. Just like the trading API, an integer nonce must be chosen that is greater than the previous nonce used; for this purpose the current epoch time in milliseconds is a reasonable choice. Note that each API key has its own nonce tracking. If the chosen nonce is 1234, provide a "payload" parameter consisting of nonce=1234, a "key" parameter with your API key, and a "sign" parameter with the HMAC-SHA512 signature of the payload signed by your secret:

{
  "command": "subscribe",
  "channel": "<channel id>",
  "key": "<your API key>",
  "payload": "nonce=<epoch ms>",
  "sign": "<hmac_sha512(secret).update("nonce=<epoch ms>").hexdigest()>"
}
In all cases the first message will be an acknowledgement of the subscription:
[<channel id>, 1]
To unsubscribe, send an unsubscribe message with the channel ID:
{
  "command": "unsubscribe",
  "channel": <channel id>
}

Channel Descriptions

The following <channel ids> are supported:

Additionally, as described below, each market has its own aggregated book channel.

Account Notifications (Beta)

Before using this channel, please be aware that it is a beta feature. We will not make breaking API changes, but we may undertake changes such as adding extra data fields to the ends of arrays, or adding new message types. Your code should be tolerant of this. We have made all reasonable efforts to ensure its correctness, but you use this channel at your own risk during the beta phase.

The account notifications channel (id 1000) provides real-time updates of trade and balance changes on your account. You can (and should) use it to track your account's trading activity (instead of relying on repeated calls to the trading API). It is an authenticated websocket endpoint, so subscribing to it requires the parameters discussed in the subscribing section:

{
  "command": "subscribe",
  "channel": "1000",
  "key": "<your API key>",
  "payload": "nonce=<epoch ms>",
  "sign": "<hmac_sha512(secret).update("nonce=<epoch ms>").hexdigest()>"
}

The first message is acknowledgement of the subscription.

[1000, 1]

Subsequent messages represent updates to your account. In general, a message consists of a combination of updates of different types. Each update is an array of data, where the first element is a character denoting the type of the update, and subsequent elements are various parameters:

[
  1000,
  null,
  [
    ["b", DATA_1, DATA_2, DATA_3],
    ["n", DATA_1, DATA_2, DATA_3, DATA_4, DATA_5, DATA_6]
  ]
]

A given message may contain multiple updates, multiple types of updates, and multiple updates of the same type. There is no ordering guarantee of update types within a single message. Effectively, each message is a record of all of the changes to your account induced by a single action. There are four types of updates, as described below:

As mentioned above, a single logical action may cause a message with multiple updates. For instance, placing a limit order to buy ETH using BTC, which is immediately partially fulfilled, will cause a update with 4 updates: a b update with a positive ETH balance update (the ETH that was immediately bought), a b update with a negative BTC balance update (the BTC removed from the user's funds to pay for the ETH), a t update representing the trade in which the order was partially fulfilled, and an n update with the new limit order for the rest of the requested ETH.

Note that many actions do not have explicit notification types, but rather are represented by the underlying trade and balance changes:

  • Stop-limit orders immediately cause a b notification (that the appropriate balance has been decremented to reserve an asset for the limit order). When they are triggered they cause notifications comensurate with a standard limit order being placed (n or t updates depending on whether the limit was immediately fulfilled).
  • Margin liquidations cause a notification with t updates for whatever trades were performed during the liquidiation, and b updates for the m (margin) wallet balance changes.
  • Accepted loan offers cause a notification with b updates for the resulting l (lending) wallet balance changes.

There are currently not any notifications of transfers between wallets initiated via the transfers page or the transferBalance trading API call.

Ticker Data

Subscribe to ticker updates for all currency pairs.

Subscription example

{
  "command": "subscribe",
  "channel": 1002
}

The first message is acknowledgement of the subscription.

[<id>, 1]

Subsequent messages are ticker updates.

[
  <id>,
  null,
  [
    <currency pair id>,
    "<last trade price>",
    "<lowest ask>",
    "<highest bid>",
    "<percent change in last 24 hours>",
    "<base currency volume in last 24 hours>",
    "<quote currency volume in last 24 hours>",
    <is frozen>,
    "<highest trade price in last 24 hours>",
    "<lowest trade price in last 24 hours>"
  ],
   …
]

For example:

[
  1002,
  null,
  [
    149,
    "382.98901522",
    "381.99755898",
    "379.41296309",
    "-0.04312950",
    "14969820.94951828",
    "38859.58435407",
    0,
    "412.25844455",
    "364.56122072"
  ]
]

<currency pair id> is from the currency pair ID list.

24 Hour Exchange Volume

Subscribe to 24 hour exchange volume statistics. Updates are sent every 20 seconds.

Subscription example for exchange volume

{
  "command": "subscribe",
  "channel": 1003
}

The first response is acknowledgement of subscription

[<channel id>, 1]

For example:

[1003, 1]

Subsequent responses are exchange volume update sent every 20 seconds. Base currencies are BTC, ETH, XMR, USDT

[
  <channel id>,
  null,
  [
    "<time as YYYY-MM-DD HH:SS>",
    "<number of users online>",
    {
      "<base currency>": "<24 hours volume>",
      …
    }
  ]
]

For example

[
  1003,
  null,
  [
    "2018-09-30 21:33",
    8592,
    {
      "BTC": "6482.518",
      "ETH": "1315.332",
      "XMR": "179.914",
      "USDT": "42935638.731",
      "USDC": "76034823.390"
    }
  ]
]

Heartbeats

When no messages have been sent out for one second, the server will send a heartbeat message as follows. Absence of heartbeats indicates a protocol or networking issue and the client application is expected to close the socket and try again.

[1010]

Price Aggregated Book

Subscribe to price aggregated depth of book by currency pair. Response includes an initial book snapshot, book modifications, and trades. Book modification updates with 0 quantity should be treated as removal of the price level. Note that the updates are price aggregated and do not contain individual orders.

Subscription example for BTC_BTS pair (id is 14). You can either subscribe using the currency pair ID or name. Currency pair IDs are listed in the currency pair ID list.

{
  "command":"subscribe",
  "channel": 14
}

Or

{
  "command": "subscribe",
  "channel": "BTC_BTS"
}

The first response is the initial dump of the book

[
  <channel id>,
  <sequence number>,
  [
    [
      "i",
      {
        "currencyPair": "<currency pair name>",
        "orderBook": [
          {
            "<lowest ask price>": "<lowest ask size>",
            "<next ask price>": "<next ask size>",
            …
          },
          {
            "<highest bid price>": "<highest bid size>",
            "<next bid price>": "<next bid size>",
            …
          }
        ]
      }
    ]
  ]
]

For example:

[
  14,
  8767,
  [
    [
      "i",
      {
        "currencyPair": "BTC_BTS",
        "orderBook": [
          {
            "0.00001853": "2537.5637",
            "0.00001854": "1567238.172367"
          },
          {
            "0.00001841": "3645.3647",
            "0.00001840": "1637.3647"
          }
        ]
      }
    ]
  ]
]

Subsequent responses are updates to the book and trades

[
  <channel id>,
  <sequence number>,
  [
    ["o", <1 for buy 0 for sell>, "<price>", "<size>"],
    ["o", <1 for buy 0 for sell>, "<price>", "<size>"],
    ["t", "<trade id>", <1 for buy 0 for sell>, "<size>", "<price>", <timestamp>]
  ]
  …
]

For example

[
  14,
  8768,
  [
    ["o", 1, "0.00001823", "5534.6474"],
    ["o", 0, "0.00001824", "6575.464"],
    ["t", "42706057", 1, "0.05567134", "0.00181421", 1522877119]
  ]
]

REST Endpoints

Public API Methods

Please note that making more than 6 calls per second to the public API, or repeatedly and needlessly fetching excessive amounts of data, can result in your IP being banned.

There are six public methods, all of which take HTTP GET requests and return output in JSON format:

Trading API Methods

Please note that there is a default limit of 6 calls per second. If you require more than this, please consider optimizing your application using the push API, the "moveOrder" command, or the "all" parameter where appropriate. If this is still insufficient, please contact support to discuss a limit raise.

All calls to the trading API are sent via HTTP POST to https://poloniex.com/tradingApi and must contain the following headers:

  • Key - Your API key.
  • Sign - The query's POST data signed by your key's "secret" according to the HMAC-SHA512 method.

Additionally, all queries must include a "nonce" POST parameter. The nonce parameter is an integer which must always be greater than the previous nonce used.

All responses from the trading API are in JSON format. In the event of an error, the response will always be of the following format:

{
  "error": "<error message>"
}

There are several methods accepted by the trading API, each of which is specified by the "command" POST parameter:

  • returnBalances

    Returns all of your available balances. Sample output:

    {
      "BTC": "0.59098578",
      "LTC": "3.31117268",
      ...
    }
  • returnCompleteBalances

    Returns all of your balances, including available balance, balance on orders, and the estimated BTC value of your balance. By default, this call is limited to your exchange account; set the "account" POST parameter to "all" to include your margin and lending accounts. Sample output:

    {
      "LTC": {
        "available": "5.015",
        "onOrders": "1.0025",
        "btcValue": "0.078"
      },
      "NXT: {
        ...
      }
      ...
    }
  • returnDepositAddresses

    Returns all of your deposit addresses. Sample output:

    {
      "BTC": "19YqztHmspv2egyD6jQM3yn81x5t5krVdJ",
      "LTC": "LPgf9kjv9H1Vuh4XSaKhzBe8JHdou1WgUB",
      ...
      "ITC": "Press Generate.."
      ...
    }
  • generateNewAddress

    Generates a new deposit address for the currency specified by the "currency" POST parameter. Sample output:

    {
      "success": 1,
      "response": "CKXbbs8FAVbtEa397gJHSutmrdrBrhUMxe"
    }

    Only one address per currency per day may be generated, and a new address may not be generated before the previously-generated one has been used.

  • returnDepositsWithdrawals

    Returns your deposit and withdrawal history within a range, specified by the "start" and "end" POST parameters, both of which should be given as UNIX timestamps. Sample output:

    {
      "deposits": [
        {
          "currency": "BTC",
          "address": "...",
          "amount": "0.01006132",
          "confirmations": 10,
          "txid": "17f819a91369a9ff6c4a34216d434597cfc1b4a3d0489b46bd6f924137a47701",
          "timestamp": 1399305798,
          "status": "COMPLETE"
        },
        {
          "currency": "BTC",
          "address": "...",
          "amount": "0.00404104",
          "confirmations":10,
          "txid": "7acb90965b252e55a894b535ef0b0b65f45821f2899e4a379d3e43799604695c",
          "timestamp": 1399245916,
          "status": "COMPLETE"
        }
      ],
      "withdrawals": [
        {
          "withdrawalNumber": 134933,
          "currency": "BTC",
          "address": "1N2i5n8DwTGzUq2Vmn9TUL8J1vdr1XBDFg",
          "amount": "5.00010000",
          "timestamp": 1399267904,
          "status": "COMPLETE: 36e483efa6aff9fd53a235177579d98451c4eb237c210e66cd2b9a2d4a988f8e",
          "ipAddress": "..."
        }
      ]
    }
  • returnOpenOrders

    Returns your open orders for a given market, specified by the "currencyPair" POST parameter, e.g. "BTC_XCP". Set "currencyPair" to "all" to return open orders for all markets. Sample output for single market:

    [
      {
        "orderNumber": "120466",
        "type": "sell",
        "rate": "0.025",
        "amount": "100",
        "total": "2.5"
      },
      {
        "orderNumber": "120467",
        "type": "sell",
        "rate": "0.04",
        "amount": "100",
        "total": "4"
      },
      ...
    ]

    Or, for all markets:

    {
      "BTC_1CR": [],
      "BTC_AC": [
        {
          "orderNumber": "120466",
          "type": "sell",
          "rate": "0.025",
          "amount": "100",
          "total": "2.5"
        },
        {
          "orderNumber": "120467",
          "type": "sell",
          "rate": "0.04",
          "amount": "100",
          "total": "4"
        }
      ],
      ...
    }
  • returnTradeHistory

    Returns your trade history for a given market, specified by the "currencyPair" POST parameter. You may specify "all" as the currencyPair to receive your trade history for all markets. You may optionally specify a range via "start" and/or "end" POST parameters, given in UNIX timestamp format; if you do not specify a range, it will be limited to one day. You may optionally limit the number of entries returned using the "limit" parameter, up to a maximum of 10,000. If the "limit" parameter is not specified, no more than 500 entries will be returned. Sample output:

    [
      {
        "globalTradeID": 25129732,
        "tradeID": "6325758",
        "date": "2016-04-05 08:08:40",
        "rate": "0.02565498",
        "amount": "0.10000000",
        "total": "0.00256549",
        "fee": "0.00200000",
        "orderNumber": "34225313575",
        "type": "sell",
        "category": "exchange"
      },
      {
        "globalTradeID": 25129628,
        "tradeID": "6325741",
        "date": "2016-04-05 08:07:55",
        "rate": "0.02565499",
        "amount": "0.10000000",
        "total": "0.00256549",
        "fee": "0.00200000",
        "orderNumber": "34225195693",
        "type": "buy",
        "category": "exchange"
      },
      ...
    ]

    Or, for all markets:

    {
      "BTC_MAID": [
        {
          "globalTradeID": 29251512,
          "tradeID": "1385888",
          "date": "2016-05-03 01:29:55",
          "rate": "0.00014243",
          "amount": "353.74692925",
          "total": "0.05038417",
          "fee": "0.00200000",
          "orderNumber": "12603322113",
          "type": "buy",
          "category": "settlement"
        },
        {
          "globalTradeID": 29251511,
          "tradeID": "1385887",
          "date": "2016-05-03 01:29:55",
          "rate": "0.00014111",
          "amount": "311.24262497",
          "total": "0.04391944",
          "fee": "0.00200000",
          "orderNumber": "12603319116",
          "type": "sell",
          "category": "marginTrade"
        },
        ...
      ],
      "BTC_LTC": [
        ...
      ]
      ...
    }
  • returnOrderTrades

    Returns all trades involving a given order, specified by the "orderNumber" POST parameter. If no trades for the order have occurred or you specify an order that does not belong to you, you will receive an error. See the documentation here for how to use the information from returnOrderTrades and returnOrderStatus to determine various status information about an order. Sample output of returnOrderTrades:

    [
      {
        "globalTradeID": 20825863,
        "tradeID": 147142,
        "currencyPair": "BTC_XVC",
        "type": "buy",
        "rate": "0.00018500",
        "amount": "455.34206390",
        "total": "0.08423828",
        "fee": "0.00200000",
        "date": "2016-03-14 01:04:36"
      },
      ...
    ]
  • returnOrderStatus

    Returns the status of a given order, specified by the "orderNumber" POST parameter. If the specified orderNumber is not open, or it is not yours, you will receive an error. Sample output on a fully open order:

    {
      "result": {
        "6071071": {
          "status": "Open",
          "rate": "0.40000000",
          "amount": "1.00000000",
          "currencyPair": "BTC_ETH",
          "date": "2018-09-24 17:04:50",
          "total": "0.40000000",
          "type": "buy",
          "startingAmount": "1.00000000"
        }
      },
      "success": 1
    }

    Sample output on a partially filled order:

    {
      "result": {
        "6071071": {
          "status": "Partially filled",
          "rate": "0.40000000",
          "amount": "0.80000000",
          "currencyPair": "BTC_ETH",
          "date": "2018-09-24 17:51:15",
          "total": "0.32000000",
          "type": "buy",
          "startingAmount": "1.00000000"
        }
      },
      "success": 1
    }

    Note that returnOrderStatus, in concert with returnOrderTrades, can be used to determine various status information about an order:

  • buy

    Places a limit buy order in a given market. Required POST parameters are "currencyPair", "rate", and "amount". If successful, the method will return the order number. Sample output:

    {
      "orderNumber": 31226040,
      "resultingTrades": [
        {
          "amount": "338.8732",
          "date": "2014-10-18 23:03:21",
          "rate": "0.00000173",
          "total": "0.00058625",
          "tradeID": "16164",
          "type":"buy"
        }
      ]
    }

    You may optionally set "fillOrKill", "immediateOrCancel", "postOnly" to 1. A fill-or-kill order will either fill in its entirety or be completely aborted. An immediate-or-cancel order can be partially or completely filled, but any portion of the order that cannot be filled immediately will be canceled rather than left on the order book. A post-only order will only be placed if no portion of it fills immediately; this guarantees you will never pay the taker fee on any part of the order that fills.

  • sell

    Places a sell order in a given market. Parameters and output are the same as for the buy method.

  • cancelOrder

    Cancels an order you have placed in a given market. Required POST parameter is "orderNumber". If successful, the method will return:

    {
      "success": 1
    }
  • moveOrder

    Cancels an order and places a new one of the same type in a single atomic transaction, meaning either both operations will succeed or both will fail. Required POST parameters are "orderNumber" and "rate"; you may optionally specify "amount" if you wish to change the amount of the new order. "postOnly" or "immediateOrCancel" may be specified for exchange orders, but will have no effect on margin orders. Sample output:

    {
      "success": 1,
      "orderNumber": "239574176",
      "resultingTrades": {
        "BTC_BTS": []
      }
    }
  • withdraw

    Immediately places a withdrawal for a given currency, with no email confirmation. In order to use this method, the withdrawal privilege must be enabled for your API key. Required POST parameters are "currency", "amount", and "address". For XMR withdrawals, you may optionally specify "paymentId". Sample output:

    {
      "response": "Withdrew 2398 NXT."
    }
  • returnFeeInfo

    If you are enrolled in the maker-taker fee schedule, returns your current trading fees and trailing 30-day volume in BTC. This information is updated once every 24 hours.

    {
      "makerFee": "0.00140000",
      "takerFee": "0.00240000",
      "thirtyDayVolume": "612.00248891",
      "nextTier": "1200.00000000"
    }
  • returnAvailableAccountBalances

    Returns your balances sorted by account. You may optionally specify the "account" POST parameter if you wish to fetch only the balances of one account. Please note that balances in your margin account may not be accessible if you have any open margin positions or orders. Sample output:

    {
      "exchange": {
        "BTC": "1.19042859",
        "BTM": "386.52379392",
        "CHA": "0.50000000",
        "DASH": "120.00000000",
        "STR": "3205.32958001",
        "VNL": "9673.22570147"
      },
      "margin": {
        "BTC": "3.90015637",
        "DASH": "250.00238240",
        "XMR": "497.12028113"
      },
      "lending": {
        "DASH": "0.01174765",
        "LTC": "11.99936230"
      }
    }
  • returnTradableBalances

    Returns your current tradable balances for each currency in each market for which margin trading is enabled. Please note that these balances may vary continually with market conditions. Sample output:

    {
      "BTC_DASH": {
        "BTC": "8.50274777",
        "DASH": "654.05752077"
      },
      "BTC_LTC": {
        "BTC": "8.50274777",
        "LTC": "1214.67825290"
      },
      "BTC_XMR": {
        "BTC": "8.50274777",
        "XMR": "3696.84685650"
      }
    }
  • transferBalance

    Transfers funds from one account to another (e.g. from your exchange account to your margin account). Required POST parameters are "currency", "amount", "fromAccount", and "toAccount". Sample output:

    {
      "success": 1,
      "message": "Transferred 2 BTC from exchange to margin account."
    }
  • returnMarginAccountSummary

    Returns a summary of your entire margin account. This is the same information you will find in the Margin Account section of the Margin Trading page, under the Markets list. Sample output:

    {
      "totalValue": "0.00346561",
      "pl": "-0.00001220",
      "lendingFees": "0.00000000",
      "netValue": "0.00345341",
      "totalBorrowedValue": "0.00123220",
      "currentMargin": "2.80263755"
    }
  • marginBuy

    Places a margin buy order in a given market. Required POST parameters are "currencyPair", "rate", and "amount". You may optionally specify a maximum lending rate using the "lendingRate" parameter. If successful, the method will return the order number and any trades immediately resulting from your order. Sample output:

    {
      "success": 1,
      "message": "Margin order placed.",
      "orderNumber": "154407998",
      "resultingTrades": {
        "BTC_DASH": [
          {
            "amount": "1.00000000",
            "date": "2015-05-10 22:47:05",
            "rate": "0.01383692",
            "total": "0.01383692",
            "tradeID": "1213556",
            "type": "buy"
          }
        ]
      }
    }
  • marginSell

    Places a margin sell order in a given market. Parameters and output are the same as for the marginBuy method.

  • getMarginPosition

    Returns information about your margin position in a given market, specified by the "currencyPair" POST parameter. You may set "currencyPair" to "all" if you wish to fetch all of your margin positions at once. If you have no margin position in the specified market, "type" will be set to "none". "liquidationPrice" is an estimate, and does not necessarily represent the price at which an actual forced liquidation will occur. If you have no liquidation price, the value will be -1. Sample output:

    {
      "amount": "40.94717831",
      "total": "-0.09671314",
      ""basePrice": "0.00236190",
      "liquidationPrice": -1,
      "pl": "-0.00058655",
      "lendingFees": "-0.00000038",
      "type": "long"
    }
  • closeMarginPosition

    Closes your margin position in a given market (specified by the "currencyPair" POST parameter) using a market order. This call will also return success if you do not have an open position in the specified market. Sample output:

    {
      "success": 1,
      "message": "Successfully closed margin position.",
      "resultingTrades": {
        "BTC_XMR": [
          {
            "amount": "7.09215901",
            "date": "2015-05-10 22:38:49",
            "rate": "0.00235337",
            "total": "0.01669047",
            "tradeID": "1213346",
            "type": "sell"
          },
          {
            "amount": "24.00289920",
            "date": "2015-05-10 22:38:49",
            "rate": "0.00235321",
            "total": "0.05648386",
            "tradeID": "1213347",
            "type": "sell"
          }
        ]
      }
    }
  • createLoanOffer

    Creates a loan offer for a given currency. Required POST parameters are "currency", "amount", "duration", "autoRenew" (0 or 1), and "lendingRate". Sample output:

    {
      "success": 1,
      "message": "Loan order placed.",
      "orderID": 10590
    }
  • cancelLoanOffer

    Cancels a loan offer specified by the "orderNumber" POST parameter. Sample output:

    {
      "success": 1,
      "message": "Loan offer canceled."
    }
  • returnOpenLoanOffers

    Returns your open loan offers for each currency. Sample output:

    {
      "BTC": [
        {
          "id": 10595,
          "rate": "0.00020000",
          "amount": "3.00000000",
          "duration": 2,
          "autoRenew": 1,
          "date": "2015-05-10 23:33:50"
        }
      ],
      "LTC": [
        {
          "id": 10598,
          "rate": "0.00002100",
          "amount": "10.00000000",
          "duration": 2,
          "autoRenew": 1,
          "date": "2015-05-10 23:34:35"
        }
      ]
    }
  • returnActiveLoans

    Returns your active loans for each currency. Sample output:

    {
      "provided": [
        {
          "id": 75073,
          "currency": "LTC",
          "rate": "0.00020000",
          "amount": "0.72234880",
          "range": 2,
          "autoRenew": 0,
          "date": "2015-05-10 23:45:05",
          "fees": "0.00006000"
        },
        {
          "id": 74961,
          "currency": "LTC",
          "rate": "0.00002000",
          "amount": "4.43860711",
          "range": 2,
          "autoRenew": 0,
          "date": "2015-05-10 23:45:05",
          "fees": "0.00006000"
        }
      ],
      "used":[
        {
          "id": 75238,
          "currency": "BTC",
          "rate": "0.00020000",
          "amount": "0.04843834",
          "range": 2,
          "date": "2015-05-10 23:51:12",
          "fees": "-0.00000001"
        }
      ]
    }
  • returnLendingHistory

    Returns your lending history within a time range specified by the "start" and "end" POST parameters as UNIX timestamps. "limit" may also be specified to limit the number of rows returned. Sample output:

    [
      {
        "id": 175589553,
        "currency": "BTC",
        "rate": "0.00057400",
        "amount": "0.04374404",
        "duration": "0.47610000",
        "interest": "0.00001196",
        "fee": "-0.00000179",
        "earned": "0.00001017",
        "open": "2016-09-28 06:47:26",
        "close": "2016-09-28 18:13:03"
      }
    ]
  • toggleAutoRenew

    Toggles the autoRenew setting on an active loan, specified by the "orderNumber" POST parameter. If successful, "message" will indicate the new autoRenew setting. Sample output:

    {
      "success": 1,
      "message": 0
    }

Reference

Currencies

This is a list of currency IDs. They are used in b messages in the account notifications websockets channel, and can also be retrieved using the returnCurrencies REST call.

1 1CR
2 ABY
3 AC
4 ACH
5 ADN
6 AEON
7 AERO
8 AIR
9 APH
10 AUR
11 AXIS
12 BALLS
13 BANK
14 BBL
15 BBR
16 BCC
17 BCN
18 BDC
19 BDG
20 BELA
21 BITS
22 BLK
23 BLOCK
24 BLU
25 BNS
26 BONES
27 BOST
28 BTC
29 BTCD
30 BTCS
31 BTM
32 BTS
33 BURN
34 BURST
35 C2
36 CACH
37 CAI
38 CC
39 CCN
40 CGA
41 CHA
42 CINNI
43 CLAM
44 CNL
45 CNMT
46 CNOTE
47 COMM
48 CON
49 CORG
50 CRYPT
51 CURE
52 CYC
53 DGB
54 DICE
55 DIEM
56 DIME
57 DIS
58 DNS
59 DOGE
60 DASH
61 DRKC
62 DRM
63 DSH
64 DVK
65 EAC
66 EBT
67 ECC
68 EFL
69 EMC2
70 EMO
71 ENC
72 eTOK
73 EXE
74 FAC
75 FCN
76 FIBRE
77 FLAP
78 FLDC
79 FLT
80 FOX
81 FRAC
82 FRK
83 FRQ
84 FVZ
85 FZ
86 FZN
87 GAP
88 GDN
89 GEMZ
90 GEO
91 GIAR
92 GLB
93 GAME
94 GML
95 GNS
96 GOLD
97 GPC
98 GPUC
99 GRCX
100 GRS
101 GUE
102 H2O
103 HIRO
104 HOT
105 HUC
106 HVC
107 HYP
108 HZ
109 IFC
110 ITC
111 IXC
112 JLH
113 JPC
114 JUG
115 KDC
116 KEY
117 LC
118 LCL
119 LEAF
120 LGC
121 LOL
122 LOVE
123 LQD
124 LTBC
125 LTC
126 LTCX
127 MAID
128 MAST
129 MAX
130 MCN
131 MEC
132 METH
133 MIL
134 MIN
135 MINT
136 MMC
137 MMNXT
138 MMXIV
139 MNTA
140 MON
141 MRC
142 MRS
143 OMNI
144 MTS
145 MUN
146 MYR
147 MZC
148 N5X
149 NAS
150 NAUT
151 NAV
152 NBT
153 NEOS
154 NL
155 NMC
156 NOBL
157 NOTE
158 NOXT
159 NRS
160 NSR
161 NTX
162 NXT
163 NXTI
164 OPAL
165 PAND
166 PAWN
167 PIGGY
168 PINK
169 PLX
170 PMC
171 POT
172 PPC
173 PRC
174 PRT
175 PTS
176 Q2C
177 QBK
178 QCN
179 QORA
180 QTL
181 RBY
182 RDD
183 RIC
184 RZR
185 SDC
186 SHIBE
187 SHOPX
188 SILK
189 SJCX
190 SLR
191 SMC
192 SOC
193 SPA
194 SQL
195 SRCC
196 SRG
197 SSD
198 STR
199 SUM
200 SUN
201 SWARM
202 SXC
203 SYNC
204 SYS
205 TAC
206 TOR
207 TRUST
208 TWE
209 UIS
210 ULTC
211 UNITY
212 URO
213 USDE
214 USDT
215 UTC
216 UTIL
217 UVC
218 VIA
219 VOOT
220 VRC
221 VTC
222 WC
223 WDC
224 WIKI
225 WOLF
226 X13
227 XAI
228 XAP
229 XBC
230 XC
231 XCH
232 XCN
233 XCP
234 XCR
235 XDN
236 XDP
237 XHC
238 XLB
239 XMG
240 XMR
241 XPB
242 XPM
243 XRP
244 XSI
245 XST
246 XSV
247 XUSD
248 XXC
249 YACC
250 YANG
251 YC
252 YIN
253 XVC
254 FLO
256 XEM
258 ARCH
260 HUGE
261 GRC
263 IOC
265 INDEX
267 ETH
268 SC
269 BCY
270 EXP
271 FCT
272 BITUSD
273 BITCNY
274 RADS
275 AMP
276 VOX
277 DCR
278 LSK
279 DAO
280 LBC
281 STEEM
282 SBD
283 ETC
284 REP
285 ARDR
286 ZEC
287 STRAT
288 NXC
289 PASC
290 GNT
291 GNO
292 BCH
293 ZRX
294 CVC
295 OMG
296 GAS
297 STORJ
298 EOS
299 USDC
300 SNT
301 KNC
302 BAT
303 LOOM
304 QTUM
306 MANA

Currency Pair IDs

This is a list of IDs for currency pairs. They serve as the channel IDs for price aggregated books, and are used in returned data from a few other websocket channels as well.

7 BTC_BCN
14 BTC_BTS
15 BTC_BURST
20 BTC_CLAM
25 BTC_DGB
27 BTC_DOGE
24 BTC_DASH
38 BTC_GAME
43 BTC_HUC
50 BTC_LTC
51 BTC_MAID
58 BTC_OMNI
61 BTC_NAV
64 BTC_NMC
69 BTC_NXT
75 BTC_PPC
89 BTC_STR
92 BTC_SYS
97 BTC_VIA
100 BTC_VTC
108 BTC_XCP
114 BTC_XMR
116 BTC_XPM
117 BTC_XRP
112 BTC_XEM
148 BTC_ETH
150 BTC_SC
155 BTC_FCT
162 BTC_DCR
163 BTC_LSK
167 BTC_LBC
168 BTC_STEEM
170 BTC_SBD
171 BTC_ETC
174 BTC_REP
177 BTC_ARDR
178 BTC_ZEC
182 BTC_STRAT
184 BTC_PASC
185 BTC_GNT
189 BTC_BCH
192 BTC_ZRX
194 BTC_CVC
196 BTC_OMG
198 BTC_GAS
200 BTC_STORJ
201 BTC_EOS
204 BTC_SNT
207 BTC_KNC
210 BTC_BAT
213 BTC_LOOM
221 BTC_QTUM
229 BTC_MANA
121 USDT_BTC
216 USDT_DOGE
122 USDT_DASH
123 USDT_LTC
124 USDT_NXT
125 USDT_STR
126 USDT_XMR
127 USDT_XRP
149 USDT_ETH
219 USDT_SC
218 USDT_LSK
173 USDT_ETC
175 USDT_REP
180 USDT_ZEC
217 USDT_GNT
191 USDT_BCH
220 USDT_ZRX
203 USDT_EOS
206 USDT_SNT
209 USDT_KNC
212 USDT_BAT
215 USDT_LOOM
223 USDT_QTUM
231 USDT_MANA
129 XMR_BCN
132 XMR_DASH
137 XMR_LTC
138 XMR_MAID
140 XMR_NXT
181 XMR_ZEC
166 ETH_LSK
169 ETH_STEEM
172 ETH_ETC
176 ETH_REP
179 ETH_ZEC
186 ETH_GNT
190 ETH_BCH
193 ETH_ZRX
195 ETH_CVC
197 ETH_OMG
199 ETH_GAS
202 ETH_EOS
205 ETH_SNT
208 ETH_KNC
211 ETH_BAT
214 ETH_LOOM
222 ETH_QTUM
230 ETH_MANA
224 USDC_BTC
226 USDC_USDT
225 USDC_ETH