BitGo API Reference (0.1.0)

Download OpenAPI specification:Download

BitGo Engineering: support@bitgo.com

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 the BitGo APIs, 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.

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 the newer version of our API.

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:

$ http -v get https://app.bitgo-test.com/api/v2/user/me Authorization:"Bearer $TEST_TOKEN"
GET /api/v2/user/me HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
Authorization: Bearer v2x83...
Connection: keep-alive
Host: app.bitgo-test.com
User-Agent: HTTPie/1.0.0

HTTP/1.1 200 OK
...

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)

npm install --save bitgo

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

const BitGoJS = require('bitgo');
// Read the user authentication section to get your API access token
const bitgo = new BitGoJS.BitGo({ env: 'test', accessToken: process.env.ACCESS_TOKEN });
const coin = bitgo.coin('tbtc');

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.

We recommend using Docker to run BitGo Express, and we also support running from the source code directly.

To try out BitGo Express, run this command:

docker run -it -p 3080:3080 bitgosdk/express:latest

You should see this output from BitGo Express:

BitGo-Express running
Environment: test
Base URI: http://0.0.0.0:3080

Now you can send a ping request to BitGo Express using curl to make sure the service is up and running:

$ curl localhost:3080/api/v2/ping
{"status":"service is ok!","environment":"BitGo Testnet","configEnv":"testnet","configVersion":79}
  • 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.

For more detailed information, please see the BitGo Express README.

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 app.bitgo-test.com.

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 app.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:

var bitgo = new BitGoJS.BitGo({ env: 'test', accessToken: process.env.ACCESS_TOKEN });
var coin = bitgo.coin('btc');

(replace btc with your desired coin identifier)

<
Identifier Digital Currency Family BitGo Environment Release status
algo Algorand Account Production Enterprise access
btc Bitcoin UTXO-based Production General availability
bch Bitcoin Cash UTXO-based Production General availability
btg Bitcoin Gold UTXO-based Production General availability
celo CELO Account Production Enterprise access
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
trx TRON Account Production General availability
xlm XLM Account Production General availability
xrp XRP Account Production Enterprise access
zec Zcash UTXO-based Production General availability
ae Aeternity ERC20 Token Account Production Enterprise access
aergo Aergo ERC20 Token Account Production Enterprise access
1up Uptrennd Token ERC20 token Account Production Enterprise access
abt ArcBlock ERC20 token Account Production Enterprise access
ace Ace Token Account Production Enterprise access
acxt Ac Exchange Token Account Production Enterprise access
agwd AGARWOOD ERC20 token Account Production Enterprise access
aion AION ERC20 token Account Production Enterprise access
amn Amon ERC20 token Account Production Enterprise access
amo AMO Token ERC20 token Account Production Enterprise access
amp AMP Token ERC20 token Account Production Enterprise access
amon AmonD ERC20 token Account Production Enterprise access
ampx Amplify Exchange ERC20 token Account Production Enterprise access
ana ANA ERC20 token Account Production Enterprise access
ant Aragon ERC20 token Account Production Enterprise access
aoa Aurora ERC20 Token Account Production Enterprise access
appc AppCoins ERC20 token Account Production Enterprise access
aqt Alpha Quark Token Account Production Enterprise access
arct ArCoin US Treasury ERC20 token Account Production Enterprise access
ast AirSwap ERC20 token Account Production Enterprise access
audx eToro Australian Dollar ERC20 token Account Production Enterprise access
axpr aXpire ERC20 token Account Production Enterprise access
bal Balancer ERC20 token Account Production Enterprise access
band Band Protocol ERC20 token Account Production Enterprise access
basic BASIC Token ERC20 token Account Production Enterprise access
bat Basic Attention Token ERC20 token Account Production Enterprise access
bax BABB ERC20 token Account Production Enterprise access
bbx BBX ERC20 token Account Production Enterprise access
bcap BCAP ERC20 token Account Production Enterprise access
bcio Blockchain.io ERC20 Token Account Production Enterprise access
bepro BetProtocol ERC20 token Account Production Enterprise access
bid Blockbid ERC20 token Account Production Enterprise access
bidl Blockbid Liquidity ERC20 token Account Production Enterprise access
bird BirdCoin ERC20 token Account Production Enterprise access
bnk Bankera ERC20 token Account Production Enterprise access
bnl BitNational ERC20 token Account Production Enterprise access
bnt Bancor ERC20 token Account Production Enterprise access
bnty Bounty0x ERC20 token Account Production Enterprise access
box ContentBox ERC20 Token Account Production Enterprise access
brz Brazilian Digital Token ERC20 token Account Production Enterprise access
bsx Bistox Exchange Token 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
busd Binance USD ERC20 token Account Production Enterprise access
buy Buying.com ERC20 token Account Production Enterprise access
c8p C8 Plus ERC20 token Account Production Enterprise access
cadx eToro Canadian Dollar ERC20 token Account Production Enterprise access
cag Change ERC20 token Account Production Enterprise access
cbat Compound BAT ERC20 token Account Production Enterprise access
cbc CashBet Coin ERC20 token Account Production Enterprise access
cbrl Crypto BRL ERC20 token Account Production Enterprise access
cct Cyber Credit Token ERC20 token Account Production Enterprise access
cdag CannDollar ERC20 token Account Production Enterprise access
cdai Compound DAI ERC20 token Account Production Enterprise access
cdt Blox ERC20 token Account Production Enterprise access
cel Celsius ERC20 token Account Production Enterprise access
ceth Compound Ether ERC20 token Account Production Enterprise access
chfx eToro Swiss Frank ERC20 token Account Production Enterprise access
chsb SwissBorg ERC20 token Account Production Enterprise access
cix100 Cryptoindex 100 ERC20 token Account Production Enterprise access
cln Colu Local Network ERC20 token Account Production Enterprise access
clt CoinLoan ERC20 token Account Production Enterprise access
cnyx eToro Chinese Yuan ERC20 token Account Production Enterprise access
comp Compound Token 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
cre CarryToken ERC20 token Account Production Enterprise access
crep Compound Augur ERC20 token Account Production Enterprise access
cro Crypto.com Chain ERC20 token Account Production Enterprise access
crv Curve DAO ERC20 token Account Production Enterprise access
crpt Crypterium ERC20 token Account Production Enterprise access
crpt1 CRPT ERC20 token Account Production Enterprise access
cslv Coineru Silver ERC20 token Account Production Enterprise access
csp Caspian Token ERC20 token Account Production Enterprise access
cusdc Compound USDC ERC20 token Account Production Enterprise access
cvc Civic ERC20 token Account Production Enterprise access
cwbtc Compound WBTC ERC20 token Account Production Enterprise access
czrx Compound ZRX ERC20 token Account Production Enterprise access
dai Dai ERC20 token Account Production Enterprise access
data Streamr DATACoin ERC20 token Account Production Enterprise access
dec Dark Energy Crystals ERC20 token Account Production Enterprise access
dent Dent ERC20 token Account Production Enterprise access
dgd DigixDAO ERC20 token Account Production Enterprise access
dgx Digix ERC20 token Account Production Enterprise access
dmt DMarket ERC20 token Account Production Enterprise access
drpu DRP Utility ERC20 token Account Production Enterprise access
drv Drive ERC20 Token Account Production Enterprise access
dyn DYN Token ERC20 token Account Production Enterprise access
echt eChat ERC20 token Account Production Enterprise access
edn Eden ERC20 token Account Production Enterprise access
edr Endor Protocol ERC20 token Account Production Enterprise access
egl eGold ERC20 token Account Production Enterprise access
egld Elrond Gold ERC20 token Account Production Enterprise access
elf Aelf ERC20 token Account Production Enterprise access
emx EMX ERC20 token Account Production Enterprise access
eng Enigma ERC20 token Account Production Enterprise access
enj Enjin ERC20 token Account Production Enterprise access
ethos Ethos ERC20 token Account Production Enterprise access
etv Ecotech Visions ERC20 token Account Production Enterprise access
eurs Stasis EURS 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
exe EXE Token ERC20 token Account Production Enterprise access
fet Fetch ERC20 token Account Production Enterprise access
ff1 Two Prime FF1 ERC20 token Account Production Enterprise access
fft Fight to Fame Token ERC20 token Account Production Enterprise access
fmf Formosa Financial ERC20 token Account Production Enterprise access
ftm Fantom Token ERC20 token Account Production Enterprise access
ftt FTX Token ERC20 token Account Production Enterprise access
fun FunFair ERC20 token Account Production Enterprise access
fxrt FXRT ERC20 Token Account Production Enterprise access
gbpx eToro Pound Sterling ERC20 token Account Production Enterprise access
gen DAOstack ERC20 token Account Production Enterprise access
ghub Genohub Account Production Enterprise access
gldx eToro Gold ERC20 token Account Production Enterprise access
gec GECoinERC20 token Account Production Enterprise access
gno Gnosis ERC20 token Account Production Enterprise access
gnt Golem ERC20 token Account Production Enterprise access
gold XBullion Token ERC20 token Account Production Enterprise access
got GoExchange ERC20 token Account Production Enterprise access
gto Gifto ERC20 Token Account Production Enterprise access
gusd Gemini Dollar ERC20 token Account Production Enterprise access
gxc Game X Coin ERC20 token Account Production Enterprise access
hedg Huobi Token ERC20 token Account Production Enterprise access
hkdx eToro Hong Kong Dollar ERC20 token Account Production Enterprise access
hlc HalalChain ERC20 token Account Production Enterprise access
hold Hold ERC20 token Account Production Enterprise access
hot Holo ERC20 Token Account Production Enterprise access
hqt HyperQuant ERC20 token Account Production Enterprise access
hst Decision Token ERC20 token Account Production Enterprise access
ht Huobi Token ERC20 token Account Production Enterprise access
hum HumanScape 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
i8 i8 Exchange Token ERC20 token Account Production Enterprise access
idex IDEX Exchange Token ERC20 token Account Production Enterprise access
idrt Rupiah Token ERC20 token Account Production Enterprise access
incx InternationalCryptoX ERC20 token Account Production Enterprise access
ind Indorse ERC20 token Account Production Enterprise access
inf Infinitus Token ERC20 token Account Production Enterprise access
inx INX Token ERC20 token Account Production Enterprise access
isr Insureum ERC20 token Account Production Enterprise access
ivy Ivy Koin ERC20 token Account Production Enterprise access
jbc Japan Brand Coin ERC20 token Account Production Enterprise access
jfin JFIN Coin ERC20 token Account Production Enterprise access
jpyx eToro Japanese Yen ERC20 token Account Production Enterprise access
key SelfKey ERC20 token Account Production Enterprise access
kin Kin ERC20 token Account Production Enterprise access
knc Kyber Network ERC20 token Account Production Enterprise access
koz KOZJIN Token ERC20 token Account Production Enterprise access
kze Almeela ERC20 token Account Production Enterprise access
lba Cred ERC20 token Account Production Enterprise acces
lend EthLend ERC20 token Account Production Enterprise access
leo Bitfinex LEO ERC20 token Account Production Enterprise access