OpenAPI Specification Download
Request Type | Window Size (in Seconds) | Max Number of Requests per Window |
---|---|---|
Authenticated User | 60 | 360 |
Custom API endpoint | Varies | 1200 |
EOS wallet creation | 300 | 10 |
ETH address creation | 3600 | 500 |
ETH wallet creation | 300 | 50 |
Get user | 600 | 60 |
Get user sharing key | 300 | 5 |
JSON payment-protocol operations (deprecated) | 300 | 30 |
Push BTC tx (V1 only) | 1 | 5 |
Push BTC tx (V1 only) | 60 | 20 |
Send OTP | 60 | 3 |
XRP wallet creation | 300 | 50 |
The BitGo API returns the following HTTP status codes:
HTTP Status | Meaning | Description |
---|---|---|
200 | Success | The operation succeeded. |
201 | Created | A new object was created. |
202 | Accepted | The operation succeeded, but requires approval (e.g., sending funds). |
206 | Partial Content | The server is delivering only part of the resource. |
400 | Bad Request | The client request is invalid. |
401 | Unauthorized | Authentication failed (e.g., invalid token specified by the Authorization header). |
403 | Forbidden | Authentication failed, but the operation is not allowed. |
404 | Not Found | Requested resource does not exist. |
429 | Too Many Requests | Client request rate exceeded the limit. |
When the server returns a 4xx status code, the response body contains an error object with the following structure:
1 2 3 4 5
{ "error": "invalid wallet id", "name": "InvalidWalletId", "requestId": "cjo7uw7si0buzttlmazmvthay" }
The name value is an error code that does not change. The error value is a human-readable message which may change.
Certain routes, such as listing wallets or transactions, may return an array of results and require pagination.
By default, the API returns 25 results per request. The limit
parameter can be used to increase the number of results
per request, up to a maximum of 500.
To get the next batch of results, call the same route again with a prevId
request parameter corresponding to the
nextBatchPrevId
property received in the last call.
1 2 3 4 5 6 7 8
bitgo .coin('tbtc4') .wallets() .list({ limit: 50 }) .then(function (wallets) { // print wallet list console.dir(wallets); });
1 2 3
curl \ -H "Authorization: Bearer $ACCESS_TOKEN" \ https://app.bitgo-test.com/api/v2/tbtc4/wallet?limit=50
Example JSON Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
{ "coin": "tbtc4", "wallets": [ { "_wallet": { "id": "585a0860c5a04c696edd2c331ce2f346", "coin": "tbtc4", "label": "V2 TBTC4 Test Wallet", ... } }, ... ], "count": 50, "nextBatchPrevId": "590b73478c8fc40727b0c3d421ec909c" }
For most digital currencies, the wallet, transaction, and address objects have balance
properties that return an
integer value. But some currencies have ranges that exceed values that can be stored as a typical number in JavaScript.
In BitGo Platform V2, balance
properties with a string data type were added for all digital currencies (and have
the suffix, String
). BitGo recommends that you use string balances for all currencies (and not number) to ensure
values do not exceed the programmable number limit.
Integer | String (recommended) |
---|---|
balance | balanceString |
confirmedBalance | confirmedBalanceString |
spendableBalance | spendableBalanceString |