Back to top

itBit REST API

Production Host: https://api.itbit.com/v1/

Beta Host: https://beta-api.itbit.com/v1/

NOTE: itBit’s FIX and REST APIs will be down for scheduled maintenance every Friday from 10-10:30pm GMT (5-5:30pm EST, 5-5:30am SGT). All mentions of ‘amount’ refer to the amount of cryptocurrency involved in the transaction.

Market Data

Public API for retrieving market data from the exchange. No authentication required. Market data endpoints refresh every 5-6 seconds.

Get Ticker

Get ticker info for the specified market.

Get Ticker
GET/markets/{tickerSymbol}/ticker

Example

https://api.itbit.com/v1/markets/XBTUSD/ticker

Example URI

GET /markets/XBTUSD/ticker
URI Parameters
HideShow
tickerSymbol
string (required) Example: XBTUSD

symbol for market

Choices: XBTUSD XBTSGD XBTEUR

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "pair": "XBTUSD",
  "bid": "622",
  "bidAmt": "0.0006",
  "ask": "641.29",
  "askAmt": "0.5",
  "lastPrice": "618.00000000",
  "lastAmt": "0.00040000",
  "volume24h": "0.00040000",
  "volumeToday": "0.00040000",
  "high24h": "618.00000000",
  "low24h": "618.00000000",
  "highToday": "618.00000000",
  "lowToday": "618.00000000",
  "openToday": "618.00000000",
  "vwapToday": "618.00000000",
  "vwap24h": "618.00000000",
  "serverTimeUTC": "2014-06-24T20:42:35.6160000Z"
}
Schema
+ **pair** `string` - *currency pair for market. e.g. XBTUSD for USD Bitcoin market.*
+ **bid** `string` - *highest bid price*
+ **bidAmt** `string` - *highest bid amount*
+ **ask** `string` - *lowest ask price*
+ **askAmt** `string` - *lowest ask amount*
+ **lastPrice** `string` - *last traded price*
+ **lastAmt** `string` - *last traded amount*
+ **volume24h** `string` - *total traded volume in the last 24 hours*
+ **volumeToday** `string` - *total traded volume since midnight UTC*
+ **high24h** `string` - *highest traded price in the last 24 hours*
+ **low24h** `string` - *lowest traded price in the last 24 hours*
+ **highToday** `string` - *highest traded price since midnight UTC*
+ **lowToday** `string` - *lowest traded price since midnight UTC*
+ **openToday** `string` - *first traded price since midnight UTC*
+ **vwapToday** `string` - *volume weighted average price traded since midnight UTC*
+ **vwap24h** `string` - *volume weighted average price traded in the last 24 hours*
+ **serverTimeUTC** `string` - *server time in UTC*
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 80012,
  "description": "No market matching the provided ticker symbol could be found.",
  "requestId": "48df7bf7-6144-46e7-bd19-d69e1805a8c9"
}
Schema
+ **code** `integer` - *error code*
+ **description** `string` - *error description*
+ **requestId** `string` - *id of api request, should be provided to itBit to aid in debugging*

Get Order Book

Get the full order book for the specified market.

Get Order Book
GET/markets/{tickerSymbol}/order_book

Example

https://api.itbit.com/v1/markets/XBTUSD/order_book

Example URI

GET /markets/XBTUSD/order_book
URI Parameters
HideShow
tickerSymbol
string (required) Example: XBTUSD

symbol for market

Choices: XBTUSD XBTSGD XBTEUR

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "asks": [
    [
      "219.82",
      "2.19"
    ],
    [
      "219.83",
      "6.05"
    ],
    [
      "220.19",
      "17.59"
    ],
    [
      "220.52",
      "3.36"
    ],
    [
      "220.53",
      "33.46"
    ]
  ],
  "bids": [
    [
      "219.40",
      "17.46"
    ],
    [
      "219.13",
      "53.93"
    ],
    [
      "219.08",
      "2.20"
    ],
    [
      "218.58",
      "98.73"
    ],
    [
      "218.20",
      "3.37"
    ]
  ]
}
Schema
+ **asks** `array` - *list containing the price and amount of all ask orders*
+ **bids** `array` - *list containing the price and amount of all bid orders*
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 80012,
  "description": "No market matching the provided ticker symbol could be found.",
  "requestId": "48df7bf7-6144-46e7-bd19-d69e1805a8c9"
}
Schema
+ **code** `integer` - *error code*
+ **description** `string` - *error description*
+ **requestId** `string` - *id of api request, should be provided to itBit to aid in debugging*

Get Recent Trades

Get recent trades for the specified market.

Get Recent Trades
GET/markets/{tickerSymbol}/trades{?since}

Example

https://api.itbit.com/v1/markets/XBTUSD/trades?since=27472

Example URI

GET /markets/XBTUSD/trades?since=27472
URI Parameters
HideShow
tickerSymbol
string (required) Example: XBTUSD

symbol for market

Choices: XBTUSD XBTSGD XBTEUR

since
string (optional) Example: 27472

matchNumber, only executions after this will be returned

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
    count: 3,
    recentTrades: [
        {
            timestamp: "2015-05-22T17:45:34.7570000Z",
            matchNumber: 27475,
            price: "351.45000000",
            amount: "0.00010000"
        },
        {
            timestamp: "2015-05-22T17:01:08.4270000Z",
            matchNumber: 27474,
            price: "352.00000000",
            amount: "0.00010000"
        },
        {
            timestamp: "2015-05-22T17:01:04.8630000Z",
            matchNumber: 27473,
            price: "351.45000000",
            amount: "0.00010000"
        }
    ]
}
Schema
+ **count** `string` - *total number of trades returned.*
+ **recentTrades** `array` - *list containing trade details of up to 2000 recent trades*
+ **timestamp** `string` - *time of trade*
+ **matchNumber** `string` - *match number of trade*
+ **price** `string` - *price of trade*
+ **amount** `string` - *amount of trade*
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 80012,
  "description": "No market matching the provided ticker symbol could be found.",
  "requestId": "48df7bf7-6144-46e7-bd19-d69e1805a8c9"
}
Schema
+ **code** `integer` - *error code*
+ **description** `string` - *error description*
+ **requestId** `string` - *id of api request, should be provided to itBit to aid in debugging*

Trading

Private API for trading and account management. Requires API keys for authentication.

Get All Wallets

Get information about all wallets in your account.

Get All Wallets
GET/wallets{?userId,page,perPage}

Example

https://api.itbit.com/v1/wallets?userId=e9c856db-c726-46b2-ace0-a806671105fb

Example URI

GET /wallets?userId=e9c856db-c726-46b2-ace0-a806671105fb&page=1&perPage=50
URI Parameters
HideShow
userId
string (required) Example: e9c856db-c726-46b2-ace0-a806671105fb

user id

page
string (optional) Example: 1

page to return (default = 1)

perPage
string (optional) Example: 50

number of items per page (default = 50, max = 50)

Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id": "f46eb6b0-2a7f-4c07-898e-856d58568fde",
    "userId": "e9c856db-c726-46b2-ace0-a806671105fb",
    "name": "user-wallet-01",
    "balances": [
      {
        "currency": "USD",
        "availableBalance": "0.00000000",
        "totalBalance": "0.00000000"
      },
      {
        "currency": "XBT",
        "availableBalance": "0.00000000",
        "totalBalance": "0.00000000"
      },
      {
        "currency": "EUR",
        "availableBalance": "0.00000000",
        "totalBalance": "0.00000000"
      },
      {
        "currency": "SGD",
        "availableBalance": "0.00000000",
        "totalBalance": "0.00000000"
      }
    ]
  },
  {
    "id": "2224db00-da07-46f7-ba37-b877e1cd455a",
    "userId": "e9c856db-c726-46b2-ace0-a806671105fb",
    "name": "user-wallet-02",
    "balances": [
      {
        "currency": "USD",
        "availableBalance": "75631.88785992",
        "totalBalance": "75631.88785999"
      },
      {
        "currency": "XBT",
        "availableBalance": "100100.03000000",
        "totalBalance": "100100.03000000"
      },
      {
        "currency": "EUR",
        "availableBalance": "100000.00000000",
        "totalBalance": "100000.00000000"
      },
      {
        "currency": "SGD",
        "availableBalance": "100000.00000000",
        "totalBalance": "100000.00000000"
      }
    ]
  }
]
Schema
+ **id** `string` - *wallet id*
+ **userId** `string` - *user id*
+ **name** `string` - *wallet name*
+ **balances** `array` - *wallet balances*
+ **currency** `string` - *balance currency*
+ **availableBalance** `string` - *balance available for withdrawal and new orders*
+ **totalBalance** `string` - *total balance including balance reserved by open orders and pending withdrawals*
Response  401
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 10002,
  "description": "Your request lacked a valid signature, and could not be authenticated.",
  "requestId": "48df7bf7-6144-46e7-bd19-d69e1805a8c9"
}
Schema
+ **code** `integer` - *error code*
+ **description** `string` - *error description*
+ **requestId** `string` - *id of api request, should be provided to itBit to aid in debugging*
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 10005,
  "description": "Your request could not be processed because one or more parameters were invalid.",
  "requestId": "48df7bf7-6144-46e7-bd19-d69e1805a8c9",
  "validationErrors": [
    {
      "code": 51002,
      "description": "Value is not a valid GUID.",
      "field": "userId"
    }
  ]
}
Schema
+ **code** `integer` - *error code*
+ **description** `string` - *error description*
+ **validationErrors** `array` - *list of validation error objects*
+ **requestId** `string` - *id of api request, should be provided to itBit to aid in debugging*

New Wallet

Create a new wallet with the specified name.

Create New Wallet
POST/wallets

Example

https://api.itbit.com/v1/wallets

Example URI

POST /wallets
Request
HideShow
Headers
Content-Type: application/json
Authorization: CsNTu1235f/FCkNppqkSJA:Fd8prTHt9/KYyf0nLbZyHBkHA2I47JAjIGy5Y/TYbTuOv+cuSHud8NW5222rnKq1RiMT5Bj8sHnne+MyKvwjdw==
X-Auth-Nonce: 1029301994
X-Auth-Timestamp: 102993094
Body
{
  "name": "My New Wallet",
  "userId": "5591e419-a356-4fc0-b43c-3c84c2fd8013"
}
Schema
+ **name** `string` - *name of the wallet*
+ **userId** `string` - *user id*
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
  "userId": "5591e419-a356-4fc0-b43c-3c84c2fd8013",
  "name": "My New Wallet",
  "balances": [
    {
      "currency": "USD",
      "availableBalance": "0.00000000",
      "totalBalance": "0.00000000"
    },
    {
      "currency": "XBT",
      "availableBalance": "0.00000000",
      "totalBalance": "0.00000000"
    },
    {
      "currency": "EUR",
      "availableBalance": "0.00000000",
      "totalBalance": "0.00000000"
    },
    {
      "currency": "SGD",
      "availableBalance": "0.00000000",
      "totalBalance": "0.00000000"
    }
  ]
}
Schema
+ **id** `string` - *wallet id*
+ **userId** `string` - *user id*
+ **name** `string` - *wallet name - must be less than or equal to 20 characters*
+ **balances** `array` - *wallet balances*
+ **currency** `string` - *balance currency*
+ **availableBalance** `string` - *balance available for withdrawal and new orders*
+ **totalBalance** `string` - *total balance including balance reserved by open orders and pending withdrawals*
Response  401
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 10002,
  "description": "Your request lacked a valid signature, and could not be authenticated.",
  "requestId": "48df7bf7-6144-46e7-bd19-d69e1805a8c9"
}
Schema
+ **code** `integer` - *error code*
+ **description** `string` - *error description*
+ **requestId** `string` - *id of api request, should be provided to itBit to aid in debugging*
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 80001,
  "description": "The name provided for creation of a new wallet was not valid.",
  "requestId": "48df7bf7-6144-46e7-bd19-d69e1805a8c9"
}
Schema
+ **code** `integer` - *error code*
+ **description** `string` - *error description*
+ **requestId** `string` - *id of api request, should be provided to itBit to aid in debugging*
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 80003,
  "description": "The name provided for creation of a new wallet is already in use.",
  "requestId": "48df7bf7-6144-46e7-bd19-d69e1805a8c9"
}
Schema
+ **code** `integer` - *error code*
+ **description** `string` - *error description*
+ **requestId** `string` - *id of api request, should be provided to itBit to aid in debugging*

Get Wallet

Get wallet information.

Get Wallet
GET/wallets/{walletId}

Example

https://api.itbit.com/v1/wallets/7e037345-1288-4c39-12fe-d0f99a475a98

Example URI

GET /wallets/7e037345-1288-4c39-12fe-d0f99a475a98
URI Parameters
HideShow
walletId
string (required) Example: 7e037345-1288-4c39-12fe-d0f99a475a98

wallet id

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "7e037345-1288-4c39-12fe-d0f99a475a98",
  "userId": "5591e419-a356-4fc0-b43c-3c84c2fd8013",
  "name": "My New Wallet",
  "balances": [
    {
      "currency": "USD",
      "availableBalance": "50000.0000000",
      "totalBalance": "50000.0000000"
    },
    {
      "currency": "XBT",
      "availableBalance": "100.00000000",
      "totalBalance": "100.00000000"
    },
    {
      "currency": "EUR",
      "availableBalance": "100000.00000000",
      "totalBalance": "100000.00000000"
    },
    {
      "currency": "SGD",
      "availableBalance": "515440.88288502",
      "totalBalance": "515432.74228603"
    }
  ]
}
Schema
+ **id** `string` - *wallet id*
+ **userId** `string` - *user id*
+ **name** `string` - *wallet name*
+ **balances** `array` - *wallet balances*
+ **currency** `string` - *balance currency*
+ **availableBalance** `string` - *balance available for withdrawal and new orders*
+ **totalBalance** `string` - *total balance including balance reserved by open orders and pending withdrawals*
Response  401
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 10002,
  "description": "Your request lacked a valid signature, and could not be authenticated.",
  "requestId": "48df7bf7-6144-46e7-bd19-d69e1805a8c9"
}
Schema
+ **code** `integer` - *error code*
+ **description** `string` - *error description*
+ **requestId** `string` - *id of api request, should be provided to itBit to aid in debugging*
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 80004,
  "description": "No wallet matching the provided id could be found.",
  "requestId": "48df7bf7-6144-46e7-bd19-d69e1805a8c9"
}
Schema
+ **code** `integer` - *error code*
+ **description** `string` - *error description*
+ **requestId** `string` - *id of api request, should be provided to itBit to aid in debugging*

Get Wallet Balance

Get the balance information for a specific currency in a wallet.

Get Wallet Balance
GET/wallets/{walletId}/balances/{currencyCode}

Example

https://api.itbit.com/v1/wallets/7e037345-1288-4c39-12fe-d0f99a475a98/balances/USD

Example URI

GET /wallets/7e037345-1288-4c39-12fe-d0f99a475a98/balances/USD
URI Parameters
HideShow
walletId
string (required) Example: 7e037345-1288-4c39-12fe-d0f99a475a98

wallet id

currencyCode
string (required) Example: USD

ISO 4217 currency code

Choices: USD SGD EUR XBT

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "currency": "USD",
  "availableBalance": "50280.65575422",
  "totalBalance": "50776.00457623"
}
Schema
+ **currency** `string` - *balance currency*
+ **availableBalance** `string` - *balance available for withdrawal and new orders*
+ **totalBalance** `string` - *total balance including balance reserved by open orders and pending withdrawals*
Response  401
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 10002,
  "description": "Your request lacked a valid signature, and could not be authenticated.",
  "requestId": "48df7bf7-6144-46e7-bd19-d69e1805a8c9"
}
Schema
+ **code** `integer` - *error code*
+ **description** `string` - *error description*
+ **requestId** `string` - *id of api request, should be provided to itBit to aid in debugging*
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 80008,
  "description": "No matching currency could be found.",
  "requestId": "48df7bf7-6144-46e7-bd19-d69e1805a8c9"
}
Schema
+ **code** `integer` - *error code*
+ **description** `string` - *error description*
+ **requestId** `string` - *id of api request, should be provided to itBit to aid in debugging*

Get Trades

Get all trades for the specified wallet.

Get Trades
GET/wallets/{walletId}/trades{?lastExecutionId,page,perPage,rangeStart,rangeEnd}

Example

https://api.itbit.com/v1/wallets/7e037345-1288-4c39-12fe-d0f99a475a98/trades

Example URI

GET /wallets/7e037345-1288-4c39-12fe-d0f99a475a98/trades?lastExecutionId=10&page=1&perPage=50&rangeStart=2014-06-24T00:00:00&rangeEnd=2012-01-01T00:00:00
URI Parameters
HideShow
walletId
string (required) Example: 7e037345-1288-4c39-12fe-d0f99a475a98

wallet id

lastExecutionId
string (optional) Example: 10

exclude executions before this

page
string (optional) Example: 1

page to return (default = 1)

perPage
string (optional) Example: 50

number of items per page (default = 50, max = 50)

rangeStart
string (optional) Example: 2014-06-24T00:00:00

exclude orders after this time (ISO 8601 timestamp)

rangeEnd
string (optional) Example: 2012-01-01T00:00:00

exclude orders before this time (ISO 8601 timestamp)

Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "totalNumberOfRecords": "2",
  "currentPageNumber": "1",
  "latestExecutionId": "332",
  "recordsPerPage": "50",
  "tradingHistory": [
    {
      "orderId": "248ffda4-83a0-4033-a5bb-8929d523f59f",
      "timestamp": "2015-05-11T14:48:01.9870000Z",
      "instrument": "XBTUSD",
      "direction": "buy",
      "currency1": "XBT",
      "currency1Amount": "0.00010000",
      "currency2": "USD",
      "currency2Amount": "0.0250530000000000",
      "rate": "250.53000000",
      "commissionPaid": "0.00000000",
      "commissionCurrency": "USD",
      "rebatesApplied": "-0.000125265",
      "rebateCurrency": "USD"
    },
    {
      "orderId": "248ffda4-83a0-4033-a5bb-8929d523f59f",
      "timestamp": "2015-05-01T16:12:26.4670000Z",
      "instrument": "XBTUSD",
      "direction": "buy",
      "currency1": "XBT",
      "currency1Amount": "10.00000000",
      "currency2": "USD",
      "currency2Amount": "1955.3000000000000000",
      "rate": "195.53000000",
      "commissionPaid": "0.00000000",
      "commissionCurrency": "USD",
      "rebatesApplied": "1.95530000",
      "rebateCurrency": "USD"
    }
  ]
}
Schema
+ **totalNumberOfRecords** `string` - *number of records retrieved*
+ **currentPageNumber** `string` - *current page being viewed*
+ **latestExecutionId** `string` - *most recent execution at time of response*
+ **recordsPerPage** `string` - *number of items per page*
+ **tradingHistory** `array` - *list of trade execution objects*
+ **orderId** `string` - *order id*
+ **timestamp** `string` - *execution time in UTC*
+ **instrument** `string` - *currency pair of market*
+ **direction** `string` - *direction of executed order, buy or sell*
+ **currency1** `string` - *base currency*
+ **currency1Amount** `string` - *base currency amount*
+ **currency2** `string` - *quote currency*
+ **currency2Amount** `string` - *quote currency amount*
+ **rate** `string` - *amount of currency 2 paid per unit of currency 1*
+ **commissionPaid** `string` - *net trade fee paid after using any available rebate balance*
+ **commissionCurrency** `string` - *currency of fee charged*
+ **rebatesApplied** `string` - *negative values represent amount of rebate balance used for trades removing liquidity from order book; positive values represent amount of rebate balance earned from trades adding liquidity to order book*
+ **rebatesCurrency** `string` - *currency of applied rebate*
Response  401
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 10002,
  "description": "Your request lacked a valid signature, and could not be authenticated.",
  "requestId": "48df7bf7-6144-46e7-bd19-d69e1805a8c9"
}
Schema
+ **code** `integer` - *error code*
+ **description** `string` - *error description*
+ **requestId** `string` - *id of api request, should be provided to itBit to aid in debugging*
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 80011,
  "description": "The provided datetime range was invalid.",
  "requestId": "48df7bf7-6144-46e7-bd19-d69e1805a8c9"
}
Schema
+ **code** `integer` - *error code*
+ **description** `string` - *error description*
+ **requestId** `string` - *id of api request, should be provided to itBit to aid in debugging*

Get Funding History

Funding History for the specified wallet.

Get Funding History
GET/wallets/{walletId}/funding_history{?page,perPage}

Example

https://api.itbit.com/v1/wallets/7e037345-1288-4c39-12fe-d0f99a475a98/funding_history

Example URI

GET /wallets/7e037345-1288-4c39-12fe-d0f99a475a98/funding_history?page=1&perPage=50
URI Parameters
HideShow
walletId
string (required) Example: 7e037345-1288-4c39-12fe-d0f99a475a98

wallet id

page
string (optional) Example: 1

page to return (default = 1)

perPage
string (optional) Example: 50

number of items per page (default = 50, max = 50)

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
    "totalNumberOfRecords": "2",
    "currentPageNumber": "1",
    "latestExecutionId": "332",
    "recordsPerPage": "50",
    "fundingHistory": [
        {
          "bankName": "fb6",
          "withdrawalId": 94,
          "holdingPeriodCompletionDate": "2015-03-21T17:37:39.9170000",
          "time": "2015-03-18T17:37:39.9170000",
          "currency": "EUR",
          "transactionType": "Withdrawal",
          "amount": "1.00000000",
          "walletName": "Wallet",
          "status": "relayed"
        },
        {
          "bankName": "test",
          "withdrawalId": 19,
          "holdingPeriodCompletionDate": "2015-02-21T23:43:37.1230000",
          "time": "2015-02-18T23:43:37.1230000",
          "currency": "EUR",
          "transactionType": "Withdrawal",
          "amount": "100.00000000",
          "walletName": "Wallet",
          "status": "completed"
        },
        {
          "destinationAddress": "mfsANnSPCgeRZoc8KYwCA71mmQMuKjUgFJ",
          "txnHash": "b77ded847997fa52cb340aa65239990d71e02ce335430bab19c20a4c3e84e48f",
          "time": "2015-02-04T18:52:39.1270000",
          "currency": "XBT",
          "transactionType": "Deposit",
          "amount": "14.89980000",
          "walletName": "Wallet",
          "status": "completed"
        },
        {
          "bankName": "test",
          "withdrawalId": 21,
          "holdingPeriodCompletionDate": "2015-02-21:49:29.1370000",
          "time": "2015-02-18T23:49:29.1370000",
          "currency": "EUR",
          "transactionType": "Withdrawal",
          "amount": "0.01000000",
          "walletName": "Wallet",
          "status": "cancelled"
        },
    ]
}
Schema
+ **totalNumberOfRecords** `string` - *number of records retrieved*
+ **currentPageNumber** `string` - *current page being viewed*
+ **recordsPerPage** `string` - *number of items per page*
+ **requestTime** `string` - *request time of api call*
+ **fundingHistory** `array` - *list of deposits and withdrawals*
+ **amount** `string` - *amount of currency*
+ **transactionType** `string` - *type of transaction*
+ **currency** `string` - *currency used in transaction*
+ **time** `string` - *time of transaction*
+ **walletName** `string` - *name of wallet*
+ **status** `string` - *status of transaction*
+ **bankName** `string` - *bank name for fiat currencies*
+ **holdingPeriodCompletionDate** `string` - *date when holding period was completed for fiat withdrawals*
+ **txnHash** `string` - *bitcoin transaction id*
+ **destinationAddress** `string` - *bitcoin wallet address for transaction*
+ **withdrawalId** `string` - *withdrawal id for fiat currency*
Response  401
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 10002,
  "description": "Your request lacked a valid signature, and could not be authenticated.",
  "requestId": "48df7bf7-6144-46e7-bd19-d69e1805a8c9"
}
Schema
+ **code** `integer` - *error code*
+ **description** `string` - *error description*
+ **requestId** `string` - *id of api request, should be provided to itBit to aid in debugging*
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 80011,
  "description": "The provided datetime range was invalid.",
  "requestId": "48df7bf7-6144-46e7-bd19-d69e1805a8c9"
}
Schema
+ **code** `integer` - *error code*
+ **description** `string` - *error description*
+ **requestId** `string` - *id of api request, should be provided to itBit to aid in debugging*

Get Orders

Get all orders for the specified wallet.

Get Orders
GET/wallets/{walletId}/orders{?instrument,page,perPage,status}

Example

https://api.itbit.com/v1/wallets/7e037345-1288-4c39-12fe-d0f99a475a98/orders?status=open

Example URI

GET /wallets/7e037345-1288-4c39-12fe-d0f99a475a98/orders?instrument=XBTUSD&page=1&perPage=50&status=open
URI Parameters
HideShow
walletId
string (required) Example: 7e037345-1288-4c39-12fe-d0f99a475a98

wallet id

instrument
string (optional) Example: XBTUSD

currency pair of market

Choices: XBTUSD XBTSGD XBTEUR

page
string (optional) Example: 1

Which page to return (default = 1).

perPage
string (optional) Example: 50

Number of orders shown per page (default = 50, max = 50).

status
string (optional) Example: open

Status of the order

Choices: submitted open filled cancelled rejected

Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id": "5b1f51e1-3f38-4d64-918c-45c5848c76fb",
    "walletId": "7e037345-1288-4c39-12fe-d0f99a475a98",
    "side": "buy",
    "instrument": "XBTUSD",
    "type": "limit",
    "currency": "XBT",
    "amount": "2.5",
    "price": "650",
    "amountFilled": "1",
    "volumeWeightedAveragePrice": "650",
    "createdTime": "2014-02-11T17:05:15Z",
    "status": "open",
    "metadata": {},
    "clientOrderIdentifier": null
  },
  {
    "id": "13d6af57-8b0b-41e5-af30-becf0bcc574d",
    "walletId": "7e037345-1288-4c39-12fe-d0f99a475a98",
    "side": "sell",
    "instrument": "XBTUSD",
    "type": "limit",
    "currency": "XBT",
    "amount": "1",
    "price": "2",
    "amountFilled": "0",
    "volumeWeightedAveragePrice": "0",
    "createdTime": "2014-02-11T17:15:55Z",
    "status": "cancelled",
    "metadata": {},
    "clientOrderIdentifier": null
  }
]
Schema
+ **id** `string` - *order id*
+ **walletId** `string` - *id of the wallet the order was placed with*
+ **side** `string` - *order side* **Choices**: `buy` `sell`
+ **instrument** `string` - *currency pair of market*
+ **type** `string` - *order type*
+ **currency** `string` - *order currency*
+ **amount** `string` - *order amount*
+ **price** `string` - *order price*
+ **volumeWeightedAveragePrice** `string` - *volume weighted average price of order executions*
+ **amountFilled** `string` - *amount filled*
+ **createdTime** `string` - *created time*
+ **status** `string` - *order status* **Choices**: `submitted` `open` `filled` `cancelled` `rejected`
+ **metadata** `object` - **[Optional]** *storage for client order information*
+ **clientOrderIdentifier** `string` - **[Optional]** *unique client order identifier*

New Order

Place an order.

Create New Order
POST/wallets/{walletId}/orders

Example

https://api.itbit.com/v1/wallets/7e037345-1288-4c39-12fe-d0f99a475a98/orders

Example URI

POST /wallets/7e037345-1288-4c39-12fe-d0f99a475a98/orders
URI Parameters
HideShow
walletId
string (required) Example: 7e037345-1288-4c39-12fe-d0f99a475a98

wallet id

Request
HideShow
Headers
Content-Type: application/json
Authorization: CsNTu1235f/FCkNppqkSJA:Fd8prTHt9/KYyf0nLbZyHBkHA2I47JAjIGy5Y/TYbTuOv+cuSHud8NW5222rnKq1RiMT5Bj8sHnne+MyKvwjdw==
X-Auth-Nonce: 1029301994
X-Auth-Timestamp: 102993094
Body
{
  "side": "buy",
  "type": "limit",
  "currency": "XBT",
  "amount": "100.0350",
  "display": "100.0350",
  "price": "750.53",
  "instrument": "XBTUSD",
  "metadata": {
    "key": "value",
    "key2": "value2"
  },
  "clientOrderIdentifier": "optional"
}
Schema
+ **side** `string` - *order side* **Choices**: `buy` `sell`
+ **type** `string` - *order type* **Choices**: `limit`
+ **currency** `string` - *order currency*
+ **amount** `string` - *order amount; maximum of 4 decimal places of precision*
+ **display** `string` - *display amount for iceberg orders*
+ **price** `string` - *order price; maximum of 2 decimal places of precision*
+ **instrument** `string` - *currency pair of market*
+ **metadata** `object` - **[Optional]** *storage for client order information*
+ **clientOrderIdentifier** `string` - **[Optional]** *unique client order identifier*
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "5b1f51e1-3f38-4d64-918c-45c5848c76fb",
  "walletId": "7e037345-1288-4c39-12fe-d0f99a475a98",
  "side": "buy",
  "instrument": "XBTUSD",
  "type": "limit",
  "currency": "XBT",
  "amount": "100.0350",
  "price": "750.53",
  "amountFilled": "0",
  "volumeWeightedAveragePrice": "0",
  "createdTime": "2014-02-11T17:05:15Z",
  "status": "submitted",
  "metadata": {},
  "clientOrderIdentifier": ""
}
Schema
+ **id** `string` - *order id*
+ **walletId** `string` - *id of the wallet the order was placed with*
+ **side** `string` - *order side* **Choices**: `buy` `sell`
+ **instrument** `string` - *currency pair of market*
+ **type** `string` - *order type*
+ **currency** `string` - *order currency*
+ **amount** `string` - *order amount; maximum of 4 decimal places of precision*
+ **price** `string` - *order price; maximum of 2 decimal places of precision*
+ **volumeWeightedAveragePrice** `string` - *volume weighted average price of order executions*
+ **amountFilled** `string` - *amount filled*
+ **createdTime** `string` - *created time*
+ **status** `string` - *order status* **Choices**: `submitted` `open` `filled` `cancelled` `rejected`
+ **metadata** `object` - **[Optional]** *storage for client order information*
+ **clientOrderIdentifier** `string` - **[Optional]** *unique client order identifier*
Response  401
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 10002,
  "description": "Your request lacked a valid signature, and could not be authenticated.",
  "requestId": "48df7bf7-6144-46e7-bd19-d69e1805a8c9"
}
Schema
+ **code** `integer` - *error code*
+ **description** `string` - *error description*
+ **requestId** `string` - *id of api request, should be provided to itBit to aid in debugging*
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 81001,
  "description": "The wallet provided does not have the funds required to place the order.",
  "requestId": "48df7bf7-6144-46e7-bd19-d69e1805a8c9"
}
Schema
+ **code** `integer` - *error code*
+ **description** `string` - *error description*
+ **requestId** `string` - *id of api request, should be provided to itBit to aid in debugging*
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 80020,
  "description": "The provided order display was greater than the amount.",
  "requestId": "48df7bf7-6144-46e7-bd19-d69e1805a8c9"
}
Schema
+ **code** `integer` - *error code*
+ **description** `string` - *error description*
+ **requestId** `string` - *id of api request, should be provided to itBit to aid in debugging*

Get Order

Get an order by id.

Get Order
GET/wallets/{walletId}/orders/{orderId}

Example

https://api.itbit.com/v1/wallets/7e037345-1288-4c39-12fe-d0f99a475a98/orders/13d6af57-8b0b-41e5-af30-becf0bcc574d

Example URI

GET /wallets/7e037345-1288-4c39-12fe-d0f99a475a98/orders/13d6af57-8b0b-41e5-af30-becf0bcc574d
URI Parameters
HideShow
walletId
string (required) Example: 7e037345-1288-4c39-12fe-d0f99a475a98

wallet id

orderId
string (required) Example: 13d6af57-8b0b-41e5-af30-becf0bcc574d

order id

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
    "id": "13d6af57-8b0b-41e5-af30-becf0bcc574d",
    "walletId": "7e037345-1288-4c39-12fe-d0f99a475a98",
    "side": "buy",
    "instrument": "XBTUSD",
    "type": "limit",
    "currency": "XBT",
    "amount": "2.5",
    "displayAmount": "2.5",
    "price": "650",
    "volumeWeightedAveragePrice": "0",
    "amountFilled": "0",
    "createdTime": "2014-02-11T17:05:15Z",
    "status": "submitted"
    "metadata": { },
    "clientOrderIdentifier": null
}
Schema
+ **id** `string` - *order id*
+ **walletId** `string` - *id of the wallet the order was placed with*
+ **side** `string` - *order side* **Choices**: `buy` `sell`
+ **instrument** `string` - *currency pair of market*
+ **type** `string` - *order type*
+ **currency** `string` - *order currency*
+ **amount** `string` - *order amount*
+ **price** `string` - *order price
+ **volumeWeightedAveragePrice** `string` - *volume weighted average price of order executions*
+ **amountFilled** `string` - *amount filled*
+ **createdTime** `string` - *created time*
+ **status** `string` - *order status* **Choices**: `submitted` `open` `filled` `cancelled` `rejected`
+ **metadata** `object` - **[Optional]** *storage for client order information*
+ **clientOrderIdentifier** `string` - **[Optional]** *unique client order identifier*
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 80005,
  "description": "No order matching the provided id could be found.",
  "requestId": "48df7bf7-6144-46e7-bd19-d69e1805a8c9"
}
Schema
+ **code** `integer` - *error code*
+ **description** `string` - *error description*
+ **requestId** `string` - *id of api request, should be provided to itBit to aid in debugging*

Cancel Order

Cancel an open order.

Cancel Order
DELETE/wallets/{walletId}/orders/{orderId}

Example

https://api.itbit.com/v1/wallets/7e037345-1288-4c39-12fe-d0f99a475a98/orders/13d6af57-8b0b-41e5-af30-becf0bcc574d

Example URI

DELETE /wallets/7e037345-1288-4c39-12fe-d0f99a475a98/orders/13d6af57-8b0b-41e5-af30-becf0bcc574d
URI Parameters
HideShow
walletId
string (required) Example: 7e037345-1288-4c39-12fe-d0f99a475a98

wallet’s unique id

orderId
string (required) Example: 13d6af57-8b0b-41e5-af30-becf0bcc574d

order’s unique id

Response  202
HideShow

A 202 response acknowledges that the cancellation request has been received and is being processed. It is not a guarantee that the order has been cancelled.

Headers
Content-Type: text
Body
{}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 80005,
  "description": "No order matching the provided id could be found.",
  "requestId": "48df7bf7-6144-46e7-bd19-d69e1805a8c9"
}
Schema
+ **code** `integer` - *error code*
+ **description** `string` - *error description*
+ **requestId** `string` - *id of api request, should be provided to itBit to aid in debugging*
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 81002,
  "description": "The requested order is not open and cannot be cancelled.",
  "requestId": "48df7bf7-6144-46e7-bd19-d69e1805a8c9"
}
Schema
+ **code** `integer` - *error code*
+ **description** `string` - *error description*
+ **requestId** `string` - *id of api request, should be provided to itBit to aid in debugging*

New Cryptocurrency Deposit TEMPORARILY DISABLED

Request a deposit address to send cryptocurrency to.

itBit is temporarily not accepting bitcoin deposits.

New Cryptocurrency Deposit
POST/wallets/{walletId}/cryptocurrency_deposits

Example

https://api.itbit.com/v1/wallets/7e037345-1288-4c39-12fe-d0f99a475a98/cryptocurrency_deposits

Example URI

POST /wallets/7e037345-1288-4c39-12fe-d0f99a475a98/cryptocurrency_deposits
URI Parameters
HideShow
walletId
string (required) Example: 7e037345-1288-4c39-12fe-d0f99a475a98

wallet id

Request
HideShow
Headers
Content-Type: application/json
Authorization: CsNTu1235f/FCkNppqkSJA:Fd8prTHt9/KYyf0nLbZyHBkHA2I47JAjIGy5Y/TYbTuOv+cuSHud8NW5222rnKq1RiMT5Bj8sHnne+MyKvwjdw==
X-Auth-Nonce: 1029301994
X-Auth-Timestamp: 102993094
Body
{
  "currency": "XBT",
  "metadata": {
    "key": "value",
    "key2": "value2"
  }
}
Schema
+ **currency** `string` - *type of cryptocurrency to deposit* **Choice**: `XBT`
+ **metadata** `string` - **[Optional]** *storage for client deposit information*
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "id": 296,
  "walletID": "7e037345-1288-4c39-12fe-d0f99a475a98",
  "depositAddress": "moeF657QAaGCayyW8f3psAXh1EyxGMDhFF",
  "metadata": {}
}
Schema
+ **id** `string` - *deposit id*
+ **walletId** `string` - *wallet id that crytocurrency will be credited to*
+ **depositAddress** `string` - *address client should send to*
+ **metadata** `string` - *storage for client deposit information**

New Wallet Transfer

Transfer funds between wallets in your itBit account.

New Wallet Transfer
POST/wallet_transfers

Example

https://api.itbit.com/v1/wallet_transfers

Example URI

POST /wallet_transfers
Request
HideShow
Headers
Content-Type: application/json
Authorization: CsNTu1235f/FCkNppqkSJA:Fd8prTHt9/KYyf0nLbZyHBkHA2I47JAjIGy5Y/TYbTuOv+cuSHud8NW5222rnKq1RiMT5Bj8sHnne+MyKvwjdw==
X-Auth-Nonce: 1029301994
X-Auth-Timestamp: 102993094
Body
{
  "sourceWalletId": "7e037345-1288-4c39-12fe-d0f99a475a98",
  "destinationWalletId": "b30cpab8-c468-9950-a771-be0db2b39dea",
  "amount": "2.55",
  "currencyCode": "XBT"
}
Schema
+ **sourceWalletId** `string` - *id of wallet the funds will be transferred from*
+ **destinationWalletId** `string` - *id of wallet the funds will be transferred to*
+ **amount** `string` - *amount to transfer*
+ **currencyCode** `string` - *currency that will be transferred* **Choice** `XBT` `USD` `SGD` `EUR`
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "sourceWalletId": "7e037345-1288-4c39-12fe-d0f99a475a98",
  "destinationWalletId": "b30cpab8-c468-9950-a771-be0db2b39dea",
  "amount": "2.55",
  "currencyCode": "XBT"
}
Schema
+ **sourceWalletId** `string` - *id of wallet the funds will be transferred from*
+ **destinationWalletId** `string` - *id of wallet the funds will be transferred to*
+ **amount** `string` - *amount to transfer*
+ **currencyCode** `string` - *currency that will be transferred* **Choice** `XBT` `USD` `SGD` `EUR`

Error Codes

Code: 10002

{
    "code":10002,
    "description":"Your request lacked a valid signature, and could not be authenticated.",
    "requestId":"48df7bf7-6144-46e7-bd19-d69e1805a8c9"
}

Code: 10003

{
    "code":10003,
    "description":"You are not authorized to perform that action.",
    "requestId":"48df7bf7-6144-46e7-bd19-d69e1805a8c9"
}

Code: 10005

{
    "code":10005,
    "description":"Your request could not be processed because one or more parameters were invalid.",
    "requestId":"48df7bf7-6144-46e7-bd19-d69e1805a8c9",
    "validationErrors": [
        {
            "code": 51002,
            "description": "Value is not a valid GUID.",
            "field": "userId"
        }
    ]
}

Code: 80001

{
    "code": 80001,
    "description": "The name provided for creation of a new wallet was not valid.",
    "requestId": "48df7bf7-6144-46e7-bd19-d69e1805a8c9"
}

Code: 80003

{
    "code":80003,
    "description":"The name provided for creation of a new wallet is already in use.",
    "requestId":"48df7bf7-6144-46e7-bd19-d69e1805a8c9"
}

Code: 80004

{
    "code": 80004,
    "description": "No wallet matching the provided id could be found.",
    "requestId": "48df7bf7-6144-46e7-bd19-d69e1805a8c9"
}

Code: 80005

{
    "code": 80005,
    "description": "No order matching the provided id could be found.",
    "requestId": "48df7bf7-6144-46e7-bd19-d69e1805a8c9"
}

Code: 80008

{
    "code": 80008,
    "description": "No matching currency could be found.",
    "requestId": "48df7bf7-6144-46e7-bd19-d69e1805a8c9"
}

Code: 80011

{
    "code": 80011,
    "description": "The provided datetime range was invalid.",
    "requestId": "48df7bf7-6144-46e7-bd19-d69e1805a8c9"
}

Code: 80012

{
    "code": 80012,
    "description": "No market matching the provided ticker symbol could be found.",
    "requestId": "48df7bf7-6144-46e7-bd19-d69e1805a8c9"
}

Code: 80013

{
    "code":80013,
    "description":"Withdrawal amount must be at least 0.0001 BTC.",
    "requestId":"48df7bf7-6144-46e7-bd19-d69e1805a8c9"
}

Code: 80020

{
    "code":80020,
    "description":"The provided order display was greater than the amount.",
    "requestId":"48df7bf7-6144-46e7-bd19-d69e1805a8c9"
}

Code: 80021

{
    "code":80021,
    "description":"The provided order display was less than 1% of the amount.",
    "requestId":"48df7bf7-6144-46e7-bd19-d69e1805a8c9"
}

Code: 81001

{
    "code": 81001,
    "description": "The wallet provided does not have the funds required to place the order.",
    "requestId": "48df7bf7-6144-46e7-bd19-d69e1805a8c9"
}

Code: 81002

{
    "code": 81002,
    "description": "The requested order is not open and cannot be cancelled.",
    "requestId": "48df7bf7-6144-46e7-bd19-d69e1805a8c9"
}

Code: 85001

{
    "code":85001,
    "description":"This wallet's daily deposit address limit has been reached.",
    "requestId":"48df7bf7-6144-46e7-bd19-d69e1805a8c9"
}

Code: 85002

{
    "code":85002,
    "description":"This wallet's daily withdrawal request limit has been reached.",
    "requestId":"48df7bf7-6144-46e7-bd19-d69e1805a8c9"
}

Code: 85003

{
    "code":85003,
    "description":"This wallet's monthly withdrawal request limit has been reached.",
    "requestId":"48df7bf7-6144-46e7-bd19-d69e1805a8c9"
}

Code: 86001

{
    "code":86001,
    "description":"More than 6 key-value pairs provided in the metadata object.",
    "requestId":"48df7bf7-6144-46e7-bd19-d69e1805a8c9"
}

Code: 86002

{
    "code":86002,
    "description":"Metadata object includes values longer than 100 characters.",
    "requestId":"48df7bf7-6144-46e7-bd19-d69e1805a8c9"
}

FAQ

1. Why do I keep getting "Bad Signature" responses?

Bad signature responses usually happen when the auth header signature is incorrectly signed. This could be due to the following:

  • Nonce issue: each request’s nonce must be unique, if the same nonce is reused in a subsequent request, the request will fail with an invalid signature error.

  • The request body must be an empty string (for GET request) or a JSON string for POST requests.

  • Requests will fail if an invalid client key, secret, or user id is supplied.

  • Requests will fail if they are signed improperly. (review the signing process step by step below)

2. How do I sign a request?

All the requests sent to the itBit Rest API will need to be signed. The steps to sign a request are listed below:

  • Generate a timestamp. The timestamp should represent the number of milliseconds since January 1st, 1970.

  • Generate a nonce. The nonce should be a unique integer number.

  • Construct an array of UTF-8 encoded strings. That array should contain, in order, the http verb of the request being signed (e.g. “GET”), the full url of the request, the body of the message being sent, the nonce as a string, and the timestamp as a string. If the request has no body, an empty string should be used.

  • Convert that array to JSON, encoded as UTF-8. The resulting JSON should contain no spaces or other whitespace characters. For example, a valid JSON-encoded array might look like:

    '["GET","https://api.itbit.com/v1/wallets/7e037345-1288-4c39-12fe-d0f99a475a98","","5","1405385860202"]'
  • Prepend the string version of the nonce to the JSON-encoded string.

  • Construct the SHA-256 hash of the string generated in step 5. Call this the message hash.

  • Prepend the UTF-8 encoded request URL to the message hash.

  • Generate the SHA-512 HMAC of the string generated in step 7 using your API secret as the key.

  • Base 64 encode the HMAC digest generated in step 8. This is the request signature.

3. How do I make a request?

  • Generate the request information (URL, HTTP verb, and, if required, the request body).

  • Sign the request using the steps above. Note the signature, timestamp, and nonce.

  • Generate the authorization header by concatenating the client key with a colon separator (’:’) and the signature. The resulting string should look like “clientkey:signature”.

  • Set the following headers on the request:

    Authorization: The authorization header created in step 3
    X-Auth-Timestamp: The timestamp
    X-Auth-Nonce: The nonce
    Content-Type: "application/json"
  • The request can now be made using the URL, HTTP verb, request body (if required), and the headers.

Sample Code

Generated by aglio on 02 Jul 2018