Introduction

Bitme provides a REST API that you can use to build applications on top of.

All data is transferred securely over HTTPS. Non-public requests are verified using HMAC signatures to ensure the authenticity of the request.

For code examples and language-specific wrappers, take a look at our GitHub.

Questions? Feedback? Need help accomplishing a task? Contact Us.

Errors

The API will attempt to respond with the most appropriate HTTP response code whenever possible. When the API call completes successfully, the API will always return HTTP response code 200 OK. When responding with a non-200 HTTP response code, the API will return a single error object. This error object will contain an API code (not to be confused with the HTTP response code) and message that will describe what went wrong. The error object will also contain the HTTP response code as http_code.

When checking for errors, you should use the HTTP response code, or the API code to be more specific. Don't use the message, as they are subject to change at any time.

{
    "error": {
        "code": 1101,
        "http_code": 401,
        "message": "Invalid API key"
    }
}

HTTP Response Codes

  • 200 OK - Success
  • 400 Bad Request - Invalid request parameters
  • 401 Unauthorized - Authentication for the request failed
  • 403 Forbidden - Request understood, but was rejected for some reason
  • 404 Not Found - The API call does not exist
  • 420 Enhance Your Calm - Your request rate is too high, you are being rate limited
  • 500 Internal Server Error - Something went wrong, you should contact us
  • 503 Service Temporarily Unavailable - The service is unavailable, it may be down for maintenance or other issues

Error Codes

The Bitme API-specific error codes are 4 digits, starting with 1000. These can be used to know why exactly a request failed. HTTP response codes are too generic for this purpose. Each group of 100 codes (example: 10001099) represent a category of errors.

Every API call may return a code in the 1000 (generic errors), 1100 (authentication errors), and 1700 (rate limiting) range. Additional possible codes specific to each API call are listed in the section of those calls below.

The first code in each category (ending in 00), coinciding with a HTTP response code of 500, is a generic catch-all for the category. If you see this, then something has gone wrong and you should contact us.

Generic Errors
code http_code message
1000 500 Unknown error
1001 404 The requested resource was not found
1002 400 Invalid request parameter value
1003 503 API is temporarily unavailable
Authentication Errors
code http_code message
1100 500 Unknown authentication error
1101 401 Invalid API key
1102 401 Invalid nonce
1103 401 Invalid signing hash
1104 403 This feature is currently invite-only
1105 403 Invalid username and/or password
1106 403 Error creating API key
1107 403 Incorrect totp
1108 403 Error deleting API keys
1200 500 Unknown transaction error
Transactional Errors
code http_code message
1201 403 Insufficient available account balance
1202 403 Cannot exceed deposit limit
1203 403 Cannot exceed withdrawal limit
1205 500 Failed to get an exact deposit amount, please try again with a different desired deposit amount
1206 403 You do not currently have an active exact deposit amount
1207 403 A cleared transaction's status cannot be changed
1208 403 The given amount is below the required minimum amount for this type of transaction
1209 403 You are unable to deposit the minimum required amount at this time
1210 500 A transactional conflict has occurred, please try again
1211 403 Unable to clear pending marked deposit with given amount
Order Errors
code http_code message
1400 500 Unknown order error
1401 403 Cannot have more than 100 open orders
1402 403 Cannot create an order that will execute against own order
1403 403 Execution quantity larger than maximum amount possible between given orders
Rate Limit Errors
code http_code message
1500 500 Unknown error relating to a user
1501 403 Invalid user
1502 420 You have been locked out for 30 minutes due to failed login attempts
1503 420 Your account has been locked for 30 minutes due to failed login attempts
1504 403 The given email address is already in use
1505 403 Cannot use same user
1506 403 User must agree to terms of use
1507 403 There was a problem retrieving your user information
1700 500 Unknown rate limiting error
1701 420 You are being rate limited, lower your request rate
1702 420 You must wait at least 24 hours before requesting another password reset
1703 420 You cannot create a new marked deposit if you already have a pending one
1704 420 You are being temporarily rate limited from being able to create marked deposits
1705 420 You have reached your bank account limit
1706 420 You have reached your bank account limit for the current period
1707 420 User verification is being rate limited
Security Errors
code http_code message
1800 500 Unknown account security error
1801 403 Security questions have not been selected for this account
1802 403 The given code is either invalid or has expired
1803 403 You cannot select a question more than once
1804 403 User does not have an active Two-factor Token key
1805 403 Invalid Two-factor Token
1806 403 Invalid password
1807 403 Invalid Questions/Answers
1808 403 User has already enabled two-factor authentication
1809 403 Failed to generate two-factor key
1810 403 Unable to save two-factor key
1811 403 User has not created two-factor key yet
1812 403 Unable to activate two-factor key
Currency Errors
code http_code message
1900 500 Unknown currency error
1901 403 Invalid currency pair
Bank Account Errors
code http_code message
2000 500 Unknown bank account error
2001 403 Invalid ABA Routing Number
2002 403 Invalid IFSC Code
User Data Errors
code http_code message
2100 500 Unknown user data error
2101 404 User has no active user data
2102 404 User has not attempted verification yet
2103 403 Invalid user data
2104 403 User has entered personal information already
2105 403 An error occured while trying to verify your account; Please try again later
2106 403 Failed to save verification results
2107 403 There was a problem saving the personal information of the user
2108 403 There was a problem upgrading user account to verified
2109 403 User has already verified their identity
2110 403 There was a problem retrieving the account setup information
2111 403 There was a problem retrieving the document verification status
2112 403 There was a problem retrieving questions to verify the account
2113 403 Failed to check current verification level
2114 403 User account has not been fully set up yet
2115 403 Unable to verify user; Fallback to manual process
2116 403 Only US users should POST answers to verification questions
2117 403 Verification questions form data is invalid
2118 403 Failed to process answers, please try again later
2119 403 Error starting the timer on verification questions response
2120 403 Error getting the timer on verification questions response
2201 403 Authy error
2202 403 User does not have a verified phone yet
2203 403 User has already verified the phone number
2204 403 Invalid verification code

Authentication

For API calls that require authentication the following applies:

Each request must contain a request parameter called nonce in addition to the specific parameters for each API call. Every API request sent for the lifetime of an API key must include an ever-incrementing nonce value. A simple way of doing this is to use the Unix epoch as nonce.

Each request must also contain two HTTP request headers:

  • Rest-Key - your API key
  • Rest-Sign - a SHA-512 HMAC of the request parameters (including nonce) using your API secret

GET /rest/verify-credentials

Verifies credentials (Rest-Key and Rest-Sign headers and nonce parameter). If just getting started with the API in your development environment, getting this to return HTTP response code 200 OK would be a good first goal to have.

  • Requires Auth? Yes
Request Parameters

None specific to this request

Error Codes

None specific to this request (see Error Codes)

Response Body

Returns an empty JSON object on success

{}

User Management

POST /rest/join

Creates a user account and sends confirmation email.

  • Requires Auth? No
Request Parameters
  • email
  • password
Error Codes

None specific to this request (see Error Codes section)

Response Body

Returns an empty JSON object on success

{}

POST /rest/login

Authenticates and issues a temporary API key to be used with all subsequent requests. Note that the user must have completed the email verification triggered by the "join" call to be able to login.

  • Requires Auth? No
Request Parameters
  • email
  • password
Error Codes
  • 1105 - Invalid username and/or password
Response Body

Returns temporary API key on success

{
    "api_key":
    {
        "label": "initial",
        "api_key": "78212eb7-3ee9 [snipped]",
        "secret": "DVH8aHVhG8uvjFpPhdPCSNiwZX [snipped]"
    }
}

POST /rest/logout

Expires the temporary API token issued in the "login" call.

  • Requires Auth? Yes
Request Parameters

None specific to this request

Error Codes

None specific to this request (see Error Codes)

Response Body

Returns an empty JSON object on success

{}

Account Setup

POST /rest/verify-phone

Sends verification code via sms or voice to user's phone.

  • Requires Auth? Yes
Request Parameters
  • phone - Phone number to send verification code to
Error Codes

None specific to this request (see Error Codes)

Response Body

Returns user_phone object if verification code was sent successfully.

{
  "user_phone": {
    "phone: "+15005550006",
    "phone_display": "+x xxx-xxx-xx06",
    "created": "2014-07-14T10:29:16.502Z"
  }
}

POST /rest/verify-phone/verify-code

Verify phone number verification code sent via POST /rest/verify-phone

  • Requires Auth? Yes
Request Parameters
  • verify_code - Verification code
Error Codes
  • 2203 - User has already verified the phone number
  • 2204 - Invalid verification code
Response Body

Returns user_phone object on success

{
  "user_phone": {
    "phone": "+15005550006",
    "phone_display": "+x xxx-xxx-xx06",
    "created": "2014-07-14T10:33:13.386Z"
  }
}

POST /rest/user-data

Sets account user data for a user. Either ssn4 or passport must be given, but not both.

  • Requires Auth? Yes
Request Parameters
  • first_name - First Name
  • middle_name - Middle Name
  • last_name - Last Name
  • gender - Gender ('M' or 'F')
  • dob - Date of Birth (mm/dd/yyyy format)
  • ssn4 - Last 4 digits of Social Security Number
  • passport - Passport number
  • address - Address, part 1
  • address2 - Address, part 2
  • city - City
  • region - Region
  • postal_code - ZIP / PIN code
Error Codes
  • 1707 - User verification is being rate limited
  • 2103 - Invalid user data
  • 2105 - An error occured while trying to verify account
  • 2107 - There was a problem saving the personal information of the user
  • 2108 - There was a problem upgrading user account to verified
  • 2115 - Unable to verify user; Fallback to manual process
  • 2202 - User does not have a verified phone yet
Response Body

Returns an empty JSON object on success

{}

POST /rest/verify-questions/new

Retrieve identity verification questions for the user

  • Requires Auth? Yes
Request Parameters

None specific to this request

Error Codes
  • 2109 - User has already verified their identity
  • 2111 - There was a problem retrieving the document verification status
  • 2112 - There was a problem retrieving questions to verify the account
  • 2119 - Error starting the timer on verification questions response
Response Body

Returns a JSON object with an array of questions on success

{
    "fallbackManual": false,
    "questions": [{
        "question": "Which one of the following counties is associated with you?",
        "id": 1,
        "answers": [{
            "answer": "Sangamon",
            "answer_id": 1
        }, {
            "answer": "Jasper",
            "answer_id": 2
        }, {
            "answer": "Orleans",
            "answer_id": 3
        }, {
            "answer": "Niagara",
            "answer_id": 4
        }, {
            "answer": "None Of The Above",
            "answer_id": 5
        }]
    }, {
        "question": "Which one of the following zip codes is associated with you?",
        "id": 2,
        "answers": [{
            "answer": "49230",
            "answer_id": 1
        }, {
            "answer": "49184",
            "answer_id": 2
        }, {
            "answer": "49557",
            "answer_id": 3
        }, {
            "answer": "49993",
            "answer_id": 4
        }, {
            "answer": "None Of The Above",
            "answer_id": 5
        }]
    }, {
        "question": "Which one of the following addresses is associated with you?",
        "id": 3,
        "answers": [{
            "answer": "52 Canandaigua Rd",
            "answer_id": 1
        }, {
            "answer": "221 Wolf Lake",
            "answer_id": 2
        }, {
            "answer": "902 Grass Lake Rd",
            "answer_id": 3
        }, {
            "answer": "309 Colver Rd",
            "answer_id": 4
        }, {
            "answer": "None Of The Above",
            "answer_id": 5
        }]
    }, {
        "question": "Which one of the following adult individuals is most closely associated with you?",
        "id": 4,
        "answers": [{
            "answer": "Julian",
            "answer_id": 1
        }, {
            "answer": "Cecilia",
            "answer_id": 2
        }, {
            "answer": "Nathan",
            "answer_id": 3
        }, {
            "answer": "Nicole",
            "answer_id": 4
        }, {
            "answer": "None Of The Above",
            "answer_id": 5
        }]
    }, {
        "question": "Which one of the following area codes is associated with you?",
        "id": 5,
        "answers": [{
            "answer": "904",
            "answer_id": 1
        }, {
            "answer": "336",
            "answer_id": 2
        }, {
            "answer": "812",
            "answer_id": 3
        }, {
            "answer": "832",
            "answer_id": 4
        }, {
            "answer": "None Of The Above",
            "answer_id": 5
        }]
    }]
}

POST /rest/verify-questions/verify

Verify user by answering verification questions

  • Requires Auth? Yes
Request Parameters
  • answers - Array of answer_ids to questions given in POST /rest/verify-questions/new
Error Codes
  • 2106 - Failed to save verification results
  • 2112 - There was a problem retrieving questions to verify the account
  • 2115 - Unable to verify user; Fallback to manual process
  • 2116 - Only US users should POST answers to verification questions
  • 2117 - Verification questions form data is invalid
  • 2118 - Failed to process answers
  • 2120 - Error getting the timer on verification questions response
Response Body

Returns an empty JSON object on success

{}

Account Management

GET /rest/2factor/status

Returns whether two factor authentication has been enabled, and the type of two factor authentication in use.

  • Requires Auth? Yes
Request Parameters

None specific to this request

Error Codes

None specific to this request (see Error Codes)

Response Body
{
    "2factor":
    {
        "enabled":false,
        "type":null
    }
}

POST /rest/2factor/totp/secret

Generates a new TOTP secret, but does not actually enable 2-factor authentication yet

  • Requires Auth? Yes
Request Parameters

None specific to this request

Error Codes
  • 1808 - User has already enabled two-factor authentication
  • 1809 - Failed to generate two-factor key
  • 1810 - Unable to save two-factor key
Response Body
{
    "2factor":
    {
        "secret": "GYYGIYJSGA2TAMBYGA2WKYZ [snipped]",
        "uri": "otpauth://totp/ [snipped]",
        "image": "data:image/png;base64,iVBORw0KGgoAAAA [snipped]",
    }
}

POST /rest/2factor/totp/enable

Enables two factor authentication on a user's account

  • Requires Auth? Yes
Request Parameters
  • password
  • 2factor_token
Error Codes
  • 1805 - Invalid Two-factor Token
  • 1808 - User has already enabled two-factor authentication
  • 1811 - User has not created two-factor key yet
  • 1812 - Unable to activate two-factor key
Response Body

Returns an empty JSON object on success

{}

POST /rest/password

Change user's current password

  • Requires Auth? Yes
Request Parameters
  • current_password
  • new_password
  • 2factor_token (if user has 2factor enabled)
Error Codes

None specific to this request (see Error Codes)

Response Body

Returns an empty JSON object on success

{}

GET /rest/security-questions/new

Creates and returns user's security questions.

  • Requires Auth? Yes
Request Parameters
  • show_questions (boolean, default: false) - whether to show questions (requires secondary login), if not true, then questions in the response will not exist.
  • 2factor_token (if user has 2-factor enabled)
  • current_password (if user does not have 2-factor enabled)
Error Codes

None specific to this request (see Error Codes)

Response Body
{
    "questions": [{
        "id": "1",
        "question": "What was your childhood nickname?"
    }, {
        "id": "2",
        "question": "What is the name of your favorite childhood friend?"
    }, {
        "id": "3",
        "question": "What is your oldest sibling's middle name"
    }, {
        "id": "4",
        "question": "What is your maternal grandmother's maiden name?"
    }, {
        "id": "5",
        "question": "In what city or town was your first job?"
    }, {
        "id": "6",
        "question": "What is the name of a college you applied to but didn't attend?"
    }, {
        "id": "7",
        "question": "What was your dream job as a child?"
    }, {
        "id": "8",
        "question": "What is the name of your favorite childhood teacher?"
    }, {
        "id": "9",
        "question": "What is the street number of the place where you grew up?"
    }],
    "hasTwoFactor": false,
    "hasSecurityQuestions": false,
    "numOfQuestions": 3
}

GET /rest/security-questions

Returns all available security questions available for a user to choose from.

Please note that these are subject to change at any time. Do not count on a certain question and/or id always existing.

  • Requires Auth? No
Request Parameters

None specific to this request

Error Codes

None specific to this request (see Error Codes)

Response Body
{
  "security_questions": {
    "questions": [
      {
        "id": "1",
        "question": "What was your childhood nickname?"
      },
      {
        "id": "2",
        "question": "What is the name of your favorite childhood friend?"
      },
      {
        "id": "3",
        "question": "What is your oldest sibling's middle name?"
      },
      {
        "id": "4",
        "question": "What is your maternal grandmother's maiden name?"
      },
      {
        "id": "5",
        "question": "In what city or town was your first job?"
      },
      {
        "id": "6",
        "question": "What is the name of a college you applied to but didn't attend?"
      },
      {
        "id": "7",
        "question": "What was your dream job as a child?"
      },
      {
        "id": "8",
        "question": "What is the name of your favorite childhood teacher?"
      },
      {
        "id": "9",
        "question": "What is the street number of the place where you grew up?"
      }
    ]
  }
}

POST /rest/security-questions/new

Changes user's security questions and corresponding answers

  • Requires Auth? Yes
Request Parameters
  • questions - Array of question numbers being answered
  • answers - Array of answers
  • password
  • totp
Error Codes

None specific to this request (see Error Codes)

Response Body

Returns an empty JSON object on success

{}

POST /rest/api-key/temp-extend

Extends validity of the temporary API key

  • Requires Auth? Yes
Request Parameters

None specific to this request

Error Codes

None specific to this request (see Error Codes)

Response Body

Returns an empty JSON object on success

{}

POST /rest/api-key

Generate a new api key and secret for the user

  • Requires Auth? Yes
Request Parameters

None specific to this request

Error Codes

None specific to this request (see Error Codes)

Response Body

Returns API key and corresponding label, secret and creation timestamp on success

{
  "api_key": {
    "label": "fullkey",
    "api_key": "8bcd610c-fb1e-4979 [snipped]",
    "secret": "nQz/dIPtVkMlwphQHDfEhUaU5dcIUUQ1K [snipped]"
    }
}

GET /rest/api-keys

Lists user's current API keys

  • Requires Auth? Yes
Request Parameters
  • password
  • totp
Error Codes

None specific to this request (see Error Codes)

Response Body

Returns API keys and corresponding labels, secrets and creation timestamps on success

{
  "api_keys": [
    {
      "label": "fullkey",
      "api_key": "d7228d82-055f-434d-b9ee-1fae66963295",
      "secret": "rh/8357LorQN6gx76unWKgKxCnLvsgUTMq+Ar34prrlj [snipped]",
      "created": "2014-06-03T16:52:30.653Z"
    },
    {
      "label": "initial",
      "api_key": "45ed65b7-a055-49c5-8a12-2e78e9a72ae0",
      "secret": "cSqHAfq22EXYQ/nVnWnFhhokX8e4RBJq1FLrEf2kDle7 [snipped]",
      "created": "2014-06-03T16:52:30.501Z"
    }
  ]
}

POST /rest/api-key/delete

Deletes 1 or more API keys

  • Requires Auth? Yes
Request Parameters
  • password
  • totp
  • api_keys - Array of API keys to be deleted
Error Codes

None specific to this request (see Error Codes)

Response Body

Returns an array of api_keys that were deleted

{
  "api_keys": [
    {
      "label": "login session",
      "api_key": "c3301295-2a90-4c26-b814-02e726bc2d45",
      "secret": "DjApS5H14whnstU+CSgIMKdQ84eeRvDXOAhbCLMaHBMAYprnrS0Kr6Jwj2nyQPgA4c27IBNUQKUaLeNNEQviBA==",
      "expires": "2014-07-14T10:09:36.760Z",
      "created": "2014-07-14T10:09:36.208Z"
    },
    {
      "label": "fullkey",
      "api_key": "b12b769c-3b90-464e-b230-c394f939c0a1",
      "secret": "CgKs7hzDYZ4bVwCZuVdypQGZ0e2Pt9Tw82iGx3p/oEcch7OORTNJwmYMhhjEh7sHfKKpCHPLoXaWqE7HxJMAsg==",
      "expires": "2014-07-14T10:09:36.760Z",
      "created": "2014-07-14T10:09:36.469Z"
    }
  ]
}

Accounts

GET /rest/accounts

Gets user's account balances.

  • Requires Auth? Yes
Request Parameters

None specific to this request

Error Codes

None specific to this request (see Error Codes)

Response Body

Returns an array of account objects on success.

{
    "accounts": [
        {
            "currency_cd": "BTC",
            "currency_name": "Bitcoin",
            "balance": "40.39990000000000000000",
            "available": "0.39990000000000000000"
        },
        {
            "currency_cd": "USD",
            "currency_name": "US Dollar",
            "balance": "101.40052440000000000000",
            "available": "100.40052440000000000000"
        }
    ]
}

GET /rest/bitcoin-address

Gets the latest Bitcoin address associated with user's account. New addresses are automatically created 24 hours after the first time an address is used to make a deposit, old addresses will remain functional.

Note that if the deposit amount exceeds any of the user's current account limits then the excess amount will be delayed in becoming available.

  • Requires Auth? Yes
Request Parameters

None specific to this request.

Error Codes

None specific to this request (see Error Codes)

Response Body

Returns an address object on success

  • address - latest Bitcoin address associated with user's account
{
    "address":
    {
        "address": "mocJjuVHSzZLx9o1nUmH5xGEE74rVxJDnN"
    }
}

Orders

POST /rest/order/create

Creates an order based on the given parameters.

Upon response, the order may be completely executed (and automatically closed), partially executed and remain open, or not executed at all and remain open.

  • Requires Auth? Yes
Request Parameters
  • currency_pair - currency pair of the order you are placing (BTCUSD)
  • order_type_cd - character code of the order type to place (BID or ASK)
  • quantity - quantity of the order at the given rate, numeric value accepting precision up to 8 digits, minimum 0.1
  • rate - rate at which you would like to place your order, numeric value accepting precision up to 3 digits
Error Codes
  • 1201
  • 1401
  • 1402
Response Body

Returns an order object on success

  • uuid - UUID of the order
  • order_type_cd - character code of the order type (BID or ASK)
  • currency_pair - currency pair of the order (BTCUSD)
  • rate - rate of the order
  • quantity - quantity of the order at a specific rate
  • executed - quantity of the order that has been executed, the maximum this value will ever be is equal to quantity
  • created - when the order was created in ISO 8601 format
  • closed - when the order was closed in ISO 8601 format, will be null if order is still open
  • executions - array of any executions that have occurred on the order
    • uuid - UUID of the order execution
    • executed - quantity of the order that was executed
    • rate - rate at which the execution occurred
    • created - when the execution occurred in ISO 8601 format
{
    "order": {
        "uuid": "74eb9e44-cbbf-4265-aec5-e39e5bd2e128",
        "order_type_cd": "BID",
        "currency_pair": "BTCUSD",
        "rate": "5.12300000000000000000",
        "quantity": "2.00000000000000000000",
        "executed": "1.00000000000000000000",
        "created": "2012-06-17T11:30:52.607Z",
        "closed": null,
        "executions":
        [
            {
                "uuid": "9c48ff1f-a064-49e1-9c4d-ff39091332b8",
                "executed": "1.00000000000000000000",
                "rate": "5.12345676000000000000",
                "created": "2012-06-17T11:30:52.607Z"
            }
        ]
    }
}

POST /rest/order/cancel

Cancels an order that was previously created and is still open, this includes orders that were never or only partially executed.

  • Requires Auth? Yes
Request Parameters
  • uuid - UUID of order you would like to cancel
Error Codes

None specific to this request (see Error Codes)

Response Body

Returns an order object on success (same as /rest/order/create)

{
    "order": {
        "uuid": "b96d7abf-7b7e-434d-b8ab-9dd81b79564a",
        "order_type_cd": "BID",
        "currency_pair": "BTCUSD",
        "rate": "2.00000000000000000000",
        "quantity": "10.00000000000000000000",
        "executed": "0.00000000000000000000",
        "created": "2012-06-15T05:18:55.464Z",
        "closed": "2012-06-15T05:20:55.488Z",
        "executions": []
    }
}

POST /rest/bitcoin-withdraw

Withdraws bitcoins of the given amount to a given bitcoin address. Note that the user will be charged a 0.0005 BTC fee for each withdrawal. This fee may be subtracted from the given amount if the user does not have enough available balance to cover the fee.

  • Requires Auth? Yes
Request Parameters
  • amount - The amount of bitcoins to withdraw, numeric value accepting precision up to 8 digits, minimum 0.01
  • address - The bitcoin address to send the bitcoins to
Error Codes
  • 1201
Response Body

Returns a transaction object on success

  • id - id of the transaction
  • transaction_type_cd - type of the transaction (will always be 'DEBIT' for this call)
  • transaction_category_cd - category of the transaction (will always be 'BITCOIN' for this call)
  • currency_cd - three character code of the currency the transaction is in (will always be 'BTC' for this call)
  • amount - amount of bitcoins (note this may differ from the given amount)
  • transaction_status_cd - status of the transaction (will always be 'PENDING' for this call)
  • created - when the transaction was created in ISO 8601 format
  • cleared - when the transaction was cleared in ISO 8601 format
{
    "transaction":
    {
        "id": 26,
        "transaction_type_cd": "DEBIT",
        "transaction_category_cd": "BITCOIN",
        "currency_cd": "BTC",
        "amount": "50.00000000000000000000",
        "transaction_status_cd": "PENDING",
        "created": "2013-09-04T09:22:24.745Z",
        "cleared": null
    }
}

GET /rest/transaction/:id

Gets the transaction object for the given transaction

  • Requires Auth? Yes
Request Parameters
  • id - ID of the transaction to retrieve
Error Codes

None specific to this request (see Error Codes)

Response Body

Returns a transaction object on success

  • id
  • transaction_type_cd
  • transaction_category_cd
  • currency_cd
  • amount
  • transaction_status_cd
  • created
  • cleared
{
    "transaction": {
        "id": 26,
        "transaction_type_cd": "DEBIT",
        "transaction_category_cd": "BITCOIN",
        "currency_cd": "BTC",
        "amount": "30.00000000000000000000",
        "transaction_status_cd": "PENDING",
        "created": "2013-09-04T20:32:05.946Z",
        "cleared": null
    }
}

GET /rest/transactions/:currency_cd

Get an array of transactions for the given currency

  • Requires Auth? Yes
Request Parameters
  • currency_cd
  • limit
  • orderBy - "DESC" or "ASC"
  • page
Error Codes

None specific to this request (see Error Codes)

Response Body

Returns an array of transaction objects on success (same as GET /rest/transaction/:id)

GET /rest/order/:uuid

Gets the order object for the given order

  • Requires Auth? Yes
Request Parameters
  • uuid - UUID of the order to retrieve
Error Codes

None specific to this request (see Error Codes)

Response Body

Returns an order object on success (same as /rest/order/create)

{
    "order":
    {
        "uuid": "f3724c4b-e2ae-4817-896f-2fa02238519b",
        "order_type_cd": "BID",
        "currency_pair": "BTCUSD",
        "rate": "2.00000000000000000000",
        "quantity": "10.00000000000000000000",
        "executed": "0.00000000000000000000",
        "created": "2012-06-15T10:35:01.843Z",
        "closed": null,
        "executions": []
    }
}

GET /rest/orders/open

Gets user's open orders.

  • Requires Auth? Yes
Request Parameters

None specific to this request.

Error Codes

None specific to this request (see Error Codes)

Response Body

Returns an orders array on success.

{
    "orders":
    [
        {
            "uuid": "20ade3fd-6161-4edc-89aa-90b5e82b30e5",
            "order_type_cd": "BID",
            "currency_pair": "BTCUSD",
            "rate": "0.50000000000000000000",
            "quantity": "2.00000000000000000000",
            "executed": "0.00000000000000000000",
            "created": "2012-06-18T07:42:47.595Z",
            "executions": []
        },
        {
            "uuid": "a3b34de8-f4d1-4e77-918f-12cd8f194b28",
            "order_type_cd": "ASK",
            "currency_pair": "BTCUSD",
            "rate": "1.00000000000000000000",
            "quantity": "40.00000000000000000000",
            "executed": "5.00000000000000000000",
            "created": "2012-06-17T19:43:14.278Z",
            "executions":
            [
                {
                    "uuid": "56984d87-455f-4192-af69-7d824945721c",
                    "executed": "2.00000000000000000000",
                    "rate": "1.00000000000000000000",
                    "created": "2012-06-18T05:14:25.012Z"
                },
                {
                    "uuid": "1ed5bc71-9f0a-4b49-a04b-a03719168689",
                    "executed": "1.00000000000000000000",
                    "rate": "1.00000000000000000000",
                    "created": "2012-06-18T03:44:22.299Z"
                },
                {
                    "uuid": "80feb0c3-3012-4759-b831-4a47e3ed6c70",
                    "executed": "1.00000000000000000000",
                    "rate": "1.00000000000000000000",
                    "created": "2012-06-17T19:46:23.500Z"
                },
                {
                    "uuid": "bb5af512-2e77-477a-a874-a3544c0cef98",
                    "executed": "1.00000000000000000000",
                    "rate": "1.00000000000000000000",
                    "created": "2012-06-17T19:43:14.278Z"
                }
            ]
        }
    ]
}

GET /rest/orderbook/:currency_pair

Gets the current full orderbook for the given currency pair.

  • Requires Auth? No
Request Parameters
  • currency_pair - currency pair of the orderbook to get (BTCUSD)
Error Codes

None specific to this request (see Error Codes)

Response Body

Returns an orderbook object on success.

{
    "orderbook":
    {
        "bids":
        [
            {
                "order_type_cd": "BID",
                "currency_pair": "BTCUSD",
                "rate": "0.50000000000000000000",
                "quantity": "2.00000000000000000000"
            }
        ],
        "asks":
        [
            {
                "order_type_cd": "ASK",
                "currency_pair": "BTCUSD",
                "rate": "1.00000000000000000000",
                "quantity": "35.00000000000000000000"
            }
        ]
    }
}

GET /rest/compat/orderbook/:currency_pair

Gets a Bitcoin Charts-compatible orderbook for the given currency pair.

  • Requires Auth? No
Request Parameters
  • currency_pair - currency pair of the orderbook to get (BTCUSD)
Error Codes

None specific to this request (see Error Codes)

Response Body

Returns an object with an array of asks and array of bids on success. Each bid/ask is an array, with the first value being the rate (price) and the second value the quantity (amount).

As an example, for the currency_pair BTCUSD, the first value would be the rate (1 BTC = ? USD), and the second value would be the quantity (? BTC).

{
    "asks":
    [
        [
            "6.449",
            "67.23"
        ],
        [
            "6.45",
            "0.09"
        ],
        [
            "6.454",
            "0.12"
        ]
    ],
    "bids":
    [
        [
            "5.788",
            "2.66318"
        ],
        [
            "5.79",
            "48.95943817"
        ],
        [
            "5.790",
            "0.12309412"
        ],
        [
            "5.791",
            "0.020261"
        ]
    ]
}

GET /rest/compat/trades/:currency_pair

Gets a Bitcoin Charts-compatible array of trades for the given currency pair.

Returns trade executions in last 24 hours by default, use since for more control.

  • Requires Auth? No
Request Parameters
  • currency_pair - currency pair of the orderbook to get (BTCUSD)
  • since - (optional) return trades with a higher tid than the given one
Error Codes

None specific to this request (see Error Codes)

Response Body

Returns an array of trade objects on success.

  • date - UNIX epoch of when trade execution occurred
  • price - AKA rate, the price of 1 unit of the base currency in the counter currency
  • amount - AKA quantity, the amount of the counter currency in the execution
  • tid - an ever-incrementing unique integer for each execution
[
    {
        "tid": 1,
        "amount": "1.00000000000000000000",
        "price": "1.00000000000000000000",
        "date": 1340541530
    },
    {
        "tid": 2,
        "amount": "1.00000000000000000000",
        "price": "1.00000000000000000000",
        "date": 1340541530
    },
    {
        "tid": 3,
        "amount": "1.00000000000000000000",
        "price": "1.00000000000000000000",
        "date": 1340541530
    },
    {
        "tid": 4,
        "amount": "0.98100000000000000000",
        "price": "1.00000000000000000000",
        "date": 1340541530
    },
    {
        "tid": 5,
        "amount": "1.00000000000000000000",
        "price": "1.00000000000000000000",
        "date": 1340541632
    }
]