Platform/
V2/
Reference/
Overview

BitGo Platform V2 Reference (2.0.0)

Overview

BitGo provides a simple and robust RESTful API and client SDK to integrate digital currency wallets with your application. In Platform V2, we have extended our API and SDK to allow the management of multiple digital currencies and wallets through a single, unified interface.

The BitGo SDK enables the following:

  • Creation of multi-signature wallets
  • Wallet balance and transaction listing
  • Transaction creation and signing
  • Transaction monitoring and notifications
  • Secure user authentication
  • Multi-user workflows for use in enterprise environments
  • Policies and spending limits

This is the latest documentation for Platform V2, and is generated from OpenAPI 3.0 schema. OpenAPI technology provides improved validation of client requests, and more consistency between the API documentation and server-side implementation of API endpoints. The original V2 API docs and V1 docs are still available for your reference.

Legacy users may also refer to the V1 Bitcoin API, which is still available today. There is no dependency for developers to integrate with V1 or read the legacy documentation in order to take advantage of Platform V2.

Multi-Signature Wallets

The primary advantage of multi-signature wallets is the ability for multiple machines and people to work together to approve a given transaction. Without multiple signatures on a transaction, all credentials to approve a transaction must reside with a single person on a machine. If that person or machine is compromised by an attacker, all funds can be taken with no recourse and no ability to audit the individual that invoked the key.

BitGo's multi-signature wallets allow you to keep control of your Bitcoin or other cryptocurrency despite introducing the concept of a co-signer. This allows enterprises to set up and maintain roles, policies, and rules on the wallet, making digital currency usable for businesses.

For more information, please read the BitGo Whitepaper.

User Authentication

All calls to endpoints that require authentication must pass the client access token via the Authorization HTTP header. The format of this header is "Authorization: Bearer <TOKEN>." Here's an example that uses HTTPie to call the Get session API from the command line:

BitG Platform Reference V2 Overview image 1


You can create an access token in the "Developer Options" tab of the web UI, under "User Settings." An access token can limit access in several ways:

  • Expiration date
  • Allowed operations
  • Allowed client IP addresses

Security note
BitGo's SDK and Express App secures tokens using our Auth V2 protocol, which does not send the access token over the wire. For this reason, we recommend that API requests from 3rd party clients should be proxied through BitGo Express.

Software Development Kit

The BitGo web APIs provide developers with the capability to create and manage multi-signature wallets, manipulate their policies and interact with multiple digital currencies over a single robust interface. Several sensitive operations, such as the creation of user private keys and signing of transactions, must to be performed client-side.

For this reason, we provide and recommend the use of our Software Development Kit (SDK), which implements these client-side wallet features and interfaces with our APIs.

Currently, our SDK is available in JavaScript and runs in either Node.js or a browser. If your application does not use native JavaScript, you may refer to the BitGo Express REST API guide, which offers the same feature set via a local server daemon.

Installing the JavaScript SDK (via npm)

BitG Platform Reference V2 Overview image 2


Installing the JavaScript SDK (via Github)

  • Visit our open-source SDK page on Github
  • Install git and nodejs/npm (recommended to follow the examples)
  • Clone our repository locally by running the command: git clone git@github.com:BitGo/BitGoJS.git
  • In the BitGoJS directory, install dependencies using: npm install
  • Check out the examples directory to see how you can use the SDK! In the example directory, run:

BitG Platform Reference V2 Overview image 3


To initialize your environment and authenticate, use the following code:

BitG Platform Reference V2 Overview image 4

BitGo Express REST API

The BitGo Express REST API is a lightweight service for developers who want to use the BitGo service, but are developing in a language other than JavaScript.

BitGo Express runs as a service in your own data center, and handles the client-side operations involving your own keys, such as partially signing transactions before submitting them to BitGo. This ensures your keys never leave your network, and are never seen by BitGo. BitGo Express can also proxy the standard BitGo REST APIs, providing a unified interface to BitGo through a single REST API.

To use BitGo Express:

  • Install BitGoJS globally:

BitG Platform Reference V2 Overview image 5

  • Run node bitgo-express from the globally installed package:

BitG Platform Reference V2 Overview image 6

  • Make all BitGo REST API calls to the machine on which bitgo-express is running. BitGo Express will either handle the request itself or proxy it to the BitGo service.

You can use curl to verify that BitGo Express is running:
BitG Platform Reference V2 Overview image 7


Note: It is not recommended to install or run bitgo-express as root (superuser). However, if you need to install as root, you must install using npm install --unsafe-perm -g bitgo.

BitGo Express Proxy Support

BitGo Express can also make requests to BitGo via a proxy. This can be done by setting the BITGOUSEPROXY environment variable to the URI where your proxy is listening.

For example, to instruct BitGo Express to use a SOCKS proxy which is listening at 192.0.2.1 on port 12000, you should start BitGo Express with the following command:

BitG Platform Reference V2 Overview image 8


BitGo Express currently supports the following proxy protocols:

  • HTTP
  • HTTPS
  • SOCKSv4
  • SOCKSv5
  • PAC

Environments

BitGo has two separate environments available for development and production. For security reasons, all BitGo API requests are made using TLS over HTTPS.

Test Environment
The BitGo test environment is used by default in our examples and the SDK. It is entirely separate from BitGo's production environment and there is no overlap in either data or accounts. You will need to create accounts at test.bitgo.com.

BitGo Test Site: https://test.bitgo.com/ Test Environment API: https://test.bitgo.com/api/v2 In the test environment, you can use 0000000 in place of the OTP when authenticating.

This environment is connected to the TestNet networks of various digital currencies we support. Tokens on these networks can be obtained from faucets and do not represent real money.

Production Environment
The BitGo production endpoint is live and used by partners and our own web application on www.bitgo.com.

To use this environment, specify { env: 'prod' } when using the SDK or -e prod when running BitGo Express. SSL certifications should be provided to secure traffic to and from the BitGo Express instances when operating on the Production environment.

Coin / Digital Currency Support

BitGo Platform V2 supports a variety of digital currencies, with more being added every quarter.

To select the coin or token:

BitG Platform Reference V2 Overview image 9


(Replace btc with your desired coin identifier.)
Identifier Digital Currency Family BitGo Environment Release status
btc Bitcoin UTXO-based Production General availability
bch Bitcoin Cash UTXO-based Production General availability
bsv Bitcoin SV UTXO-based Production General availability
btg Bitcoin Gold UTXO-based Production General availability
dash Dash UTXO-based Production General availability
eth Ethereum Account Production Enterprise access
ltc Litecoin UTXO-based Production General availability
rmg Royal Mint Gold UTXO-based Production Enterprise access
xlm XLM Account Production General availability
xrp XRP Account Production Enterprise access
zec Zcash UTXO-based Production General availability
aion AION ERC20 token Account Production Enterprise access
amn Amon ERC20 token Account Production Enterprise access
ana ANA ERC20 token Account Production Enterprise access
ant Aragon ERC20 token Account Production Enterprise access
appc AppCoins ERC20 token Account Production Enterprise access
ast AirSwap ERC20 token Account Production Enterprise access
audx eToro Australian Dollar ERC20 token Account Production Enterprise access
bat Basic Attention Token ERC20 token Account Production Enterprise access
bbx BBX ERC20 token Account Production Enterprise access
bcap BCAP ERC20 token Account Production Enterprise access
bid Blockbid ERC20 token Account Production Enterprise access
bnt Bancor ERC20 token Account Production Enterprise access
bnty Bounty0x ERC20 token Account Production Enterprise access
btt Blocktrade ERC20 token Account Production Enterprise access
btu BTU Protocol ERC20 token Account Production Enterprise access
brd Bread ERC20 token Account Production Enterprise access
cadx eToro Canadian Dollar ERC20 token Account Production Enterprise access
cag Change ERC20 token Account Production Enterprise access
cbc CashBet Coin ERC20 token Account Production Enterprise access
cdag CannDollar ERC20 token Account Production Enterprise access
cdt Blox ERC20 token Account Production Enterprise access
cel Celsius ERC20 token Account Production Enterprise access
cgld Coineru Gold ERC20 token Account Production Enterprise access
chfx eToro Swiss Frank ERC20 token Account Production Enterprise access
chsb SwissBorg ERC20 token Account Production Enterprise access
cln Colu Local Network ERC20 token Account Production Enterprise access
cnyx eToro Chinese Yuan ERC20 token Account Production Enterprise access
cpay Cryptopay ERC20 token Account Production Enterprise access
cplt Coineru Platinum ERC20 token Account Production Enterprise access
cqx Coinquista Coin ERC20 token Account Production Enterprise access
cro Crypto.com Chain ERC20 token Account Production Enterprise access
cslv Coineru Silver ERC20 token Account Production Enterprise access
cvc Civic ERC20 token Account Production Enterprise access
dai Dai ERC20 token Account Production Enterprise access
dent Dent ERC20 token Account Production Enterprise access
dgx Digix ERC20 token Account Production Enterprise access
drpu DRP Utility ERC20 token Account Production Enterprise access
echt eChat ERC20 token Account Production Enterprise access
egl eGold ERC20 token Account Production Enterprise access
elf Aelf ERC20 token Account Production Enterprise access
ethos Ethos ERC20 token Account Production Enterprise access
eurx eToro Euro ERC20 token Account Production Enterprise access
eux EUR Stable Token ERC20 token Account Production Enterprise access
fet Fetch ERC20 token Account Production Enterprise access
fmf Formosa Financial ERC20 token Account Production Enterprise access
fun FunFair ERC20 token Account Production Enterprise access
gbpx eToro Pound Sterling ERC20 token Account Production Enterprise access
gen DAOstack ERC20 token Account Production Enterprise access
gldx eToro Gold ERC20 token Account Production Enterprise access
gno Gnosis ERC20 token Account Production Enterprise access
gnt Golem ERC20 token Account Production Enterprise access
gusd Gemini Dollar ERC20 token Account Production Enterprise access
hedg Huobi Token ERC20 token Account Production Enterprise access
hold Hold ERC20 token Account Production Enterprise access
hst Decision Token ERC20 token Account Production Enterprise access
ht Huobi Token ERC20 token Account Production Enterprise access
hxro Hxro ERC20 token Account Production Enterprise access
hyb Hybrid Block ERC20 token Account Production Enterprise access
hydro Hydro ERC20 token Account Production Enterprise access
incx InternationalCryptoX ERC20 token Account Production Enterprise access
ind Indorse ERC20 token Account Production Enterprise access
isr Insureum ERC20 token Account Production Enterprise access
jpyx eToro Japanese Yen ERC20 token Account Production Enterprise access
kin Kin ERC20 token Account Production Enterprise access
knc Kyber Network ERC20 token Account Production Enterprise access
kze Almeela ERC20 token Account Production Enterprise access
lba Cred ERC20 token Account Production Enterprise acces
lgo LGO Exchange ERC20 token Account Production Enterprise access
lion CoinLion ERC20 token Account Production Enterprise access
lnc Linker Coin ERC20 token Account Production Enterprise access
mco Crypto.com ERC20 token Account Production Enterprise access
mdx Mandala ERC20 token Account Production Enterprise access
mfg SyncFab ERC20 token Account Production Enterprise access
mkr Maker ERC20 token Account Production Enterprise access
mtl Metal ERC20 token Account Production Enterprise access
nexo Nexo ERC20 token Account Production Enterprise access
neu Neumark ERC20 token Account Production Enterprise access
nmr Numeraire ERC20 token Account Production Enterprise access
npxs Pundi X ERC20 token Account Production Enterprise access
nzdx eToro New Zealand Dollar ERC20 token Account Production Enterprise access
omg OmiseGo ERC20 token Account Production Enterprise access
opt OPTin Token ERC20 token Account Production Enterprise access
orbs Orbs Token ERC20 token Account Production Enterprise access
pax Paxos ERC20 token Account Production Enterprise access
pay TenX ERC20 token Account Production Enterprise access
pdata Opiria Token ERC20 token Account Production Enterprise access
plc PlusCoin ERC20 token Account Production Enterprise access
plx PLN Stable Token ERC20 token Account Production Enterprise access
poly Polymath ERC20 token Account Production Enterprise access
powr Power Ledger ERC20 token Account Production Enterprise access
ppt Populous ERC20 token Account Production Enterprise access
prdx PRDX Token ERC20 token Account Production Enterprise access
pro Propy ERC20 token Account Production Enterprise access
qash QASH ERC20 token Account Production Enterprise access
qrl Quantum ERC20 token Account Production Enterprise access
qsp Quantstamp ERC20 token Account Production Enterprise access
qvt Qvolta ERC20 token Account Production Enterprise access
rdn Raiden Network Token ERC20 token Account Production Enterprise access
reb Regblo ERC20 token Account Production Enterprise access
rebl Rebellious ERC20 token Account Production Enterprise access
rep Augur ERC20 token Account Production Enterprise access
rfr Refereum ERC20 token Account Production Enterprise access
roobee ROOBEE ERC20 token Account Production Enterprise access
rubx eToro Russian Ruble ERC20 token Account Production Enterprise access
salt Salt ERC20 token Account Production Enterprise access
shk iShook ERC20 token Account Production Enterprise access
shr ShareToken ERC20 token Account Production Enterprise access
slot AlphaSlot ERC20 token Account Production Enterprise access
slvx eToro Silver ERC20 token Account Production Enterprise access
snov Snovio ERC20 token Account Production Enterprise access
snt Status Network Token ERC20 token Account Production Enterprise access
spo Sparrow Options ERC20 token Account Production Enterprise access
srnt Serenity ERC20 token Account Production Enterprise access
storj Storj ERC20 token Account Production Enterprise access
storm Storm ERC20 token Account Production Enterprise access
taud TrueAUD ERC20 token Account Production Enterprise access
ten Tokenomy ERC20 token Account Production Enterprise access
tenx TenX Token ERC20 token Account Production Enterprise access
tiox Trade Token X ERC20 token Account Production Enterprise access
tkx Tokenize ERC20 token Account Production Enterprise access
tnt Tierion ERC20 token Account Production Enterprise access
trst WeTrust ERC20 token Account Production Enterprise access
tusd TrueUSD ERC20 token Account Production Enterprise access
ukg UnikoinGold ERC20 token Account Production Enterprise access
upbtc Universal Bitcoin ERC20 token Account Production Enterprise access
upp Sentinel Protocol ERC20 token Account Production Enterprise access
upt Universal Protocol Token ERC20 token Account Production Enterprise access
upusd Universal US Dollar ERC20 token Account Production Enterprise access
usdt Tether ERC20 Token Account Production Enterprise access
usdx eToro United States Dollar ERC20 token Account Production Enterprise access
usx USD Stable Token ERC20 token Account Production Enterprise access
vdx Vodi X ERC20 token Account Production Enterprise access
wax Worldwide Asset eXchange ERC20 token Account Production Enterprise access
wht Whatshalal ERC20 token Account Production Enterprise access
wtc WaltonChain ERC20 token Account Production Enterprise access
xrl Rialto ERC20 token Account Production Enterprise access
zco Zebi Coin ERC20 token Account Production Enterprise access
zil Zilliqa ERC20 token Account Production Enterprise access
zrx 0x ERC20 token Account Production Enterprise access
tbtc Bitcoin Testnet UTXO-based Test General availability
tbch Bitcoin Cash Testnet UTXO-based Test General availability
tbsv Bitcoin SV Testnet UTXO-based Test General availability
tdash Dash Testnet UTXO-based Test General availability
teth Ethereum Kovan Testnet Account Test Enterprise access
terc Ethereum ERC20 Token Testnet Account Test Enterprise access
test Test Mintable ERC20 Token Testnet Account Test Enterprise access
tltc Litecoin Testnet UTXO-based Test General availability
trmg Royal Mint Gold Testnet UTXO-based Test Enterprise access
txlm XLM Testnet Account Test General availability
txrp XRP Testnet Account Test Enterprise access
tzec Zcash Testnet UTXO-based Test Enterprise access

Please note: Although changing the base coin identifier will result in usable wallets and addresses that conform to the same interface, users should be aware of the coin-specific implementation, which may change how blockchain fees are assessed.

HTTP Status Codes

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)
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

Error Handling

When the server returns a 4xx status code, the response body contains an error object with the following structure:


BitG Platform Reference V2 Overview image 10


The name value is an error code that does not change. The error value is a human-readable message which may change.


Pagination

Certain routes, such as listing wallets or transactions, may return an array of results.

By default, the API will return 25 results per request. The limit parameter may 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.


BitG Platform Reference V2 Overview image 11


Example JSON Response:

BitG Platform Reference V2 Overview image 12


Balance Strings

On most digital currencies, the wallet, transaction and address objects all contain a balance property.

In BitGo Platform V2, we have introduced a String suffix for all balances, as certain digital currencies (such as Ethereum) feature balance ranges which exceed those that can be stored as a typical number in JavaScript.

While the balance property will continue to be a number, it will not be available on all currencies across the V2 platform. We recommend using balanceString instead of balance for this reason, and balanceString will be available as a property over all digital currencies on V2. This applies to all number properties.

BitGo UTXO Library

The BitGo UTXO Library (bitgo-utxo-lib) is an open source library for UTXO transaction building and does not require a BitGo account or the BitGo SDK to be used. The bitgo-utxo-lib allows any developer working with UTXO-based blockchains to easily build and sign their own transactions.

Learn more about the BitGo UTXO Library here.

Prev
February 24th, 2019
BitGo Supports Ethereum Constantinople Hard Fork
Next
August 16th, 2016
Believing in Bitcoin
Be One With the Code

Get started on the same great wallet used by over 40 Bitcoin Exchanges around the world & Integrate multiple digital currencies into your application with a single unified API.

Learn More
Contact Us