Skip to content

Instantly share code, notes, and snippets.

@bytenik
Created July 10, 2019 11:39
Show Gist options
  • Save bytenik/c533d96eeae399a31279bdf6b9ee4efd to your computer and use it in GitHub Desktop.
Save bytenik/c533d96eeae399a31279bdf6b9ee4efd to your computer and use it in GitHub Desktop.
Bitgo Swagger
{
"openapi": "3.0.0",
"servers": [
{
"description": "Production environment",
"url": "https://www.bitgo.com"
},
{
"description": "Test environment",
"url": "https://test.bitgo.com"
}
],
"info": {
"version": "2.0.0",
"title": "BitGo Platform V2 Reference",
"contact": {
"name": "BitGo, Inc."
},
"x-logo": {
"url": "./logo.png",
"backgroundColor": "#000000",
"altText": "BitGo API Logo"
}
},
"paths": {
"/api/v2/{coin}/wallet/{walletId}/addresses": {
"get": {
"tags": [
"Address"
],
"summary": "List addresses",
"description": "List receive addresses on a wallet",
"operationId": "v2.wallet.addresses",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
},
{
"$ref": "#/components/parameters/pathWalletId"
},
{
"name": "labelContains",
"in": "query",
"schema": {
"type": "string"
},
"description": "A case-insensitive regular expression which will be used to filter returned addresses based on their address label."
},
{
"$ref": "#/components/parameters/limit"
},
{
"name": "mine",
"in": "query",
"schema": {
"type": "boolean",
"default": false
},
"description": "Whether to return only the addresses which the current user has created."
},
{
"$ref": "#/components/parameters/prevId"
},
{
"$ref": "#/components/parameters/chains"
},
{
"name": "sort",
"in": "query",
"schema": {
"type": "integer",
"enum": [
-1,
1
],
"default": 1
},
"description": "Sort order of returned addresses. (1 for ascending, -1 for descending)."
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"coin": {
"type": "string"
},
"totalAddressCount": {
"type": "integer"
},
"pendingAddressCount": {
"description": "Total number of addresses pending on-chain initialization on this wallet",
"type": "integer"
},
"addresses": {
"type": "array",
"items": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7Bid%7D~1address/post/responses/200/content/application~1json/schema"
}
},
"nextBatchPrevId": {
"$ref": "#/paths/~1api~1v2~1auditlog/get/responses/200/content/application~1json/schema/properties/nextBatchPrevId"
}
}
}
}
}
},
"202": {
"description": "Wallet is pending on-chain initialization"
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
}
},
"x-code-samples": [
{
"lang": "javascript",
"source": "wallet.addresses()\n.then(function(addresses) {\n // print addresses\n console.dir(addresses);\n});\n"
}
]
}
},
"/api/v2/{coin}/wallet/{id}/address": {
"post": {
"tags": [
"Address",
"Wallet"
],
"summary": "Create address",
"operationId": "v2.wallet.newaddress",
"description": "This API call is used to create a new receive address for your wallet. You may choose to call this API whenever a deposit is made. The BitGo API supports millions of addresses.\n\nPlease check the “Coin-Specific Implementation” with regards to fee address management for Ethereum.\n",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
},
{
"$ref": "#/components/parameters/pathId"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"chain": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7Bid%7D~1address/post/responses/200/content/application~1json/schema/properties/chain",
"default": 1
},
"label": {
"description": "A human-readable label which should be applied to the new address",
"example": "Bob's Hot Wallet Address",
"maxLength": 250
},
"lowPriority": {
"description": "Whether the deployment of the address forwarder contract should use a low priority fee key (ETH only)",
"type": "boolean",
"default": false
},
"gasPrice": {
"description": "Explicit gas price to use when deploying the forwarder contract (ETH only). If not given, defaults to the current estimated network gas price.",
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
]
}
}
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"$ref": "#/components/parameters/userId/schema"
},
"address": {
"type": "string"
},
"chain": {
"type": "integer",
"example": 1,
"enum": [
0,
1,
10,
11,
20,
21
]
},
"index": {
"type": "integer"
},
"coin": {
"type": "string"
},
"lastNonce": {
"type": "integer",
"default": -1
},
"wallet": {
"description": "The wallet which contains this address",
"$ref": "#/components/parameters/userId/schema"
},
"coinSpecific": {
"type": "object",
"description": "Properties which are specific to certain coin types",
"properties": {
"xlm": {
"type": "object",
"properties": {
"memoId": {
"description": "Latest memo id generated for the wallet",
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7Bid%7D~1unspents/get/responses/200/content/application~1json/schema/properties/unspents/items/properties/valueString",
"example": "1"
},
"rootAddress": {
"type": "string",
"description": "Root address of the wallet",
"example": "GCTTCPH4IIDK7P72FFAEJ3ZFN6WDHJH6GGMRPHPM56ZWGIQ7B3XTIJAM"
}
}
},
"txlm": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7Bid%7D~1address/post/responses/200/content/application~1json/schema/properties/coinSpecific/properties/xlm"
}
}
},
"label": {
"type": "string"
},
"addressType": {
"type": "string",
"example": "p2sh",
"enum": [
"p2sh",
"p2sh-p2wsh",
"p2wsh"
]
}
}
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
}
},
"x-code-samples": [
{
"lang": "javascript",
"source": "wallet.createAddress({ label: 'My address' })\n.then(function(address) {\n // print new address\n console.dir(address);\n});\n"
}
]
}
},
"/api/v2/{coin}/wallet/{id}/address/{addressOrId}": {
"get": {
"tags": [
"Address"
],
"summary": "Get address",
"description": "Gets a receive address on a wallet",
"operationId": "v2.wallet.singlewalletaddress",
"parameters": [
{
"$ref": "#/components/parameters/addressOrId"
},
{
"$ref": "#/components/parameters/pathCoin"
},
{
"$ref": "#/components/parameters/pathId"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7Bid%7D~1address/post/responses/200/content/application~1json/schema"
},
{
"type": "object",
"description": "Extended address properties (not available for XRP addresses)",
"properties": {
"balance": {
"type": "object",
"properties": {
"updated": {
"description": "The last time a transaction affected the balance of this address",
"type": "string",
"format": "date-time"
},
"balance": {
"description": "The cleared balance",
"type": "integer"
},
"numTx": {
"description": "The number of transactions which were made using this address",
"type": "integer"
},
"numUnspents": {
"description": "The number of unspent transaction outputs which are controlled by this address",
"type": "integer"
},
"totalReceived": {
"description": "The total amount received on this address (in the chain's base unit)",
"type": "integer"
},
"totalSent": {
"description": "The total amount send from this address (in the chain's base unit)",
"type": "integer"
}
}
}
}
}
]
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
}
},
"x-code-samples": [
{
"lang": "javascript",
"source": "wallet.getAddress({address: '2NCzBK2Yf7PFAAfKsgc6cfTSG8FxtgMGG9C'})\n.then(function(address) {\n // print address\n console.dir(address);\n});\n"
}
]
},
"put": {
"tags": [
"Address"
],
"summary": "Update address",
"description": "Update a receive address on a wallet",
"operationId": "v2.wallet.updateaddress",
"parameters": [
{
"$ref": "#/components/parameters/addressOrId"
},
{
"$ref": "#/components/parameters/pathCoin"
},
{
"$ref": "#/components/parameters/pathId"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"label": {
"description": "New label which should apply to this address. The caller needs admin permissions for the associated wallet if the label already has a value. Otherwise view or spend permissions are fine because the label has not been set yet. This is due to the fact that customers use address labels to associate addresses with their customers.",
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7Bid%7D~1address/post/requestBody/content/application~1json/schema/properties/label"
}
}
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7Bid%7D~1address~1%7BaddressOrId%7D/get/responses/200/content/application~1json/schema"
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
}
}
}
},
"/api/v1/admin/config": {},
"/api/v2/enterprise/{id}": {
"get": {
"tags": [
"Enterprise"
],
"summary": "Get enterprise",
"operationId": "enterprise.getById",
"parameters": [
{
"$ref": "#/components/parameters/pathId"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/paths/~1api~1v2~1enterprise/post/responses/200/content/application~1json/schema"
},
{
"type": "object",
"properties": {
"wallets": {
"type": "array",
"items": {
"type": "string",
"description": "base address a v1 btc wallet"
}
}
}
}
]
}
}
}
},
"400": {
"description": "`InvalidEnterpriseId`",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
},
"404": {
"description": "`EnterpriseNotFound`",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
}
}
},
"put": {
"tags": [
"Enterprise"
],
"summary": "Update enterprise",
"operationId": "enterprise.update",
"parameters": [
{
"$ref": "#/components/parameters/pathId"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"approvalsRequired": {
"type": "integer",
"minimum": 1,
"description": "How many Enterprise Admins are required for action to fire"
}
}
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
},
"202": {
"description": "A Pending Approval for the Update has been created and is waiting for approval",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"$ref": "#/components/parameters/userId/schema"
},
"enterprise": {
"$ref": "#/components/parameters/userId/schema",
"description": "The Id of the associated enterprise"
},
"walletId": {
"type": "string",
"example": "1G47mSr3oANXMafVrR8UC4pzV7FEAzo3r9",
"description": "The base address of the associated wallet"
},
"creator": {
"$ref": "#/components/parameters/userId/schema",
"description": "The Id of the User that created the Pending Approval"
},
"createDate": {
"type": "string",
"format": "date-time"
},
"info": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"bitcoinAddressWhitelistRequest",
"userChangeRequest",
"policyRuleRequest",
"dailyLimitPolicyRequest",
"transactionRequest",
"transactionRequest",
"tagUpdateRequest",
"updateEnterpriseRequest",
"updateEnterpriseRequest"
]
},
"updateEnterpriseRequest": {
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": [
"add",
"remove"
]
},
"permissions": {
"type": "array",
"items": {
"type": "string",
"enum": [
"admin"
]
}
},
"userId": {
"$ref": "#/components/parameters/userId/schema",
"description": "The Id of the User to be added to or removed from the Enterprise"
}
}
},
"updateApprovalsRequiredRequest": {
"type": "object",
"properties": {
"requestedApprovalsRequired": {
"type": "number",
"minimum": 1,
"description": "the number of approvalsRequired that should be changed to"
}
}
}
}
},
"state": {
"type": "string",
"enum": [
"pending",
"approved",
"rejected"
]
},
"walletUserIds": {
"type": "array",
"items": {
"$ref": "#/components/parameters/userId/schema"
},
"description": "an array of all the Users on the Wallet who need to see this Pending Approval"
},
"approvalsRequired": {
"type": "number",
"minimum": 1
}
}
}
}
}
},
"400": {
"description": "`InvalidEnterpriseId` or another error message that explains how the provided input was incorrect.",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
},
"404": {
"description": "`EnterpriseNotFound`",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
}
}
}
},
"/api/v2/enterprise": {
"get": {
"tags": [
"Enterprise"
],
"summary": "List enterprises",
"operationId": "enterprise.list",
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"enterprises": {
"type": "array",
"items": {
"allOf": [
{
"$ref": "#/paths/~1api~1v2~1enterprise/post/responses/200/content/application~1json/schema/allOf/0"
},
{
"type": "object",
"properties": {
"tags": {
"type": "array",
"items": {
"type": "string",
"enum": [
"user",
"wallet",
"pending",
"walletV2",
"pendingV2"
]
},
"description": "In what way(s) the user is associated with the enterprise"
}
}
}
]
}
}
}
}
}
}
},
"400": {
"description": "`InvalidEnterpriseId`",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Human-readable error message"
},
"requestId": {
"type": "string",
"description": "Client request id"
}
},
"required": [
"error",
"requestId"
]
},
{
"properties": {
"context": {
"type": "object",
"description": "Properties that apply to a specific error name"
},
"name": {
"type": "string",
"description": "Error code"
}
},
"required": [
"name"
]
}
]
}
}
}
},
"404": {
"description": "`EnterpriseNotFound`",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
}
}
},
"post": {
"tags": [
"Enterprise"
],
"summary": "Create an enterprise",
"operationId": "enterprise.create",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"emergencyPhone": {
"type": "string",
"description": "Phone number for emergencies",
"example": "+11234567890"
},
"url": {
"type": "string",
"format": "uri",
"description": "The URL the enterprises web site"
}
},
"required": [
"name"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"type": "object",
"properties": {
"admin": {
"type": "object",
"properties": {
"policy": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet/post/responses/200/content/application~1json/schema/properties/admin/properties/policy"
}
}
},
"approvalsRequired": {
"type": "integer",
"description": "How many Enterprise Admins are required for action to fire",
"example": 1
},
"bitgoEthKey": {
"type": "string",
"description": "The public portion of the ethererum key generated for the enterprise fee address"
},
"bitgoOrg": {
"$ref": "#/components/parameters/bitgoOrg/schema"
},
"canCreateColdWallet": {
"type": "boolean",
"description": "whether the enterprise has the license to create cold wallets"
},
"canCreateCustodialWallets": {
"type": "boolean",
"description": "whether the enterprise has the license to create custodial wallets"
},
"canCreateHotWallet": {
"type": "boolean",
"description": "whether the enterprise has the license to create hot wallets"
},
"emergencyPhone": {
"$ref": "#/paths/~1api~1v2~1enterprise/post/requestBody/content/application~1json/schema/properties/emergencyPhone"
},
"ethFeeAddress": {
"type": "string",
"description": "The eth fee address used to pay for network transaction fees of this enterprise"
},
"freeze": {
"$ref": "#/paths/~1api~1v2~1enterprise~1%7Bid%7D~1freeze/post/responses/200/content/application~1json/schema"
},
"id": {
"$ref": "#/components/parameters/userId/schema"
},
"mutablePolicyWindow": {
"type": "integer",
"description": "Time in seconds after which policies on this Enterprise cannot be updated",
"example": 172800
},
"name": {
"type": "string",
"example": "Small Company"
},
"primaryContact": {
"$ref": "#/components/parameters/userId/schema",
"description": "The Id of the User who is the primary contact"
}
},
"required": [
"id"
]
},
{
"type": "object",
"properties": {
"tags": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"id": {
"$ref": "#/components/parameters/userId/schema"
}
}
}
}
}
}
]
}
}
}
},
"400": {
"description": "An error message explaining how the provided input was incorrect.",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
}
}
}
},
"/api/v2/enterprise/{id}/user": {
"get": {
"tags": [
"Enterprise"
],
"summary": "List enterprise users",
"operationId": "enterprise.user.list",
"parameters": [
{
"$ref": "#/components/parameters/pathId"
},
{
"name": "allowInactiveAdmins",
"in": "query",
"description": "Whether inactive admins should be returned as well",
"schema": {
"type": "boolean"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"adminUsers": {
"type": "array",
"items": {
"allOf": [
{
"$ref": "#/paths/~1api~1v2~1enterprise~1%7Bid%7D~1user/get/responses/200/content/application~1json/schema/properties/walletUsers/items"
},
{
"type": "object",
"properties": {}
}
]
}
},
"nonAdminUsers": {
"type": "array",
"items": {
"$ref": "#/paths/~1api~1v2~1enterprise~1%7Bid%7D~1user/get/responses/200/content/application~1json/schema/properties/adminUsers/items"
}
},
"walletUsers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"$ref": "#/components/parameters/userId/schema"
},
"username": {
"type": "string",
"format": "email"
}
}
}
},
"incomplete": {
"type": "boolean",
"description": "Set to true if the Enterprise has at least 500 v1 or v2 wallets . If there are more than 500 wallets (either v1 or v2) it could mean that some Wallets were not considered for finding all Users in the walletUsers field."
}
}
}
}
}
},
"400": {
"description": "`InvalidEnterpriseId`",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
},
"404": {
"description": "`EnterpriseNotFound`",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
}
}
},
"post": {
"tags": [
"Enterprise"
],
"summary": "Add user to enterprise",
"operationId": "enterprise.user.add",
"parameters": [
{
"$ref": "#/components/parameters/pathId"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"permission": {
"type": "string",
"enum": [
"admin"
]
},
"username": {
"type": "string",
"format": "email",
"description": "The Username of the User that should be added to the Enterprise"
},
"usernames": {
"type": "array",
"items": {
"type": "string",
"format": "email",
"description": "The Username of a User that should be added to the Enterprise"
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
},
"202": {
"description": "Pending Approval(s) for adding the User(s) ha(s|ve) been created and (is|are) waiting for approval",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/paths/~1api~1v2~1enterprise~1%7Bid%7D/put/responses/202/content/application~1json/schema"
},
{
"type": "object",
"properties": {
"pendingApprovals": {
"type": "array",
"items": {
"$ref": "#/paths/~1api~1v2~1enterprise~1%7Bid%7D/put/responses/202/content/application~1json/schema"
}
}
}
}
]
}
}
}
},
"400": {
"description": "`InvalidEnterpriseId` or an error message explaining why the input is invalid.",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
},
"404": {
"description": "`EnterpriseNotFound`",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
}
}
},
"delete": {
"tags": [
"Enterprise"
],
"summary": "Remove user from enterprise",
"operationId": "enterprise.user.remove",
"parameters": [
{
"$ref": "#/components/parameters/pathId"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"username": {
"type": "string",
"format": "email"
}
},
"required": [
"username"
]
}
}
}
},
"responses": {
"200": {
"description": ""
},
"202": {
"description": "A Pending Approval for removing the User has been created and is waiting for approval",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"pendingApprovals": {
"type": "array",
"items": {
"$ref": "#/paths/~1api~1v2~1enterprise~1%7Bid%7D/put/responses/202/content/application~1json/schema"
}
}
}
}
}
}
},
"400": {
"description": "`InvalidEnterpriseId` or `InvalidUserId` or 'cannot remove oneself from Enterprise when only one admin'",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
},
"404": {
"description": "`UserNotFound`",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
}
}
}
},
"/api/v2/enterprise/{id}/freeze": {
"post": {
"tags": [
"Enterprise"
],
"summary": "Freeze the enterprise",
"operationId": "enterprise.freeze",
"parameters": [
{
"$ref": "#/components/parameters/pathId"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"duration": {
"type": "integer",
"description": "seconds to freeze the enterprise for",
"default": 3600
}
}
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"time": {
"type": "string",
"format": "date-time",
"description": "When the freeze started"
},
"expires": {
"type": "string",
"format": "date-time",
"description": "When the freeze will end"
}
}
}
}
}
},
"400": {
"description": "`InvalidEnterpriseId` or an error message explaining why the input is invalid.",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
},
"401": {
"description": "The User needs to unlock with OTP first"
}
}
}
},
"/api/v2/enterprise/{id}/walletLimits": {
"get": {
"tags": [
"Enterprise"
],
"summary": "Get enterprise's wallet limits",
"operationId": "enterprise.walletLimits",
"parameters": [
{
"$ref": "#/components/parameters/pathId"
},
{
"$ref": "#/components/parameters/coinSingleOrList"
},
{
"name": "isCustodial",
"in": "query",
"description": "Whether custodial limits should be returned",
"schema": {
"type": "boolean",
"enum": [
true
]
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"coin": {
"$ref": "#/components/parameters/coin/schema"
},
"limit": {
"type": "integer"
},
"count": {
"type": "integer",
"minimum": 0
},
"isCustodial": {
"type": "boolean",
"enum": [
true
]
}
},
"required": [
"coin",
"count"
]
}
}
}
}
},
"400": {
"description": "An error message explaining why the input is invalid.",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
},
"404": {
"description": "`EnterpriseNotFound`",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
}
}
}
},
"/api/v2/{coin}/tx/fee": {
"get": {
"tags": [
"Transfer"
],
"summary": "Fee estimate",
"description": "Returns the estimated fee for a transaction. UTXO coins will return a fee per kB, while Account-based coins will return a flat fee estimate",
"operationId": "v2.tx.getfeeestimate",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
},
{
"name": "numBlocks",
"schema": {
"type": "integer"
},
"in": "query",
"description": "target number of blocks"
},
{
"name": "recipient",
"schema": {
"type": "string"
},
"in": "query",
"description": "Recipient of the tx to estimate for (only for ETH)"
},
{
"name": "data",
"schema": {
"type": "string"
},
"in": "query",
"description": "ETH data of the tx to estimate for (only for ETH)"
},
{
"name": "amount",
"schema": {
"type": "string"
},
"in": "query",
"description": "Amount in base units being sent to estimate for (only for ETH)"
},
{
"name": "hop",
"schema": {
"type": "boolean"
},
"in": "query",
"description": "True if we are estimating for a hop tx, false or unspecified for a wallet tx (only for ETH)"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"feePerKb": {
"type": "integer",
"description": "fee per kilobyte for a transaction to be confirmed in numBlocks number of blocks, defaults to 2 if numBlocks is not provided in the request query",
"example": 15902
},
"cpfpFeePerKb": {
"type": "integer",
"description": "child pays for parent fee per kilobyte where the fee includes the fees for all of the unconfirmed transactions dependent on this transaction"
},
"numBlocks": {
"type": "integer",
"description": "the target block confirmation",
"example": 2
},
"confidence": {
"type": "integer",
"minimum": 0,
"maximum": 100,
"description": "only for BTC, the confidence for the fee estimates as a percentage",
"example": 80
},
"feeByBlockTarget": {
"type": "object",
"description": "only for BTC, fee estimates stored as a key-value pair where the key is the block target (between 1 and 1000) and the value is the corresponding fee estimate (in baseunits per kilobyte)",
"example": {
"1": 50536,
"2": 15902,
"3": 1579
}
}
},
"required": [
"feePerKb",
"numBlocks"
]
},
{
"type": "object",
"properties": {
"feeEstimate": {
"description": "fee estimate for a transaction for the given account-based coin, denominated in base units (i.e. Wei)",
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7Bid%7D~1unspents/get/responses/200/content/application~1json/schema/properties/unspents/items/properties/valueString"
},
"gasLimitEstimate": {
"description": "The amount of gas that the transaction will use, if recipient is provided in the request",
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7Bid%7D~1unspents/get/responses/200/content/application~1json/schema/properties/unspents/items/properties/valueString"
},
"minGasPrice": {
"description": "minimum gas price that can be provided in base units",
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7Bid%7D~1unspents/get/responses/200/content/application~1json/schema/properties/unspents/items/properties/valueString"
},
"minGasLimit": {
"description": "minimum gas limit that can be provided in base units",
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7Bid%7D~1unspents/get/responses/200/content/application~1json/schema/properties/unspents/items/properties/valueString"
},
"maxGasLimit": {
"description": "maximum gas limit that can be provided in base units",
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7Bid%7D~1unspents/get/responses/200/content/application~1json/schema/properties/unspents/items/properties/valueString"
}
},
"required": [
"feeEstimate",
"minGasPrice",
"minGasLimit",
"maxGasLimit"
]
},
{
"type": "object",
"properties": {
"feeEstimate": {
"description": "fee estimate for a transaction for the given account-based coin, denominated in the base units of that coin (i.e. Drops for XRP, Stroops for XLM, etc)",
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7Bid%7D~1unspents/get/responses/200/content/application~1json/schema/properties/unspents/items/properties/valueString"
}
},
"required": [
"feeEstimate"
]
}
]
}
}
}
},
"400": {
"description": "`CoinUnsupported` or `Invalid`",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
}
}
}
},
"/api/v2/user/{id}": {
"get": {
"tags": [
"User"
],
"summary": "Get user",
"description": "Returns the associated user\n",
"operationId": "user.get",
"parameters": [
{
"name": "id",
"description": "The user ID, email address, or `me` for the currently authenticated user",
"in": "path",
"required": true,
"schema": {
"$ref": "#/components/parameters/userId/schema"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"$ref": "#/components/parameters/userId/schema"
},
"isActive": {
"type": "boolean"
},
"name": {
"type": "object",
"properties": {
"first": {
"type": "string",
"example": "Jane"
},
"full": {
"type": "string",
"example": "Jane Doe"
},
"last": {
"type": "string",
"example": "Doe"
}
}
},
"username": {
"$ref": "#/paths/~1api~1v2~1user~1login/post/requestBody/content/application~1json/schema/properties/email"
},
"email": {
"type": "object",
"properties": {
"email": {
"$ref": "#/paths/~1api~1v2~1user~1login/post/requestBody/content/application~1json/schema/properties/email"
},
"verified": {
"type": "boolean",
"example": true
}
}
},
"phone": {
"type": "object",
"properties": {
"phone": {
"type": "string",
"example": "408-718-6885"
},
"verified": {
"type": "boolean",
"example": true
}
}
},
"country": {
"type": "string",
"example": "USA"
}
}
}
}
}
},
"400": {
"description": "`InvalidUserId`",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
},
"404": {
"description": ""
}
},
"x-code-samples": [
{
"lang": "javascript",
"source": "bitgo.me({}, function callback(err, user) {\n if (err) {\n // handle error\n }\n // etc\n});\n"
}
]
}
},
"/api/v2/user/agreement": {},
"/api/v2/useragreement": {},
"/api/v2/{coin}/key/{id}": {
"get": {
"tags": [
"Key"
],
"summary": "Get key",
"operationId": "v2.key.get",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
},
{
"$ref": "#/components/parameters/pathId"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1key/post/responses/200/content/application~1json/schema"
}
}
}
},
"400": {
"description": "Invalid coin",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
},
"404": {
"description": ""
}
},
"x-code-samples": [
{
"lang": "javascript",
"source": "let keyId = '58c1f8a0781a5df8380e0e304b228c68';\n\nbitgo.coin('tbtc').keychains().get({ id: keyId })\n.then(function(keychain) {\n // print the keychain\n console.dir(keychain);\n});\n"
}
]
}
},
"/api/v2/{coin}/key": {
"get": {
"tags": [
"Key"
],
"summary": "List keys",
"operationId": "v2.key.list",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"keys": {
"type": "array",
"items": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1key/post/responses/200/content/application~1json/schema"
}
}
},
"required": [
"keys"
]
}
}
}
},
"400": {
"description": "Invalid Coin",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
}
},
"x-code-samples": [
{
"lang": "javascript",
"source": "bitgo.coin('tbtc').keychains().list()\n.then(function(keychain) {\n // print the keychains\n console.dir(keychains);\n});\n"
}
]
},
"post": {
"tags": [
"Key"
],
"summary": "Create key",
"operationId": "v2.key.add",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"encryptedPrv": {
"type": "string",
"description": "Private part of this key pair, encrypted with a passphrase that only the client knows. Required for all sources except `bitgo`."
},
"enterprise": {
"$ref": "#/components/parameters/userId/schema",
"description": "The Enterprise that will own this key"
},
"newFeeAddress": {
"type": "boolean",
"description": "Create a new keychain instead of fetching enterprise key (only for Ethereum)"
},
"pub": {
"type": "string",
"description": "Public part of this key pair. Required for all sources except `bitgo`.",
"example": "xpub661MyMwAqRbcGMVhmc7wqQRYMtcX9LAvSj1pjB213y5TsrkV2uuzJjWnjBrT1FUeNWGPjaVm5p7o6jdNcQJrV1cy3a1R8NQ9m7LuYKA8RpH"
},
"source": {
"type": "string",
"enum": [
"backup",
"bitgo",
"cold",
"user"
],
"example": "user"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Returns the new Key",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"encryptedPrv": {
"type": "string",
"description": "The encrypted private key"
},
"id": {
"$ref": "#/components/parameters/userId/schema"
},
"isBitGo": {
"type": "boolean",
"description": "`true` if this key is owned by BitGo",
"example": false
},
"pub": {
"type": "string",
"description": "Public part of this key pair",
"example": "xpub661MyMwAqRbcGMVhmc7wqQRYMtcX9LAvSj1pjB213y5TsrkV2uuzJjWnjBrT1FUeNWGPjaVm5p7o6jdNcQJrV1cy3a1R8NQ9m7LuYKA8RpH"
}
},
"required": [
"id",
"pub",
"encryptedPrv"
]
}
}
}
},
"400": {
"description": "Invalid Coin",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
}
},
"x-code-samples": [
{
"lang": "javascript",
"source": "// Create user key.\nlet userKey = bitgo.coin('tbtc').keychains().create();\n\n// Create BitGo key.\nlet bitGoKey = bitgo.coin('tbtc').keychains().createBitGo();\n\n// Create backup key.\nlet backupKey = bitgo.coin('tbtc').keychains().createBackup({ provider: 'cme' });\n"
}
]
}
},
"/api/v2/{coin}/wallet/{id}/policy/rule": {
"post": {
"tags": [
"Policy"
],
"summary": "Add policy rule",
"description": "Adds a rule to a wallet’s policy. A wallet policy’s rules control the\nconditions under which BitGo will use its single key to sign a\ntransaction. An email notification will be sent to all wallet users\nwhen a policy is updated. This email is NOT sent for the first time\npolicy is added.\n",
"operationId": "v2.wallet.createpolicy",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
},
{
"$ref": "#/components/parameters/pathId"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"coin": {
"type": "string",
"example": "zrx",
"description": "If set, the rule will only apply to the given coin or ERC20 token in an\nEthereum wallet. It is generally recommended to not set a coin for policy rules of the following types:\n`advancedWhitelist`, `allTx`, `coinAddressWhitelist`, `coinAddressBlacklist`, `webhook`.\n"
},
"id": {
"type": "string",
"description": "The id of the rule, must be unique among rules in the policy"
},
"type": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7Bid%7D~1policy~1rule/put/requestBody/content/application~1json/schema/properties/type"
},
"condition": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7Bid%7D~1policy~1rule/put/requestBody/content/application~1json/schema/properties/condition"
},
"action": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7Bid%7D~1policy~1rule/put/requestBody/content/application~1json/schema/properties/action"
}
},
"required": [
"id",
"type",
"action"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet/post/responses/200/content/application~1json/schema"
}
}
}
},
"202": {
"description": "A Pending Approval for the update has been created and is waiting for approval",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1pendingApprovals~1%7Bid%7D/put/responses/200/content/application~1json/schema"
}
}
}
}
}
},
"put": {
"tags": [
"Policy"
],
"summary": "Update policy rule",
"description": "Updates a rule on the policy attached to a wallet",
"operationId": "v2.wallet.updatepolicy",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
},
{
"$ref": "#/components/parameters/pathId"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"coin": {
"allOf": [
{
"$ref": "#/components/parameters/coin/schema"
},
{
"description": "Policy rules of types `allTx`, `coinAddressWhitelist`, `coinAddressBlacklist` and `webhook` are recommended to\nbe used without setting a coin so that they will apply to all coins and tokens that could be in a wallet. If\nyour policy rule is of one of these types and has a coin set on it, you also need to set the coin in the body.\nThis is necessary because the id alone may not be sufficient for finding the correct rule to update or delete.\n"
}
]
},
"id": {
"type": "string",
"description": "The id of the rule. The combination of id and coin must be unique among rules in the policy."
},
"type": {
"type": "string",
"enum": [
"advancedWhitelist",
"allTx",
"coinAddressWhitelist",
"coinAddressBlacklist",
"velocityLimit",
"webhook"
],
"description": "What causes this rule to trigger"
},
"condition": {
"description": "Parameters for the type",
"anyOf": [
{
"type": "object",
"properties": {
"amountString": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7Bid%7D~1unspents/get/responses/200/content/application~1json/schema/properties/unspents/items/properties/valueString",
"description": "The amount for the limit"
},
"timeWindow": {
"type": "integer",
"minimum": 0,
"maximum": 2678400,
"description": "Time window in seconds for a velocity limit, between 1 and a month"
}
},
"required": [
"amountString"
]
},
{
"type": "object",
"properties": {
"add": {
"description": "Address to add to the list",
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/components/parameters/userId/schema"
},
{
"type": "object",
"properties": {
"item": {
"allOf": [
{
"oneOf": [
{
"$ref": "#/components/parameters/address/schema"
},
{
"$ref": "#/components/parameters/userId/schema"
}
]
},
{
"description": "Either a valid address or a wallet or enterprise id. Must be unique in this whitelist."
}
]
},
"metaData": {
"type": "object",
"description": "Any data about this entry that is not used to determine when to enforce the policy",
"properties": {
"label": {
"type": "string",
"description": "A client-specified label for this entry. Label must be unique or not set."
},
"owner": {
"type": "string",
"description": "The legal owner of the address/ wallet/ enterprise",
"example": "Legal Owner LLC"
}
},
"additionalProperties": true
},
"type": {
"type": "string",
"enum": [
"address",
"walletId",
"enterpriseId"
],
"description": "the kind of resource a list rule entry refers to"
}
},
"required": [
"item",
"type"
]
}
]
}
},
"required": [
"add"
]
},
{
"type": "object",
"properties": {
"remove": {
"description": "Address to remove from the list",
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/components/parameters/userId/schema"
},
{
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7Bid%7D~1policy~1rule/put/requestBody/content/application~1json/schema/properties/condition/anyOf/1/properties/add/oneOf/2"
}
]
}
},
"required": [
"remove"
]
},
{
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "the url to query for the webhook"
}
},
"required": [
"url"
]
},
{
"type": "object"
}
]
},
"action": {
"description": "What happens when this rule is triggered",
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"deny",
"getApproval",
"getBitGoAdminApproval",
"getFinalApproval",
"getCustodianApproval",
"getIdVerification",
"noop"
]
},
"approvalsRequired": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7BwalletId%7D/put/requestBody/content/application~1json/schema/properties/approvalsRequired"
},
"userIds": {
"description": "For a final approver action, who can approve",
"type": "array",
"items": {
"$ref": "#/components/parameters/userId/schema"
}
}
},
"required": [
"type"
]
}
},
"required": [
"id",
"type",
"action"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet/post/responses/200/content/application~1json/schema"
}
}
}
},
"202": {
"description": "A Pending Approval for the update has been created and is waiting for approval",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1pendingApprovals~1%7Bid%7D/put/responses/200/content/application~1json/schema"
}
}
}
}
}
},
"delete": {
"tags": [
"Policy"
],
"summary": "Delete policy rule",
"description": "Deletes a rule from the policy attached to a wallet",
"operationId": "v2.wallet.removepolicy",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
},
{
"$ref": "#/components/parameters/pathId"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7Bid%7D~1policy~1rule/put/requestBody/content/application~1json/schema"
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet/post/responses/200/content/application~1json/schema"
}
}
}
},
"202": {
"description": "A Pending Approval for the update has been created and is waiting for approval",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1pendingApprovals~1%7Bid%7D/put/responses/200/content/application~1json/schema"
}
}
}
}
}
}
},
"/api/v2/admin/circuitbreakers": {},
"/api/v2/admin/circuitbreakers/{id}": {},
"/api/v2/admin/policy": {},
"/api/v2/admin/policy/{policyId}/mutability": {},
"/api/v2/admin/policy/{policyId}/consolidateCoinAddressWhitelists": {},
"/api/v2/pendingApprovals": {
"get": {
"tags": [
"Pending approval"
],
"summary": "List pending approvals",
"operationId": "v2.approval.list",
"parameters": [
{
"$ref": "#/components/parameters/coinArray"
},
{
"$ref": "#/components/parameters/enterpriseId"
},
{
"name": "state",
"description": "Filter by state. The default behavior is to return objects where state is `awaitingSignature`, `pending`, `pendingBitGoAdminApproval`, or `pendingFinalApproval`\n",
"in": "query",
"schema": {
"type": "array",
"items": {
"type": "string",
"enum": [
"pending",
"awaitingSignature",
"pendingBitGoAdminApproval",
"pendingFinalApproval"
]
}
}
},
{
"$ref": "#/components/parameters/walletId"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"pendingApprovals": {
"type": "array",
"items": {
"$ref": "#/paths/~1api~1v2~1pendingApprovals~1%7Bid%7D/put/responses/200/content/application~1json/schema"
}
}
}
}
}
}
}
},
"x-code-samples": [
{
"lang": "javascript",
"source": "let walletId = \"590bb3598005caaf07b5bffbe35f3c11\";\n\npendingapproval().list(walletId)\n.then(function(list) {\n // Print approval list\n console.dir(list);\n});\n"
}
]
}
},
"/api/v2/pendingApprovals/{id}": {
"get": {
"tags": [
"Pending approval"
],
"summary": "Get pending approval",
"operationId": "v2.approval.get",
"parameters": [
{
"$ref": "#/components/parameters/pathId"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1pendingApprovals~1%7Bid%7D/put/responses/200/content/application~1json/schema"
}
}
}
}
}
},
"put": {
"tags": [
"Pending approval"
],
"summary": "Update pending approval",
"description": "Updates the state of a pending approval to either `approved` or\n`rejected`. Pending approvals are designed to be managed through\nour web UI. Requests made using an authentication token are\nnot allowed to approve requests. Instead of using pending approvals\nwe recommend creating a webhook policy to do automated approval and\ndenial of transactions.\n",
"operationId": "v2.approval.update",
"parameters": [
{
"$ref": "#/components/parameters/pathId"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"otp": {
"type": "string"
},
"state": {
"type": "string"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Successfully updated pending approval state",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"$ref": "#/components/parameters/userId/schema"
},
"coin": {
"$ref": "#/components/parameters/coin/schema"
},
"wallet": {
"description": "",
"$ref": "#/components/parameters/userId/schema"
},
"enterprise": {
"$ref": "#/components/parameters/userId/schema"
},
"creator": {
"$ref": "#/components/parameters/userId/schema"
},
"createDate": {
"type": "string",
"format": "date-time"
},
"info": {
"anyOf": [
{
"type": "object",
"description": "Information about a pending transaction"
},
{
"type": "object",
"description": "Information about a pending change to user membership"
},
{
"type": "object",
"description": "Information about a pending change to policy"
},
{
"type": "object",
"description": "Information about a pending change to number of approvals required for getApproval policy rules"
}
]
},
"state": {
"type": "string",
"enum": [
"pending",
"awaitingSignature",
"pendingBitGoAdminApproval",
"pendingFinalApproval",
"pendingCustodianApproval",
"pendingIdVerification",
"approved",
"rejected"
]
},
"scope": {
"description": "What kind of entity the pendingApproval is tied to",
"type": "string",
"enum": [
"enterprise",
"wallet"
]
},
"userIds": {
"description": "All the Users who should see this Pending Approval",
"type": "array",
"items": {
"$ref": "#/components/parameters/userId/schema"
}
},
"approvalsRequired": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7BwalletId%7D/put/requestBody/content/application~1json/schema/properties/approvalsRequired"
},
"walletLabel": {
"type": "string"
}
}
}
}
}
},
"202": {
"description": "Further approvals are required",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1pendingApprovals~1%7Bid%7D/put/responses/200/content/application~1json/schema"
}
}
}
}
}
}
},
"/api/v2/{coin}/pendingApprovals/{id}": {},
"/api/v2/user/login": {
"post": {
"description": "Creates a short-lived (1 hour) access token for use with the API. The token must be specified to subsequent\nAPI calls via the `Authorization` HTTP header:\n```text\nAuthorization: Bearer 9b72c68ef394f5146f0f3efc1feafb7a971752cb00e79fafcfd8c1d2db83639c\n```\nWe don't recommend using this endpoint for scripting. The preferred\napproach is to create a long-lived token in the web UI (see the\nDeveloper Options section in User Settings).\n",
"tags": [
"User",
"Express"
],
"summary": "Login",
"operationId": "user.login",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"email": {
"type": "string",
"format": "email",
"example": "user@example.com"
},
"otp": {
"type": "string",
"example": "123456",
"description": "Second factor authentication token"
},
"password": {
"type": "string",
"example": "secret"
}
},
"required": [
"email",
"password"
]
}
}
}
},
"responses": {
"200": {
"description": "Returns the access token and user",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"access_token": {
"type": "string",
"example": "9b72c68ef394f5146f0f3efc1feafb7a971752cb00e79fafcfd8c1d2db83639c"
},
"expires_at": {
"type": "integer",
"example": 1534201288,
"description": "Unix timestamp"
},
"scope": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"user_manage",
"openid",
"profile",
"wallet_create",
"wallet_manage_all",
"wallet_approve_all",
"wallet_spend_all",
"wallet_edit_all",
"wallet_view_all"
]
},
"user": {
"$ref": "#/paths/~1api~1v2~1user~1%7Bid%7D/get/responses/200/content/application~1json/schema"
}
},
"required": [
"access_token",
"expires_at",
"scope",
"user"
]
}
}
}
},
"401": {
"description": "Invalid credentials",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
}
},
"x-code-samples": [
{
"lang": "javascript",
"source": "bitgo.authenticate({ username: user, password: password, otp: '0000000' })\n.then(function(response) {\n var token = response.token;\n var user = response.user;\n // etc\n});\n"
}
]
}
},
"/api/v2/{coin}/wallet/{walletId}/transfer": {
"get": {
"tags": [
"Transfer",
"Wallet"
],
"summary": "List transfers",
"description": "Returns deposits and withdrawals for a wallet. Transfers are sorted\nin descending order by `height`, then `id`.\n",
"operationId": "v2.wallet.listtransfers",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
},
{
"$ref": "#/components/parameters/pathWalletId"
},
{
"$ref": "#/components/parameters/allTokens"
},
{
"$ref": "#/components/parameters/prevId"
},
{
"$ref": "#/components/parameters/state"
},
{
"$ref": "#/components/parameters/searchLabel"
},
{
"$ref": "#/components/parameters/limit"
},
{
"$ref": "#/components/parameters/type"
},
{
"name": "pendingApprovalId",
"in": "query",
"description": "Filter for a transfer with a matching pendingApprovalId",
"schema": {
"$ref": "#/components/parameters/userId/schema"
}
},
{
"name": "valueGte",
"in": "query",
"description": "Return transfers with a `value` that is greater than or equal to the given number",
"schema": {
"type": "integer"
}
},
{
"name": "valueLt",
"in": "query",
"description": "Return transfers with a `value` that is less than the given number",
"schema": {
"type": "integer"
}
},
{
"name": "dateGte",
"in": "query",
"description": "Return transfers with a `date` that is greater than or equal to the given timestamp",
"schema": {
"type": "string",
"format": "date-time"
}
},
{
"name": "dateLt",
"in": "query",
"description": "Return transfers with a `date` that is less than the given timestamp",
"schema": {
"type": "string",
"format": "date-time"
}
},
{
"name": "address",
"in": "query",
"description": "Return transfers with elements in `entries` that have an `address` field set to this value",
"schema": {
"type": "array",
"items": {
"$ref": "#/components/parameters/address/schema"
}
}
},
{
"name": "includeHex",
"in": "query",
"description": "Include the raw hex data of the transaction in the response (this may be a large amount of data)",
"schema": {
"type": "boolean"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"transfers": {
"type": "array",
"items": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7BwalletId%7D~1transfer~1%7BtransferId%7D/get/responses/206/content/application~1json/schema"
}
},
"coin": {
"$ref": "#/components/parameters/coin/schema"
},
"nextBatchPrevId": {
"$ref": "#/paths/~1api~1v2~1auditlog/get/responses/200/content/application~1json/schema/properties/nextBatchPrevId"
}
},
"required": [
"transfers",
"coin"
]
}
}
}
},
"400": {
"description": "`InvalidEnterpriseId`",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
},
"404": {
"description": "`EnterpriseNotFound`",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
}
},
"x-code-samples": [
{
"lang": "javascript",
"source": "wallet.transfers()\n.then(function(transfers) {\n // print transfers\n console.dir(transfers);\n});\n"
}
]
}
},
"/api/v2/{coin}/wallet/{walletId}/expecteddeposit": {},
"/api/v2/{coin}/wallet/{walletId}/transfer/{transferId}": {
"get": {
"tags": [
"Transfer"
],
"summary": "Get transfer",
"operationId": "v2.wallet.gettransfer",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
},
{
"$ref": "#/components/parameters/pathWalletId"
},
{
"$ref": "#/components/parameters/pathTransferId"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7BwalletId%7D~1transfer~1%7BtransferId%7D/get/responses/206/content/application~1json/schema"
}
}
}
},
"206": {
"description": "Incomplete data. Transaction inputs and outputs not available yet.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"coin": {
"$ref": "#/components/parameters/coin/schema"
},
"id": {
"$ref": "#/components/parameters/userId/schema"
},
"wallet": {
"$ref": "#/components/parameters/userId/schema"
},
"enterprise": {
"$ref": "#/components/parameters/userId/schema"
},
"txid": {
"$ref": "#/components/parameters/pathTransferId/schema/oneOf/1"
},
"height": {
"type": "integer",
"description": "The height of the block this Transfer was confirmed in (999999999 if unconfirmed)"
},
"date": {
"type": "string",
"format": "date-time",
"description": "The date this Transfer was last updated"
},
"confirmations": {
"type": "integer",
"description": "The number of blocks that have been confirmed since this Transfer's block was confirmed"
},
"type": {
"type": "string",
"description": "Defines whether or not this Transfer was sent or received by the user",
"enum": [
"send",
"receive"
]
},
"value": {
"type": "integer",
"description": "The total value (in base units) sent by this Transfer (may be approximate for ETH and other coins where amounts in base units can exceed 2^53 - 1)"
},
"valueString": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7Bid%7D~1unspents/get/responses/200/content/application~1json/schema/properties/unspents/items/properties/valueString",
"description": "The total value (in base units) sent by this Transfer represented as a String"
},
"baseValue": {
"type": "integer",
"description": "The value (in base units) sent by this Transfer without network fees, represented"
},
"baseValueString": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7Bid%7D~1unspents/get/responses/200/content/application~1json/schema/properties/unspents/items/properties/valueString",
"description": "The value (in base units) sent by this Transfer without network fees, represented as a String"
},
"feeString": {
"type": "string",
"description": "The Transfer's fee (in base units) represented as a String"
},
"payGoFee": {
"type": "integer",
"description": "The Transfer's BitGo fee (in base units)"
},
"payGoFeeString": {
"type": "string",
"description": "The Transfer's BitGo fee (in base units) represented as a String"
},
"usd": {
"type": "number",
"description": "The amount of USD of this Transfer (will be negative if it's a send)"
},
"usdRate": {
"type": "number",
"description": "The USD price at the time this Transfer was created"
},
"state": {
"$ref": "#/components/parameters/state/schema"
},
"tags": {
"type": "array",
"description": "The tags to be used on this Transfer (used in Policies)",
"items": {
"$ref": "#/components/parameters/userId/schema"
}
},
"history": {
"type": "array",
"description": "An audit log of events that have happened to the Transfer during its lifecycle",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"format": "date-time",
"description": "The date of this history object"
},
"user": {
"$ref": "#/components/parameters/userId/schema"
},
"action": {
"type": "string",
"enum": [
"created",
"signed",
"unconfirmed",
"confirmed",
"approved",
"commented",
"removed",
"failed",
"rejected"
]
},
"comment": {
"type": "string",
"description": "If this history object is of action `commented`, this is the comment from the user"
}
}
}
},
"comment": {
"type": "string",
"description": "A comment from the user"
},
"vSize": {
"type": "integer",
"description": "The size of the transaction"
},
"coinSpecific": {
"type": "object",
"description": "Transfer fields specific to each coin type"
},
"sequenceId": {
"type": "string",
"description": "A user-supplied String for Transfers sent from the wallet which they can later use to ID the Transfer"
},
"entries": {
"type": "array",
"description": "An array of objects describing the change in address balances made as a result of this Transfer",
"items": {
"type": "object",
"properties": {
"address": {
"type": "string",
"description": "An address affected by this Transfer",
"example": "2NAUwNgXaoFj2VVnSEvNLGuez8CfdU2UCMZ"
},
"wallet": {
"$ref": "#/components/parameters/userId/schema"
},
"value": {
"type": "integer",
"description": "The change (in base units) in the address's balance"
},
"valueString": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7Bid%7D~1unspents/get/responses/200/content/application~1json/schema/properties/unspents/items/properties/valueString",
"description": "The change (in base units) in the address's balance represented as a String"
},
"label": {
"type": "string",
"description": "If this address was labeled by the user, this is the label"
},
"isChange": {
"type": "boolean",
"description": "True if this address is a change address (only exists for UTXO coins) and if this is a `sent` Transfer"
},
"isPayGo": {
"type": "boolean",
"description": "True if this address is the BitGo PayGo wallet"
},
"token": {
"type": "string",
"description": "If this is a token entry, the token's symbol",
"example": "omg"
}
}
},
"required": [
"address",
"valueString"
]
},
"inputs": {
"type": "array",
"description": "If this is a Transfer on a UTXO coin, the array of inputs",
"items": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7Bid%7D~1unspents/get/responses/200/content/application~1json/schema/properties/unspents/items"
}
},
"outputs": {
"type": "array",
"description": "If this is a Transfer on a UTXO coin, the array of outputs",
"items": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7Bid%7D~1unspents/get/responses/200/content/application~1json/schema/properties/unspents/items"
}
}
},
"required": [
"id",
"coin",
"wallet",
"txid",
"height",
"date",
"confirmations",
"type",
"valueString",
"usd",
"usdRate",
"state",
"tags",
"history",
"comment",
"coinSpecific"
]
}
}
}
},
"400": {
"description": "`invalid transfer or transaction id`",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
}
},
"x-code-samples": [
{
"lang": "javascript",
"source": "let transferId = '591623989c043ab2079857ee53d812f0';\nwallet.getTransfer({ id: transferId })\n.then(function(transfer) {\n // print the transfer object\n console.dir(transfer);\n});\n\n// we can also pass a on-chain txid (BTC)\nlet txId = 'f5d8ee39a430901c91a5917b9f2dc19d6d1a0e9cea205b009ca73dd04470b9a5';\nwallet.getTransfer({ id: txId })\n.then(function(transfer) {\n console.dir(transfer);\n});\n"
}
]
}
},
"/api/v2/{coin}/wallet/{walletId}/transfer/sequenceId/{sequenceId}": {
"get": {
"tags": [
"Transfer"
],
"summary": "Get transfer by sequence id",
"operationId": "v2.wallet.gettransferbysequenceid",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
},
{
"$ref": "#/components/parameters/pathWalletId"
},
{
"$ref": "#/components/parameters/pathSequenceId"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7BwalletId%7D~1transfer~1%7BtransferId%7D/get/responses/206/content/application~1json/schema"
}
}
}
},
"206": {
"description": "Partial content -- unconfirmed transfer, does not contain inputs or outputs",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7BwalletId%7D~1transfer~1%7BtransferId%7D/get/responses/206/content/application~1json/schema"
}
}
}
},
"400": {
"description": "`invalid transfer or transaction id`",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
}
},
"x-code-sample": [
{
"lang": "javascript",
"source": "let sequenceId = 'hello123';\nwallet.transferBySequenceId({ sequenceId: sequenceId })\n.then(function(transfer) {\n // print the transfer object\n console.dir(transfer);\n});\n"
}
]
}
},
"/api/v2/user/logout": {
"get": {
"summary": "Logout",
"description": "Disables an access token",
"tags": [
"User"
],
"operationId": "user.logout",
"responses": {
"200": {
"description": ""
}
}
}
},
"/api/v2/user/session": {
"get": {
"description": "Returns the session associated with access token passed via the `Authorization` header.\n",
"tags": [
"User"
],
"summary": "Get session",
"operationId": "user.getsession",
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"session": {
"$ref": "#/paths/~1api~1v2~1user~1unlock/post/responses/200/content/application~1json/schema/properties/session"
}
}
}
}
}
}
},
"x-code-samples": [
{
"lang": "javascript",
"source": "bitgo.session({}, function callback(err, session) {\n if (err) {\n // handle error\n }\n console.dir(session);\n});\n"
}
]
}
},
"/api/v2/user/lock": {
"post": {
"description": "Locks the current user session. This disallows operations that require\nan unlocked token, such as sending a transaction.\n",
"tags": [
"User"
],
"summary": "Lock session",
"operationId": "user.lock",
"responses": {
"200": {
"description": "Returns the access token and User",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"session": {
"type": "object",
"properties": {
"created": {
"type": "string",
"format": "date-time"
},
"expires": {
"type": "string",
"format": "date-time"
},
"id": {
"$ref": "#/components/parameters/userId/schema"
},
"ip": {
"$ref": "#/paths/~1api~1v2~1auditlog/get/responses/200/content/application~1json/schema/properties/logs/items/properties/ip/allOf/0",
"description": "IP address of the client that requested this access token"
},
"ipRestrict": {
"type": "array",
"items": {
"type": "string",
"format": "ipv4"
},
"description": "IP addresses of clients that are allowed to use this token"
},
"origin": {
"type": "string",
"example": "test.bitgo.com",
"description": "BitGo environment that issued this token. The token is only valid in this environment."
},
"scope": {
"$ref": "#/paths/~1api~1v2~1user~1login/post/responses/200/content/application~1json/schema/properties/scope",
"description": "Session permissions"
},
"user": {
"$ref": "#/components/parameters/userId/schema"
}
},
"required": [
"created",
"expires",
"id",
"origin",
"scope",
"user"
]
}
}
}
}
}
}
},
"x-code-samples": [
{
"lang": "javascript",
"source": "bitgo.lock({})\n.then(function(lockResponse) {\n // …\n});\n"
}
]
}
},
"/api/v2/user/unlock": {
"post": {
"description": "Unlocks thes current user session. This allows operations that require\nan unlocked token, such as sending a transaction. Call this endpoint\nwhen an API returns a `401` response with the `needsUnlock`\nbody parameter set to `true`.\n",
"tags": [
"User"
],
"summary": "Unlock session",
"operationId": "user.unlock",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"duration": {
"type": "integer",
"minimum": 1,
"maximum": 3600,
"default": 600,
"description": "Number of seconds that the session will stay unlocked"
},
"otp": {
"$ref": "#/paths/~1api~1v2~1user~1login/post/requestBody/content/application~1json/schema/properties/otp"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Returns the updated session",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"session": {
"type": "object",
"properties": {
"created": {
"type": "string",
"format": "date-time"
},
"expires": {
"type": "string",
"format": "date-time"
},
"id": {
"$ref": "#/components/parameters/userId/schema"
},
"ip": {
"$ref": "#/paths/~1api~1v2~1auditlog/get/responses/200/content/application~1json/schema/properties/logs/items/properties/ip/allOf/0",
"description": "IP address of the client that requested this access token"
},
"ipRestrict": {
"type": "array",
"items": {
"type": "string",
"format": "ipv4"
},
"description": "IP addresses of clients that are allowed to use this token"
},
"origin": {
"type": "string",
"example": "test.bitgo.com",
"description": "BitGo environment that issued this token"
},
"scope": {
"$ref": "#/paths/~1api~1v2~1user~1login/post/responses/200/content/application~1json/schema/properties/scope",
"description": "Session permissions"
},
"unlock": {
"description": "The Unlock object, returned if this session is currently unlocked.",
"type": "object",
"properties": {
"time": {
"type": "string",
"format": "date-time"
},
"expires": {
"type": "string",
"format": "date-time"
},
"txCount": {
"type": "integer"
},
"txValue": {
"type": "integer"
}
}
},
"user": {
"$ref": "#/components/parameters/userId/schema"
}
},
"required": [
"created",
"expires",
"id",
"origin",
"scope",
"user"
]
}
}
}
}
}
}
},
"x-code-samples": [
{
"lang": "javascript",
"source": "bitgo.unlock({ otp: '0000000' })\n.then(function(unlockResponse) {\n console.dir(unlockResponse);\n});\n"
}
]
}
},
"/api/v2/user/changepassword": {},
"/api/v2/enterprises/{id}/users": {},
"/api/v2/enterprises/{id}/usergroups": {},
"/api/v2/enterprises/{id}/usergroupmembers": {},
"/api/v2/enterprises/{id}/usergroupwallets": {},
"/api/v2/{coin}/wallet": {
"get": {
"tags": [
"Wallet"
],
"summary": "List wallets",
"operationId": "v2.wallet.list",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
},
{
"$ref": "#/components/parameters/prevId"
},
{
"$ref": "#/components/parameters/limit"
},
{
"$ref": "#/components/parameters/allTokens"
},
{
"$ref": "#/components/parameters/searchLabel"
},
{
"$ref": "#/components/parameters/enterprise"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"coin": {
"$ref": "#/components/parameters/coin/schema"
},
"wallets": {
"type": "array",
"items": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet/post/responses/200/content/application~1json/schema"
}
},
"nextBatchPrevId": {
"$ref": "#/paths/~1api~1v2~1auditlog/get/responses/200/content/application~1json/schema/properties/nextBatchPrevId"
}
},
"required": [
"wallets",
"coin"
]
}
}
}
},
"400": {
"description": "invalid prev id or invalid coin",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
},
"404": {
"description": ""
}
},
"x-code-samples": [
{
"lang": "javascript",
"source": "bitgo.coin('tbtc').wallets().list({})\n.then(function(wallets) {\n // print the wallets\n console.dir(wallets);\n});\n"
}
]
},
"post": {
"tags": [
"Wallet"
],
"summary": "Add wallet (advanced only)",
"description": "This method is for advanced API users and allows manual creation and\nspecification of keys. In the SDK or BitGo Express,\n[Generate Wallet](https://www.bitgo.com/api/v2/#operation/express.wallet.generate)\nis the simpler and highly recommended method to create a wallet.\nAnother option is to create your wallets in our UI.\n\nThis API creates a new wallet for the user or enterprise. The keys to\nuse with the new wallet (passed in the 'keys' parameter) must be\nregistered with BitGo prior to using this API.\n\nBitGo currently only supports 2-of-3 (e.g. m=2 and n=3) wallets. The\nthird key, and only the third key, must be a BitGo key. The first key\nis by convention the user key, with its encrypted xprv stored on BitGo.\n\nEthereum and XRP wallets can only be created under an enterprise. Pass in the\nid of the enterprise to associate the wallet with. Your enterprise id\ncan be seen by clicking on the \"Manage Organization\" link in the\nenterprise dropdown. Using the Add Wallet API, you can create a wallet\nusing either the enterprise fee address (used by default for all\nwallets in the enterprise), or a unique fee address (created manually\nwith the Keychains API). Pass the desired key as the third key ID in\nthe 'keys' array. In either case, the fee address must be funded\nbefore creating the wallet.\n\nYou cannot generate a wallet by passing in an ERC20 token as the coin.\nERC20 tokens share Ethereum wallets and it is not possible to create a\nwallet specific to one token.\n\nBitGo Ethereum wallet is a smart-contract implementing multi-signature scheme.\nBecause contracts itself can not initiate transactions, fee addresses are used\nfor this purpose. Ethereum transactions initiated by a given address, are\nconfirmed by the network in order of creation, so one lower fee transaction can\npotentially delay all subsequent transactions. To help lower network fee costs,\ntwo fee addresses are provided.\n\n`feeAddress` is a main fee address usable for all operations.\n`lowPriorityFeeAddress` is a secondary fee address that can be used to pay\nlower fee for Create Address operations without risking delaying subsequent\nhigher-priority transactions initiated by main fee address.\n",
"operationId": "v2.wallet.add",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"coinSpecific": {
"type": "object",
"properties": {
"xlm": {
"type": "object",
"properties": {
"stellarUsername": {
"type": "string",
"description": "Username for the user's Stellar address. It's case insensitive, and it can't be changed after it's set.",
"pattern": "^[a-zA-Z0-9-_.+@]+$",
"example": "foo_bar@baz.com"
}
}
},
"txlm": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet/post/requestBody/content/application~1json/schema/properties/coinSpecific/properties/xlm"
}
}
},
"enterprise": {
"$ref": "#/components/parameters/userId/schema",
"description": "This is required for Ethereum wallets since they can only be created as part of an enterprise."
},
"isCold": {
"type": "boolean"
},
"keys": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet/post/responses/200/content/application~1json/schema/properties/keys",
"description": "This is required for all wallets where the client supplies the keys to be used. The only case where this is not required is when the type is set to `custodial`."
},
"keySignatures": {
"type": "object",
"properties": {
"backup": {
"type": "string",
"description": "a signature of the backup pub key using the user key (useful for change address verification)"
},
"bitgo": {
"type": "string",
"description": "a signature of the bitgo pub key using the user key (useful for change address verification)"
}
}
},
"label": {
"type": "string",
"example": "My Wallet"
},
"m": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet/post/responses/200/content/application~1json/schema/properties/m",
"description": "This is required for all wallets where the client supplies the keys to be used. The only case where this is not required is when the type is set to `custodial`."
},
"n": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet/post/responses/200/content/application~1json/schema/properties/n",
"description": "This is required for all wallets where the client supplies the keys to be used. The only case where this is not required is when the type is set to `custodial`."
},
"tags": {
"type": "array",
"items": {
"$ref": "#/components/parameters/userId/schema"
}
},
"type": {
"type": "string",
"description": "The type describes who owns the keys to the wallet and how they are stored. `custodial` means that this wallet is a cold wallet where BitGo owns the keys. Only customers of the BitGo Trust can create this kind of wallet. `custodialPaired` means that this is a hot wallet that is owned by the customer but it will be linked to a cold (custodial) wallet where BitGo owns the keys. This option is only available to customers of BitGo Inc.",
"enum": [
"custodial",
"custodialPaired"
]
}
},
"required": [
"label"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"admin": {
"type": "object",
"properties": {
"policy": {
"type": "object",
"properties": {
"id": {
"$ref": "#/components/parameters/userId/schema"
},
"date": {
"type": "string",
"format": "date-time"
},
"label": {
"type": "string"
},
"latest": {
"type": "boolean"
},
"rules": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"lockDate": {
"type": "string",
"description": "The time at which this rule becomes immutable",
"format": "date-time"
},
"mutabilityConstraint": {
"type": "string",
"description": "Specifies whether a BitGo admin can change `lockDate`\n* `managed` - Not locked, but requires approval from a BitGo admin to change\n* `permanent` - `lockDate` cannot be changed\n* `sticky` - Not included in bulk unlock, but `lockDate` can be individually changed\n",
"enum": [
"managed",
"permanent",
"sticky"
]
},
"coin": {
"$ref": "#/components/parameters/coin/schema"
},
"type": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7Bid%7D~1policy~1rule/put/requestBody/content/application~1json/schema/properties/type"
},
"condition": {
"description": "Parameters for the type",
"oneOf": [
{
"type": "object",
"properties": {
"amountString": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7Bid%7D~1unspents/get/responses/200/content/application~1json/schema/properties/unspents/items/properties/valueString",
"description": "The amount for the limit"
},
"timeWindow": {
"type": "integer",
"minimum": 0,
"maximum": 2678400,
"description": "Time window in seconds for a velocity limit, between 1 and a month"
}
}
},
{
"type": "object",
"properties": {
"addresses": {
"description": "Addresses allowed/restricted for a whitelist/blacklist",
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/components/parameters/userId/schema"
}
]
}
}
}
},
{
"type": "object",
"properties": {
"entries": {
"description": "Entries specifying which addresses/ wallets/ enterprises are on the whitelist",
"type": "array",
"items": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7Bid%7D~1policy~1rule/put/requestBody/content/application~1json/schema/properties/condition/anyOf/1/properties/add/oneOf/2"
}
}
}
},
{
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "the url to query for the webhook"
}
}
}
]
},
"action": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7Bid%7D~1policy~1rule/put/requestBody/content/application~1json/schema/properties/action"
}
},
"required": [
"id",
"lockDate",
"type",
"action"
]
}
},
"version": {
"type": "integer"
}
},
"required": [
"id",
"latest",
"rules",
"version"
]
}
}
},
"allowBackupKeySigning": {
"type": "boolean"
},
"approvalsRequired": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7BwalletId%7D/put/requestBody/content/application~1json/schema/properties/approvalsRequired"
},
"coin": {
"$ref": "#/components/parameters/coin/schema"
},
"coinSpecific": {
"allOf": [
{
"type": "object",
"properties": {
"creationFailure": {
"type": "array",
"items": {
"$ref": "#/components/parameters/pathTransferId/schema/oneOf/1"
},
"description": "Includes list of fail initialization txids"
},
"pendingChainInitialization": {
"type": "boolean",
"description": "Whether the wallet needs to be initialized on the chain"
}
}
},
{
"type": "object",
"properties": {
"rootAddress": {
"type": "string",
"description": "Root address of the wallet",
"example": "GCTTCPH4IIDK7P72FFAEJ3ZFN6WDHJH6GGMRPHPM56ZWGIQ7B3XTIJAM"
},
"stellarUsername": {
"type": "string",
"description": "Username for the user's Stellar address",
"example": "foo_bar@baz.com"
},
"homeDomain": {
"type": "string",
"description": "Home domain of a Stellar account",
"example": "bitgo.com"
},
"stellarAddress": {
"type": "string",
"description": "Email-like address associated to a Stellar account",
"example": "foo_bar@baz.com*bitgo.com"
}
}
}
]
},
"deleted": {
"type": "boolean"
},
"disableTransactionNotifications": {
"type": "boolean"
},
"enterprise": {
"$ref": "#/components/parameters/userId/schema"
},
"freeze": {
"type": "object",
"properties": {
"time": {
"type": "string",
"format": "dateTime"
},
"expires": {
"type": "string",
"format": "dateTime"
}
}
},
"id": {
"$ref": "#/components/parameters/userId/schema"
},
"isCold": {
"type": "boolean"
},
"keys": {
"type": "array",
"items": {
"$ref": "#/components/parameters/userId/schema"
},
"example": [
"585951a5df8380e0e304a553",
"585951a5df8380e0e30d645c",
"585951a5df8380e0e30b6147"
]
},
"label": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet/post/requestBody/content/application~1json/schema/properties/label"
},
"m": {
"description": "Number of signatures required. This value must be 2 for\nhot wallets, 1 for **ofc** wallets, and not specified for custodial\nwallets.\n",
"type": "integer",
"example": 2
},
"n": {
"description": "Number of keys provided. This value must be 3 for hot wallets,\n1 for **ofc** wallets, and not specified for custodial wallets.\n",
"type": "integer",
"example": 3
},
"receiveAddress": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7Bid%7D~1address/post/responses/200/content/application~1json/schema"
},
"recoverable": {
"type": "boolean"
},
"tags": {
"type": "array",
"items": {
"$ref": "#/components/parameters/userId/schema"
}
},
"type": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet/post/requestBody/content/application~1json/schema/properties/type"
},
"users": {
"type": "array",
"items": {
"type": "object",
"properties": {
"user": {
"$ref": "#/components/parameters/userId/schema"
},
"permissions": {
"type": "array",
"items": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7Bid%7D~1share/post/requestBody/content/application~1json/schema/properties/permissions/allOf/1"
}
}
},
"example": {
"user": "55e8a1a5df8380e0e30e20c6",
"permissions": [
"admin",
"view",
"spend"
]
}
}
}
},
"required": [
"approvalsRequired",
"coin",
"deleted",
"disableTransactionNotifications",
"id",
"label"
]
}
}
}
},
"400": {
"description": "`InvalidEnterpriseId`, 'missing label', 'keys must be unique', 'invalid key', 'cannot access this route with coin', 'key count must equal 3', 'at least one key not found', 'invalid key sources', 'wallet already exists', or invalid coin\n",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
},
"403": {
"description": "`CustodialWalletLimitReachedError`, `MustHaveColdWalletLicenseError`, `MustHaveCustodialWalletLicenseError`, `WalletLimitReachedError`\n",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
}
},
"x-code-samples": [
{
"lang": "javascript",
"source": "bitgo.coin('teth').wallets()\n.add({\n label: \"My Wallet\",\n m: 2,\n n: 3,\n keys: [\n \"591a40dc422326ff248919e62a02b2be\",\n \"591a40dd422326ff248919e91caa8b6a\",\n \"591a40dc9fdde805252f0d87f76577f8\"\n ]\n})\n.then(function(wallet) {\n // print the new wallet\n console.dir(wallet);\n});\n"
}
]
}
},
"/api/v2/{coin}/wallet/balances": {
"get": {
"tags": [
"Wallet"
],
"summary": "Get balance",
"description": "Get the total balance, confirmed balance, and spendable balance of the wallets of a certain coin type",
"operationId": "v2.wallet.gettotalbalances",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
},
{
"$ref": "#/components/parameters/allTokens"
},
{
"$ref": "#/components/parameters/enterprise"
}
],
"responses": {
"200": {
"description": "Returns a JSON with the balances in string and integer format (when possible). For Ethereum wallets, it also returns a list of the token balances. Note that all of the non-*String fields (`balance` for example) are not guaranteed to be defined or accurate for account-based coins, because they can't be accurately held within Javascript's Number.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"balance": {
"type": "integer",
"description": "The total balance of all wallets containing the given coin type. May lose\nprecision for large values.\n",
"example": 50000
},
"balanceString": {
"type": "string",
"description": "String representation of `balance`. Guaranteed to not lose\nprecision.\n",
"example": "50000"
},
"confirmedBalance": {
"type": "integer",
"description": "The total balance of confirmed transactions for all wallets containing the given\ncoin type. May lose precision for large values.\n",
"nullable": true,
"example": 40000
},
"confirmedBalanceString": {
"type": "string",
"description": "String representation of `confirmedBalance`. Guaranteed to not lose\nprecision.\n",
"example": "40000"
},
"spendableBalance": {
"type": "integer",
"description": "The total balance of all wallets containing the given coin which may\nbe used as inputs for creating new transactions. May lose precision\nfor large values.\n",
"nullable": true,
"example": 40000
},
"spendableBalanceString": {
"type": "string",
"description": "String representation of `spendableBalance`. Guaranteed to not lose\nprecision.\n",
"example": "40000"
},
"tokens": {
"type": "object",
"description": "Object of key value pairs where the keys are the token symbols (e.g. omg) and the values are the balance data for that token symbol.",
"additionalProperties": {
"type": "object",
"properties": {
"balanceString": {
"type": "string",
"example": "30000"
},
"confirmedBalanceString": {
"type": "string",
"example": "20000"
},
"heldBalanceString": {
"type": "string",
"description": "The difference between the balanceString and the spendableBalanceString.",
"example": "10000"
},
"spendableBalanceString": {
"type": "string",
"example": "20000"
},
"transferCount": {
"type": "number",
"example": 100
}
}
}
}
}
}
}
}
},
"400": {
"description": "`Invalid` enterprise id",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
},
"403": {
"description": "`Forbidden` when wallet count exceeds limit of 500",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
}
},
"x-code-samples": [
{
"lang": "javascript",
"source": "bitgo.coin(coin).wallets().getTotalBalances()\n.then(function (balances) {\n // print total balances across all wallets for this coin\n console.dir(balances);\n});\n"
}
]
}
},
"/api/v2/{coin}/wallet/{walletId}": {
"get": {
"tags": [
"Wallet"
],
"summary": "Get wallet",
"operationId": "v2.wallet.get",
"parameters": [
{
"$ref": "#/components/parameters/allTokens"
},
{
"$ref": "#/components/parameters/pathCoin"
},
{
"$ref": "#/components/parameters/pathWalletId"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet/post/responses/200/content/application~1json/schema"
},
{
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1balances/get/responses/200/content/application~1json/schema"
}
]
}
}
}
},
"400": {
"description": "`InvalidWalletId` or invalid coin",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
},
"404": {
"description": ""
}
},
"x-code-samples": [
{
"lang": "javascript",
"source": "let walletId = '585c51a5df8380e0e3082e46';\nbitgo.coin('tbtc').wallets().get({ id: walletId })\n.then(function(wallet) {\n // print the wallet\n console.dir(wallet._wallet);\n});\n"
}
]
},
"put": {
"tags": [
"Wallet"
],
"summary": "Update wallet",
"operationId": "v2.wallet.update",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
},
{
"$ref": "#/components/parameters/pathWalletId"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"approvalsRequired": {
"type": "integer",
"minimum": 1,
"example": 1
},
"disableTransactionNotifications": {
"type": "boolean"
},
"label": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet/post/requestBody/content/application~1json/schema/properties/label"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Returns the updated wallet",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet/post/responses/200/content/application~1json/schema"
}
}
}
},
"400": {
"description": "`InvalidWalletId`, invalid coin, or invalid wallet properties",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
},
"403": {
"description": ""
},
"404": {
"description": ""
}
}
},
"delete": {
"tags": [
"Wallet"
],
"summary": "Delete wallet",
"description": "You will no longer see or have access to this wallet, but it remains accessible to other wallet users. If you are the only user on the wallet, the wallet must have a 0 balance.\n",
"operationId": "v2.wallet.remove",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
},
{
"$ref": "#/components/parameters/pathWalletId"
}
],
"responses": {
"200": {
"description": "Returns the updated wallet",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet/post/responses/200/content/application~1json/schema"
}
}
}
},
"400": {
"description": "`InvalidWalletId`",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
},
"403": {
"description": "`WalletHasNonZeroBalanceError`",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
}
}
}
},
"/api/v2/{coin}/wallet/address/{address}": {
"get": {
"tags": [
"Wallet"
],
"summary": "Get wallet by address",
"operationId": "v2.wallet.getwalletbyaddress",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
},
{
"$ref": "#/components/parameters/pathAddress"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet/post/responses/200/content/application~1json/schema"
}
}
}
},
"400": {
"description": "invalid wallet address",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
},
"404": {
"description": "`WalletNotFound` or invalid coin"
}
},
"x-code-samples": [
{
"lang": "javascript",
"source": "let address = '2MyzG53Z6nF7UdNt7otEMtGNiEAEe2t2eSY';\nbitgo.coin('tbtc').wallets().getWalletByAddress({ address: address })\n.then(function(wallet) {\n // print the wallet\n console.dir(wallet._wallet);\n});\n"
}
]
}
},
"/api/v2/{coin}/wallet/{walletId}/user/{userId}": {
"delete": {
"tags": [
"Wallet"
],
"summary": "Remove user from wallet",
"description": "After a user has accepted a wallet share, they become a party on a\nwallet and the wallet share is considered “complete”. In order to\nrevoke the share after they have accepted, you can remove the user\nfrom the wallet.\n\nThis operation requires approval by another wallet administrator\nif there is more than a single administrator on a wallet.\n",
"operationId": "v2.wallet.removeuser",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
},
{
"$ref": "#/components/parameters/pathWalletId"
},
{
"$ref": "#/components/parameters/pathUserId"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet/post/responses/200/content/application~1json/schema"
}
}
}
},
"400": {
"description": "`InvalidWalletId` or `InvalidUserId`",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
},
"404": {
"description": "`WalletNotFound` or invalid coin"
}
},
"x-code-samples": [
{
"lang": "javascript",
"source": "bitgo.coin('tbtc').wallets().get({ \"id\": walletId })\n.then(function(wallet) {\n wallet.removeUser({ \"user\": userId })\n .then(function(wallet) {\n console.dir(wallet);\n });\n});\n"
}
]
}
},
"/api/v2/{coin}/wallet/{walletId}/freeze": {
"post": {
"tags": [
"Wallet"
],
"summary": "Freeze wallet",
"description": "Lock the wallet, preventing any outgoing transactions for a specified number of seconds",
"operationId": "v2.wallet.freeze",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
},
{
"$ref": "#/components/parameters/pathWalletId"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"duration": {
"type": "number",
"description": "time in seconds"
}
}
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise~1%7Bid%7D~1freeze/post/responses/200/content/application~1json/schema"
}
}
}
},
"400": {
"description": "`InvalidWalletId`, `InvalidUserId`, 'wallet is already frozen, cannot set expires time to be less than current'",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
},
"401": {
"description": "'needs unlock', 'Access token lacks required scope for this action'",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
},
"404": {
"description": "`WalletNotFound` or invalid coin"
}
},
"x-code-samples": [
{
"lang": "javascript",
"source": "wallet.freeze({ otp: '0000000' })\n.then(function(freeze) {\n console.dir(freeze);\n});\n"
}
]
}
},
"/api/v2/{coin}/wallet/{id}/unspents": {
"get": {
"tags": [
"Wallet"
],
"summary": "Get unspents",
"description": "Returns unspect transaction outputs for a wallet",
"operationId": "v2.wallet.unspents",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
},
{
"$ref": "#/components/parameters/pathId"
},
{
"$ref": "#/components/parameters/limit"
},
{
"$ref": "#/components/parameters/maxValue"
},
{
"$ref": "#/components/parameters/minConfirms"
},
{
"$ref": "#/components/parameters/minHeight"
},
{
"$ref": "#/components/parameters/minValue"
},
{
"$ref": "#/components/parameters/prevId"
},
{
"$ref": "#/components/parameters/target"
},
{
"$ref": "#/components/parameters/chains"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"coin": {
"$ref": "#/components/parameters/coin/schema"
},
"unspents": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The id of the unspent in the form \\<txid\\>:\\<tx_index\\>",
"example": "003f688cc349f1fca8ac5ffa21671ca911b6ef351085c60733ed8c2ebf162cb8:2"
},
"address": {
"type": "string",
"description": "The address of this unspent",
"example": "2MsKxhhkDo5WaLaYRGA9Cr3iSQPyXsu6Fi2"
},
"value": {
"type": "integer"
},
"valueString": {
"type": "string",
"pattern": "^-?\\d+$",
"example": "2000000"
},
"blockHeight": {
"type": "integer",
"description": "The block this Unspent was created in"
},
"date": {
"type": "string",
"format": "date-time",
"description": "The date this unspent was created",
"example": "2017-03-25T23:01:40.248Z"
},
"coinbase": {
"type": "boolean",
"description": "True if this unspent came from the coinbase transaction"
},
"wallet": {
"$ref": "#/components/parameters/userId/schema"
},
"fromWallet": {
"$ref": "#/components/parameters/userId/schema"
},
"chain": {
"type": "integer",
"description": "The type of this unspent's address (P2SH, P2WSH, etc...)",
"example": 0
},
"index": {
"type": "integer",
"description": "A monotonic counter used when creating new addresses"
},
"redeemScript": {
"type": "string",
"description": "The Script program used to cryptographically verify spending this unspent",
"example": "522102f1e990044d2a8be43d5b500bbdcb36277b97a4b07e01c5101ae8ec1568bfd6532103dab7dc82f2fc8c28200c1bdeca9c4cf181e0ca257395829cbd599395048afb57210205422e711827d8356f2fb75334d863941dd7eb45bd5788fa231dc5fa755135b653ae"
},
"witnessScript": {
"type": "string",
"description": "The segwit Script program used to cryptographically verify spending this unspent",
"example": "52210351311cd81144e6cbdba561d24dfc22644cb02d053339d4beace03231b3be4f372103a8d0c1a375b9ee1a2411f9f8e18373be7f228b18260f63bbfca48809170ed08b2103c3bd8bd074657bbe9ee6714b31a4a54b6fd5b5cda0e1030122f9bf46b5034f6b53ae"
},
"isSegwit": {
"type": "boolean"
}
}
}
}
}
}
}
}
},
"400": {
"description": "`InvalidWalletId` or `Invalid` query properties",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
},
"403": {
"description": "`Forbidden` when wallet count exceeds limit of 500",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
},
"404": {
"description": "`WalletNotFound`",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
}
},
"x-code-samples": [
{
"lang": "javascript",
"source": "wallet.unspents()\n.then(function(unspents) {\n // print unspents\n console.dir(unspents);\n});\n"
}
]
}
},
"/api/v2/{coin}/wallet/{id}/maximumSpendable": {
"get": {
"tags": [
"Wallet"
],
"summary": "Get maximum spendable",
"description": "Returns the maximum amount that can be spent with a single transaction\non the wallet.\n\nThe maximum spendable amount can differ from a wallet’s total balance.\nA transaction can only use up to 200 unspents. Wallets that have more\nthan 200 unspents cannot spend the full balance in one transaction.\nAdditionally, the value returned for the maximum spendable amount\naccounts for the current fee level by deducting the estimated fees.\nThe amount will only be calculated based on the unspents that fit the\nparameters passed.\n",
"operationId": "v2.wallet.maximumspendable",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
},
{
"$ref": "#/components/parameters/pathId"
},
{
"$ref": "#/components/parameters/allTokens"
},
{
"$ref": "#/components/parameters/enforceMinConfirmsForChange"
},
{
"$ref": "#/components/parameters/feeRate"
},
{
"$ref": "#/components/parameters/limit"
},
{
"$ref": "#/components/parameters/maxFeeRate"
},
{
"$ref": "#/components/parameters/maxValue"
},
{
"$ref": "#/components/parameters/minConfirms"
},
{
"$ref": "#/components/parameters/minHeight"
},
{
"$ref": "#/components/parameters/minValue"
},
{
"$ref": "#/components/parameters/numBlocks"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"coin": {
"$ref": "#/components/parameters/coin/schema"
},
"maximumSpendable": {
"type": "string",
"example": "19948310"
}
}
}
}
}
},
"400": {
"description": "`InvalidWalletId` or `Invalid` query properties",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
},
"404": {
"description": "`WalletNotFound`",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
}
},
"x-code-samples": [
{
"lang": "javascript",
"source": "wallet.maximumSpendable(params)\n.then(function(amount) {\n // print maximum spendable amount\n console.dir(amount);\n});\n"
}
]
}
},
"/api/v2/wallet/balances/merged": {},
"/api/v2/walletshares": {
"get": {
"tags": [
"Wallet share"
],
"summary": "List wallet shares",
"description": "List shares of all wallets with other BitGo users. Returns only wallets on which the current user has spend permission.",
"operationId": "v2.wallet.sharing.listallshares",
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"incoming": {
"type": "array",
"items": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1walletshare~1%7BshareId%7D/get/responses/200/content/application~1json/schema"
}
},
"outgoing": {
"type": "array",
"items": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1walletshare~1%7BshareId%7D/get/responses/200/content/application~1json/schema"
}
}
}
}
}
}
}
},
"x-code-samples": [
{
"lang": "javascript",
"source": "bitgo.coin('tbtc').wallets().listShares({})\n.then(function(shares) {\n console.dir(shares);\n});\n"
}
]
}
},
"/api/v2/{coin}/walletshares": {},
"/api/v2/{coin}/walletshare/{shareId}": {
"get": {
"tags": [
"Wallet share"
],
"summary": "Get a wallet share",
"description": "Get a wallet share, including the encrypted shared keychain. Token unlock is required if the wallet share includes a keychain.",
"operationId": "v2.wallet.sharing.getshare",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
},
{
"$ref": "#/components/parameters/pathShareId"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"$ref": "#/components/parameters/userId/schema"
},
"coin": {
"$ref": "#/components/parameters/coin/schema"
},
"wallet": {
"$ref": "#/components/parameters/userId/schema"
},
"walletLabel": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet/post/requestBody/content/application~1json/schema/properties/label"
},
"fromUser": {
"$ref": "#/components/parameters/userId/schema"
},
"toUser": {
"$ref": "#/components/parameters/coin/schema"
},
"permissions": {
"type": "string",
"description": "Comma-separated list of permissions which are granted by this share.",
"example": "spend,view"
},
"message": {
"type": "string",
"description": "User readable message to display to the share recipient"
},
"state": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1walletshare~1%7BshareId%7D/post/requestBody/content/application~1json/schema/properties/state"
},
"enterprise": {
"$ref": "#/components/parameters/userId/schema"
},
"pendingApprovalId": {
"description": "Only set if this wallet share is currently pending approval",
"$ref": "#/components/parameters/userId/schema"
},
"keychain": {
"description": "Only set if this wallet share has an associated keychain",
"type": "object",
"properties": {
"pub": {
"description": "Sharing user's root public key",
"type": "string"
},
"encryptedPrv": {
"description": "Sharing user's private key encrypted under their wallet passphrase",
"type": "string"
},
"fromPubKey": {
"description": "Sharing user's derived public key which will be used to calculate the wallet sharing secret.",
"type": "string"
},
"toPubKey": {
"description": "Shared-to user's derived public key which will be used to calculate the wallet sharing secret.",
"type": "string"
},
"path": {
"description": "BIP32 HD path of the derived public keys (fromPubKey and toPubKey)",
"example": "m/1234/1/1",
"type": "string"
}
}
}
},
"required": [
"id",
"coin",
"wallet",
"walletLabel",
"fromUser",
"toUser",
"permissions",
"message",
"state",
"enterprise"
]
}
}
}
},
"401": {
"description": "`Unauthorized` when the current user lacks permission to either manage or create wallets",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
}
},
"x-code-samples": [
{
"lang": "javascript",
"source": "bitgo.coin('tbtc').wallets().getShare({ walletShareId: shareId })\n.then(function(share) {\n console.dir(share);\n});\n"
}
]
},
"post": {
"tags": [
"Wallet share"
],
"summary": "Update a wallet share",
"operationId": "v2.wallet.sharing.updateshare",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
},
{
"$ref": "#/components/parameters/pathShareId"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"state": {
"type": "string",
"example": "active",
"enum": [
"pendingapproval",
"active",
"accepted",
"canceled",
"rejected"
]
}
}
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"state": {
"description": "New state of the wallet share after update",
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1walletshare~1%7BshareId%7D/post/requestBody/content/application~1json/schema/properties/state"
},
"changed": {
"type": "boolean"
}
}
}
}
}
}
}
},
"delete": {
"tags": [
"Wallet share"
],
"summary": "Cancel a wallet share",
"description": "Cancels a pending outgoing wallet share, or rejects an incoming share.\nThe share must not have been accepted yet.\n",
"operationId": "v2.wallet.sharing.cancelshare",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
},
{
"$ref": "#/components/parameters/pathShareId"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1walletshare~1%7BshareId%7D/post/responses/200/content/application~1json/schema"
}
}
}
}
},
"x-code-samples": [
{
"lang": "javascript",
"source": "bitgo.coin('tbtc').wallets().cancelShare({\n walletShareId: shareId\n})\n.then(function(result){\n console.dir(result);\n});\n"
}
]
}
},
"/api/v2/{coin}/walletshare/{shareId}/resendemail": {
"post": {
"tags": [
"Wallet share"
],
"summary": "Resend a wallet share invitation email",
"description": "Resends the wallet share invitation to the share recipient. The wallet\nshare must not have been accepted yet.\n",
"operationId": "v2.wallet.sharing.resendemail",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
},
{
"$ref": "#/components/parameters/pathShareId"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"resent": {
"type": "boolean"
}
}
}
}
}
},
"400": {
"description": "`Invalid` when either the share id is invalid or the wallet share is not active",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
},
"401": {
"description": "`Unauthorized` when the current user lacks permission to manage wallets",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
}
},
"x-code-samples": [
{
"lang": "javascript",
"source": "bitgo.coin('tbtc').wallets().resendShareInvite({ walletShareId: shareId })\n.then(function(share) {\n console.dir(share);\n});\n"
}
]
}
},
"/api/v2/usergroups/{id}": {},
"/api/v2/usergroupmembers": {},
"/api/v2/usergroupwallets": {},
"/api/v2/{coin}/wallet/{walletId}/webhooks": {
"post": {
"tags": [
"Webhook"
],
"summary": "Add wallet webhook",
"description": "Add a webhook that will result in an HTTP callback at the\nspecified URL from BitGo when events are triggered. There\nis a limit of 10 webhooks of each type per wallet.\n\nTypes of wallet webhooks available:\n\n1. Transfer webhooks will fire on any transfer on the wallet.\n2. Pending approval webhooks will fire when an event triggers\n policy on the wallet (e.g send transaction, user change, policy\n change, pending approval updated).\n3. (Ripple, ETH only) Address confirmation webhooks will fire\n when an address has been initialized on the wallet.\n",
"operationId": "v2.wallet.addwebhook",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
},
{
"$ref": "#/components/parameters/pathWalletId"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"transfer",
"transaction",
"pendingapproval",
"address_confirmation"
],
"example": "transfer",
"description": "Type of event to listen to (can be transfer or pendingaapproval)."
},
"allToken": {
"type": "boolean",
"description": "Applies to transactions for ETH and all ERC20 tokens.",
"default": false
},
"url": {
"type": "string",
"format": "uri",
"example": "http://your.server.com/webhook",
"description": "URL to fire the webhook to."
},
"label": {
"type": "string",
"description": "Label of the new webhook."
},
"numConfirmations": {
"type": "integer",
"minimum": 0,
"example": 6,
"description": "Number of confirmations before triggering the webhook. If 0 or unspecified, requests will be sent to the callback endpoint when the transfer is first seen and when it is confirmed."
}
},
"required": [
"type",
"url"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"type": "object",
"properties": {
"allToken": {
"type": "boolean",
"example": false
}
}
},
{
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1webhooks/post/responses/200/content/application~1json/schema/allOf/1"
}
]
}
}
}
},
"400": {
"description": "'Webhook already exists', 'Invalid url'",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
}
},
"x-code-samples": [
{
"lang": "javascript",
"source": "var walletId = \"58d99…39604\";\nvar url = \"http://your.server.com/webhook\";\n\nbitgo.coin('tbtc').wallets().get({ id: walletId })\n.then(function(wallet) {\n return wallet.addWebhook({\n url: url,\n type: \"transfer\"\n });\n})\n.then(function(webhook) {\n // print the new webhook\n console.dir(webhook);\n});\n"
}
]
},
"get": {
"tags": [
"Webhook"
],
"summary": "List wallet webhooks",
"description": "List webhooks set up on the wallet. Currently, the types of\nwebhooks that can be attached to a wallet are `transfer`,\n`pendingapproval`, and `address_confirmation` notifications.\n",
"operationId": "v2.wallet.listwebhooks",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
},
{
"$ref": "#/components/parameters/pathWalletId"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"webhooks": {
"type": "array",
"items": {
"allOf": [
{
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1webhooks/post/responses/200/content/application~1json/schema/allOf/1"
},
{
"type": "object",
"properties": {
"walletId": {
"$ref": "#/components/parameters/userId/schema"
},
"allToken": {
"type": "boolean",
"example": false
}
}
}
]
}
}
}
}
}
}
}
},
"x-code-samples": [
{
"lang": "javascript",
"source": "var walletId = \"58d99…39604\";\n\nbitgo.coin('tbtc').wallets().get({ id: walletId })\n.then(function(wallet) {\n return wallet.listWebhooks();\n})\n.then(function(webhooks) {\n console.dir(webhooks);\n});\n"
}
]
},
"delete": {
"tags": [
"Webhook"
],
"summary": "Remove wallet webhook",
"description": "Removing a webhook will cause new events of the specified type to no\nlonger trigger HTTP callbacks to your URLs\n",
"operationId": "v2.wallet.removewebhook",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
},
{
"$ref": "#/components/parameters/pathWalletId"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"type": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7BwalletId%7D~1webhooks/post/requestBody/content/application~1json/schema/properties/type",
"description": "Type of the webhook (e.g. transfer, pendingapproval)."
},
"url": {
"type": "string",
"format": "uri",
"example": "https://your.server.com/user_webhook"
}
}
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"removed": {
"type": "integer",
"example": 1,
"description": "Numnber of block webhooks be removed."
}
}
}
}
}
}
},
"x-code-samples": [
{
"lang": "javascript",
"source": "var walletId = \"58d99…39604\";\nvar url = \"http://your.server.com/webhook\";\n\nbitgo.coin('tbtc').wallets().get({ id: walletId })\n.then(function(wallet) {\n return wallet.removeWebhook({\n url: url,\n type: \"transfer\"\n });\n})\n.then(function(result) {\n console.dir(result);\n});\n"
}
]
}
},
"/api/v2/{coin}/wallet/{walletId}/webhooks/{webhookId}/simulate": {
"post": {
"tags": [
"Webhook"
],
"summary": "Simulate wallet webhook",
"description": "Simulates and tests a webhook so you can view its response. A\n`transferId` or `pendingApprovalId` is required.\n",
"operationId": "v2.wallet.simulatewebhook",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
},
{
"$ref": "#/components/parameters/pathWalletId"
},
{
"$ref": "#/components/parameters/pathWebhookId"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"transferId": {
"$ref": "#/components/parameters/userId/schema"
},
"pendingApprovalId": {
"$ref": "#/components/parameters/userId/schema"
}
}
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"webhookNotifications": {
"type": "array",
"items": {
"allOf": [
{
"type": "object",
"properties": {
"wallet": {
"$ref": "#/components/parameters/userId/schema"
},
"transfer": {
"$ref": "#/components/parameters/userId/schema"
},
"hash": {
"$ref": "#/components/parameters/pathTransferId/schema/oneOf/1"
}
}
},
{
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1webhooks~1%7BwebhookId%7D~1simulate/post/responses/200/content/application~1json/schema/properties/webhookNotifications/items/allOf/1"
}
]
}
}
}
}
}
}
}
},
"x-code-samples": [
{
"lang": "javascript",
"source": "wallet.simulateWebhook({\n webhookId: '590cd…35835',\n transferId: '59b70…dbd44'\n})\n.then(function(result) {\n console.dir(result);\n});\n"
}
]
}
},
"/api/v2/{coin}/webhooks": {
"post": {
"tags": [
"Webhook"
],
"summary": "Add block webhook",
"description": "Adds a webhook that will result in an HTTP callback at the\nspecified URL from BitGo when events are triggered.\n\nTypes of block webhooks:\n\n1. Block webhooks will fire when a new block is seen on the coin network.\n2. Wallet confirmation webhooks will fire when a wallet has been initialized.\n",
"operationId": "v2.webhooks.add",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"type": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1webhooks/delete/requestBody/content/application~1json/schema/properties/type"
},
"url": {
"type": "string",
"format": "uri",
"example": "http://your.server.com/webhook",
"description": "URL to fire the webhook to."
},
"label": {
"type": "string",
"description": "Label of the new webhook."
},
"numConfirmations": {
"type": "integer",
"minimum": 0,
"example": 6,
"description": "Number of confirmations before triggering the webhook. If 0 or unspecified, requests will be sent to the callback endpoint when the transfer is first seen and when it is confirmed."
}
},
"required": [
"type",
"url"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"type": "object",
"properties": {
"type": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1webhooks/delete/requestBody/content/application~1json/schema/properties/type"
},
"userId": {
"$ref": "#/components/parameters/userId/schema"
}
}
},
{
"type": "object",
"properties": {
"id": {
"$ref": "#/components/parameters/userId/schema"
},
"label": {
"type": "string",
"example": "Test Webhook"
},
"created": {
"type": "string",
"format": "date-time",
"example": "2018-05-05T19:46:22.019Z"
},
"coin": {
"$ref": "#/components/parameters/coin/schema"
},
"type": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7BwalletId%7D~1webhooks/post/requestBody/content/application~1json/schema/properties/type"
},
"url": {
"type": "string",
"format": "uri",
"example": "https://your.server.com/webhook"
},
"version": {
"type": "integer",
"example": 2,
"description": "2 for coins running on API v2."
},
"numConfirmations": {
"type": "integer",
"example": 6
},
"state": {
"type": "string",
"enum": [
"active",
"suspended"
],
"example": "active"
},
"lastAttempt": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1webhooks/post/responses/200/content/application~1json/schema/allOf/1/properties/created"
},
"failingSince": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1webhooks/post/responses/200/content/application~1json/schema/allOf/1/properties/created"
},
"successiveFailedAttempts": {
"type": "integer",
"example": 0
}
},
"required": [
"url"
]
}
]
}
}
}
},
"400": {
"description": "'Webhook already exists', 'Invalid url'",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
}
},
"x-code-samples": [
{
"lang": "javascript",
"source": "var baseCoin = bitgo.coin('tbtc');\nvar webhooks = baseCoin.webhooks();\n\nwebhooks.add({\n url: \"http://your.server.com/user_webhook\",\n type: \"block\",\n label: \"Test User Webhook\",\n numConfirmations: 1\n})\n.then(function(result) {\n console.dir(result);\n});\n"
}
]
},
"get": {
"tags": [
"Webhook"
],
"summary": "List block webhooks",
"description": "Returns block webhooks. The types of webhooks are `block` and\n`wallet_confirmation` notifications.\n",
"operationId": "v2.webhooks.list",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"webhooks": {
"type": "array",
"items": {
"allOf": [
{
"type": "object",
"properties": {
"type": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1webhooks/delete/requestBody/content/application~1json/schema/properties/type"
},
"userId": {
"$ref": "#/components/parameters/userId/schema"
}
}
},
{
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1webhooks/post/responses/200/content/application~1json/schema/allOf/1"
}
]
}
}
}
}
}
}
}
},
"x-code-samples": [
{
"lang": "javascript",
"source": "var baseCoin = bitgo.coin('tbtc');\nvar webhooks = baseCoin.webhooks();\n\nwebhooks.list()\n.then(function(result) {\n console.dir(result);\n});\n"
}
]
},
"delete": {
"tags": [
"Webhook"
],
"summary": "Remove block webhook",
"description": "Removing a webhook will cause new events of the specified type to no\nlonger trigger HTTP callbacks to your URLs.\n",
"operationId": "v2.webhooks.remove",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"block",
"wallet_confirmation"
],
"example": "block"
},
"url": {
"type": "string",
"format": "uri",
"example": "https://your.server.com/user_webhook"
}
},
"required": [
"type",
"url"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"removed": {
"type": "integer",
"example": 1,
"description": "Numnber of block webhooks be removed."
}
}
}
}
}
}
},
"x-code-samples": [
{
"lang": "javascript",
"source": "var baseCoin = bitgo.coin('tbtc');\nvar webhooks = baseCoin.webhooks();\n\nwebhooks.remove({\n url: \"http://your.server.com/user_webhook\",\n type: \"block\"\n})\n.then(function(result) {\n console.dir(result);\n});\n"
}
]
}
},
"/api/v2/{coin}/webhooks/{webhookId}/simulate": {
"post": {
"tags": [
"Webhook"
],
"summary": "Simulate block webhook",
"description": "Simulates and tests a block webhook so you can view its response.\n",
"operationId": "v2.webhooks.simulate",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
},
{
"$ref": "#/components/parameters/pathWebhookId"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"blockId": {
"type": "string",
"example": "000000000000000000167129bacf6e90b8247cc975290c214c43a3a7c6b1e54b"
}
}
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"webhookNotifications": {
"type": "array",
"items": {
"allOf": [
{
"type": "object",
"properties": {
"hash": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1webhooks~1%7BwebhookId%7D~1simulate/post/requestBody/content/application~1json/schema/properties/blockId"
}
}
},
{
"type": "object",
"properties": {
"id": {
"$ref": "#/components/parameters/userId/schema"
},
"webhook": {
"$ref": "#/components/parameters/userId/schema"
},
"updateAt": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1webhooks/post/responses/200/content/application~1json/schema/allOf/1/properties/created"
},
"coin": {
"$ref": "#/components/parameters/coin/schema"
},
"type": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7BwalletId%7D~1webhooks/post/requestBody/content/application~1json/schema/properties/type"
},
"url": {
"type": "string",
"format": "uri",
"example": "https://your.server.com/webhook"
},
"version": {
"type": "integer",
"example": 2
},
"state": {
"type": "string",
"enum": [
"unconfirmed",
"new",
"pending",
"processed",
"failed"
],
"example": "new"
}
},
"required": [
"url"
]
}
]
}
}
}
}
}
}
}
},
"x-code-samples": [
{
"lang": "javascript",
"source": "var baseCoin = bitgo.coin('tbtc');\nvar webhooks = baseCoin.webhooks();\n\nwebhooks.simulate({\n webhookId: '590cd…35835',\n blockId: '00000…507d6'\n})\n.then(function(result) {\n console.dir(result);\n});\n"
}
]
}
},
"/api/v2/admin/query": {},
"/api/v2/admin/query/{id}": {},
"/api/v1/admin/stats/wallet/{address}/recreate": {},
"/api/v2/{coin}/admin/stats/wallet/{walletId}/recreate": {},
"/api/v2/{coin}/admin/wallet/{walletId}/findbadtransfers": {},
"/api/v2/{coin}/admin/wallet/{walletId}/fixbadtransfers": {},
"/api/v2/xlm/federation": {
"get": {
"tags": [
"Federation"
],
"summary": "Look up user accounts by their Stellar address or id",
"description": "Types of searches available:\n\n1. By name: Resolve a Stellar address into an account\n2. By id: Resolve an account id into an account\n",
"operationId": "v2.federation",
"parameters": [
{
"$ref": "#/components/parameters/queryFederationQ"
},
{
"$ref": "#/components/parameters/queryFederationType"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"account_id": {
"type": "string"
},
"stellar_address": {
"type": "string"
},
"memo_type": {
"type": "string"
},
"memo": {
"type": "string"
}
}
}
}
}
},
"400": {
"description": "'Unsupported type', 'lookup queries not allowed for domain', 'invalid username', 'invalid id'",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status": {
"type": "number",
"description": "HTTP status code"
},
"detail": {
"type": "string",
"description": "Human-readable error message"
},
"error": {
"type": "string",
"description": "Human-readable error message"
},
"name": {
"type": "string",
"description": "Error code"
},
"requestId": {
"type": "string",
"description": "Client request id"
}
},
"required": [
"status",
"detail",
"error",
"name",
"requestId"
]
}
}
}
}
}
}
},
"/api/v2/sendlabels": {
"get": {
"tags": [
"Send label"
],
"summary": "Get send labels",
"description": "List all send labels for the enterprise. Address and coin parameters optional.",
"operationId": "v2.sendlabels.list",
"parameters": [
{
"$ref": "#/components/parameters/coin"
},
{
"$ref": "#/components/parameters/address"
},
{
"$ref": "#/components/parameters/enterprise"
}
],
"responses": {
"200": {
"description": "All send labels",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/paths/~1api~1v2~1sendlabels/post/responses/200/content/application~1json/schema"
}
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
}
}
},
"post": {
"tags": [
"Send label"
],
"summary": "Create send label",
"operationId": "v2.sendlabels.create",
"description": "Create an address send label for an id",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"coin": {
"$ref": "#/components/parameters/coin/schema"
},
"address": {
"$ref": "#/components/parameters/address/schema"
},
"enterpriseId": {
"$ref": "#/components/parameters/userId/schema"
},
"label": {
"type": "string",
"maxLength": 250
}
},
"required": [
"coin",
"address",
"enterpriseId",
"label"
]
}
}
}
},
"responses": {
"200": {
"description": "Send label was created",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"$ref": "#/components/parameters/userId/schema"
},
"coin": {
"$ref": "#/components/parameters/coin/schema"
},
"address": {
"$ref": "#/components/parameters/address/schema"
},
"enterpriseId": {
"$ref": "#/components/parameters/userId/schema"
},
"label": {
"type": "string",
"maxLength": 250
}
},
"required": [
"id",
"coin",
"address",
"enterpriseId",
"label"
]
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
}
}
}
},
"/api/v2/sendlabels/{id}": {
"get": {
"tags": [
"Send label"
],
"summary": "Get send label by id",
"operationId": "v2.sendlabels.get",
"description": "Gets an address send label by the specified id",
"parameters": [
{
"$ref": "#/components/parameters/pathId"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1sendlabels/post/responses/200/content/application~1json/schema"
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
}
}
},
"put": {
"tags": [
"Send label"
],
"summary": "Update send label",
"operationId": "v2.sendlabels.update",
"description": "Updates an address send label by the specified id",
"parameters": [
{
"$ref": "#/components/parameters/pathId"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"label": {
"type": "string",
"maxLength": 250,
"description": "A human-readable mapping to an address"
}
},
"required": [
"label"
]
}
}
}
},
"responses": {
"200": {
"description": "Updated send label",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1sendlabels/post/responses/200/content/application~1json/schema"
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
}
}
},
"delete": {
"tags": [
"Send label"
],
"summary": "Delete send label",
"operationId": "v2.sendlabels.delete",
"parameters": [
{
"$ref": "#/components/parameters/pathId"
}
],
"responses": {
"200": {
"description": "Deleted send label",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1sendlabels/post/responses/200/content/application~1json/schema"
}
}
}
},
"400": {
"description": "An error message describing what was incorrect",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
}
}
}
},
"/api/v2/{coin}/wallet/{walletId}/tx/build": {
"post": {
"tags": [
"Wallet"
],
"summary": "Build a transaction",
"operationId": "v2.wallet.tx.build",
"description": "Build a transaction from the wallet using provided options.\nInstead of this endpoint, you likely want to use [send transaction](https://bitgo.com/api/v2/#operation/express.wallet.sendcoins)\nin the SDK.\n",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
},
{
"$ref": "#/components/parameters/pathWalletId"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"recipients": {
"type": "array",
"items": {
"type": "object",
"properties": {
"amount": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7BwalletId%7D~1tx~1build/post/requestBody/content/application~1json/schema/properties/feeRate",
"description": "String representation of the amount to send"
},
"address": {
"$ref": "#/components/parameters/address/schema",
"description": "The address to send to"
}
}
},
"description": "A list of recipient addresses and amounts. Must be present but empty for CPFP transactions."
},
"numBlocks": {
"type": "integer",
"description": "Block target for fee estimation use",
"minimum": 2,
"maximum": 1000
},
"feeRate": {
"description": "Fee rate in satoshis/litoshis/zatoshis/duffs per kilobyte",
"oneOf": [
{
"type": "string",
"pattern": "^-?\\d+$",
"example": "2000000"
},
{
"type": "integer"
}
]
},
"maxFeeRate": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7BwalletId%7D~1tx~1build/post/requestBody/content/application~1json/schema/properties/feeRate",
"description": "Custom upper limit for fee rate in satoshis/litoshis/zatoshis/duffs per kilobyte"
},
"minConfirms": {
"type": "integer",
"description": "The minimum number of block confirmations required when selecting which unspents to use in the transaction.\n"
},
"enforceMinConfirmsForChange": {
"type": "boolean",
"description": "Whether to enforce minConfirms on previous change inputs. Defaults to false."
},
"gasPrice": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7BwalletId%7D~1tx~1build/post/requestBody/content/application~1json/schema/properties/feeRate",
"description": "Custom gas price to be used for sending the transaction. Only for ETH and ERC20 tokens."
},
"gasLimit": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7BwalletId%7D~1tx~1build/post/requestBody/content/application~1json/schema/properties/feeRate",
"description": "Custom gas limit to be used for sending the transaction. Only for ETH and ERC20 tokens."
},
"targetWalletUnspents": {
"type": "integer",
"description": "The desired count of unspents in the wallet. UTXO-based coins only"
},
"minValue": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7BwalletId%7D~1tx~1build/post/requestBody/content/application~1json/schema/properties/feeRate",
"description": "Ignore unspents smaller than this amount of base units"
},
"maxValue": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7BwalletId%7D~1tx~1build/post/requestBody/content/application~1json/schema/properties/feeRate",
"description": "Ignore unspents larger than this amount of base units"
},
"sequenceId": {
"type": "string",
"description": "A `sequenceId` allows API consumers to create transactions with a unique identifier they can use to reference later. If a transaction is created with a sequenceId, that identifier can be used to fetch the transaction from the API at a later point in time. The API does not allow the same sequenceId to be used to identify more than one transfer within a wallet. The sequenceId is only visible to users on the wallet and is not shared publicly.\n"
},
"noSplitChange": {
"type": "boolean",
"description": "Disable automatic change splitting",
"default": false
},
"unspents": {
"type": "array",
"items": {
"type": "string"
},
"description": "Used to specify explicit unspents to be used in the transaction"
},
"changeAddress": {
"$ref": "#/components/parameters/address/schema",
"description": "Specifies the destination of the change output"
},
"instant": {
"type": "boolean",
"description": "(DASH ONLY) Specifies whether or not to use Dash's \"InstantSend\" feature when sending a transaction."
},
"memo": {
"type": "object",
"description": "Stellar only"
},
"comment": {
"type": "string",
"description": "Optional metadata (only persisted in BitGo) to be applied to the transaction. Typically used to 'tag' transactions with memorable comments.\n",
"maxLength": 256
},
"addressType": {
"type": "string",
"description": "The type of address to create for change. One of `p2sh`, `p2shP2wsh`, and `p2wsh`."
},
"validFromBlock": {
"type": "integer",
"description": "Optional block this transaction is valid from"
},
"validToBlock": {
"type": "integer",
"description": "Optional block this transaction is valid until"
}
},
"required": [
"recipients"
]
}
}
}
},
"responses": {
"200": {
"description": "Successfully built transaction",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"keyDerivationPath": {
"type": "string"
}
}
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
},
{
"allOf": [
{
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema/allOf/0"
},
{
"properties": {
"context": {
"type": "object",
"properties": {
"address": {
"type": "string"
},
"coin": {
"$ref": "#/components/parameters/coin/schema"
}
},
"required": [
"address",
"coin"
]
},
"name": {
"type": "string",
"description": "Error code",
"enum": [
"InvalidAddress"
]
}
},
"required": [
"coin",
"context",
"address",
"name"
]
}
]
}
]
}
}
}
}
},
"x-code-samples": [
{
"lang": "javascript",
"source": "let params = {\n recipients: [\n {\n amount: 0.01 * 1e8,\n address: '2NFfxvXpAWjKng7enFougtvtxxCJ2hQEMo4',\n }\n ]\n};\nwallet.prebuildTransaction(params)\n.then(function(transaction) {\n // print transaction details\n console.dir(transaction);\n});\n"
}
]
}
},
"/api/v2/{coin}/wallet/{walletId}/tx/initiate": {
"post": {
"tags": [
"Wallet"
],
"summary": "Initiate a transaction",
"operationId": "v2.wallet.tx.initiate",
"description": "Initiate an unsigned transaction to create a pending approval. This is useful to request funds to be sent from custodial wallets.",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
},
{
"$ref": "#/components/parameters/pathWalletId"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7BwalletId%7D~1tx~1build/post/requestBody/content/application~1json/schema"
}
}
}
},
"responses": {
"202": {
"description": "A Pending Approval for the transaction has been created and is waiting for approval",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1pendingApprovals~1%7Bid%7D/put/responses/200/content/application~1json/schema"
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
}
}
}
},
"/api/v2/{coin}/wallet/{walletId}/tx/send": {
"post": {
"tags": [
"Wallet"
],
"summary": "Send a half-signed transaction",
"operationId": "v2.wallet.tx.send",
"description": "Send a half-signed transaction from the specified wallet.\nInstead of this endpoint, you likely want to use [send transaction](https://bitgo.com/api/v2/#operation/express.wallet.sendcoins)\nin the SDK.\n",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
},
{
"$ref": "#/components/parameters/pathWalletId"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"description": "This endpoint broadcasts half-signed transactions.",
"properties": {
"comment": {
"type": "string",
"description": "An optional memo for the transaction.",
"maxLength": 256
},
"halfSigned": {
"type": "object",
"properties": {
"txHex": {
"type": "string"
}
},
"description": "The half-signed transaction. The request must include this or a txHex."
},
"txHex": {
"type": "string",
"description": "The half-signed, serialized transaction hex. Alternative to sending halfSigned."
},
"sequenceId": {
"type": "string",
"description": "Your own unique ID"
},
"buildParams": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7BwalletId%7D~1tx~1build/post/requestBody/content/application~1json/schema",
"description": "Include buildParams from the build request to be stored in case of rebuilding."
}
}
}
}
}
},
"responses": {
"200": {
"description": "Transaction successfully sent",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"transfer": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7BwalletId%7D~1transfer~1%7BtransferId%7D/get/responses/206/content/application~1json/schema"
},
"txid": {
"type": "string",
"description": "The transaction's unique identifier"
},
"tx": {
"type": "string",
"description": "The encoded transaction, either base64 for XLM or hex for other coins"
},
"status": {
"$ref": "#/components/parameters/state/schema"
}
}
}
}
}
},
"202": {
"description": "A transaction has been created, but will require approval from admins on the wallet.",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1pendingApprovals~1%7Bid%7D/put/responses/200/content/application~1json/schema"
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
}
},
"x-code-samples": [
{
"lang": "javascript",
"source": "let params = {\n txHex: \"010000000179b0b5ad6641de8fed13270395e52515236c922d1dd5bee3a9dae68c3cbbf57d0100000000ffffffff0240420f000000000017a914f600974688ccdf5e72ce3f2b187afabbf4f1d3ec878e7835000000000017a9140c0a513cb9d8e46113c57aa46ae42d1bad29063d8700000000\",\n otp: '0000000'\n};\nwallet.submitTransaction(params)\n.then(function(transaction) {\n // print transaction status\n console.dir(transaction);\n});\n"
}
]
}
},
"/api/v2/{coin}/requiredReserve": {
"get": {
"tags": [
"Wallet"
],
"summary": "Get balance reserve data",
"description": "Returns information about reserve requirements for an account. Currently only available for Stellar.",
"operationId": "v2.tx.fetchReserve",
"parameters": [
{
"name": "coin",
"in": "path",
"required": true,
"schema": {
"type": "string",
"enum": [
"txlm",
"xlm"
]
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"baseFee": {
"type": "string",
"description": "base fee used in transaction fees",
"example": "100"
},
"baseReserve": {
"type": "string",
"description": "base reserve used in minimum account balances",
"example": "5000000"
},
"reserve": {
"type": "string",
"description": "minimum account balance, calculated using base reserve",
"example": "25000000"
},
"minimumFunding": {
"type": "string",
"description": "minimum funding balance, calculated using reserve and base fee",
"example": "25000500"
},
"height": {
"type": "integer",
"description": "the height of the block that provides the base values",
"example": 11228504
}
}
}
}
}
},
"400": {
"description": "`CoinUnsupported` or `Invalid`",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
}
}
}
},
"/api/v2/{coin}/wallet/{walletId}/passcoderecovery": {},
"/api/v2/pingexpress": {
"get": {
"tags": [
"Express"
],
"summary": "Ping BitGo Express",
"operationId": "express.ping",
"description": "Ping bitgo express to ensure that it is still running. Unlike /ping, this does not try connecting to bitgo.com.\n",
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status": {
"type": "string"
}
}
}
}
}
}
}
}
},
"/api/v2/{coin}/wallet/{walletId}/sendcoins": {
"post": {
"tags": [
"Express"
],
"summary": "Send transaction",
"operationId": "express.wallet.sendcoins",
"description": "This call allows you to create and send cryptocurrency to a destination address.",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
},
{
"$ref": "#/components/parameters/pathWalletId"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"address": {
"type": "string",
"description": "Destination address"
},
"amount": {
"type": "integer",
"description": "Amount in base units (e.g. satoshi, wei, drops, stroops)"
},
"message": {
"type": "string",
"description": "Optional message to attach to transaction"
},
"data": {
"type": "string",
"description": "Optional data to pass to transaction (ETH specific)"
},
"walletPassphrase": {
"type": "string",
"description": "Passphrase to decrypt the user key on the wallet"
},
"prv": {
"type": "string",
"description": "Private key in string form, if walletPassphrase is not available"
},
"minConfirms": {
"type": "integer",
"description": "Minimum confirmation threshold for inputs"
},
"enforceMinConfirmsForChange": {
"type": "boolean",
"description": "Flag for enforcing minConfirms for change inputs"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Transaction successfully sent",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7Bid%7D~1sweep/post/responses/200/content/application~1json/schema"
}
}
}
},
"202": {
"description": "A transaction has been created, but will require approval from admins on the wallet.",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7Bid%7D~1sweep/post/responses/200/content/application~1json/schema"
}
}
}
}
},
"x-code-samples": [
{
"lang": "javascript",
"source": "let params = {\n amount: 0.01 * 1e8,\n address: '2NFfxvXpAWjKng7enFougtvtxxCJ2hQEMo4',\n walletPassphrase: 'secretpassphrase1a5df8380e0e30'\n};\nwallet.send(params)\n.then(function(transaction) {\n // print transaction details\n console.dir(transaction);\n});\n"
},
{
"lang": "javascript",
"source": "let params = {\n amount: '1000000000000000000', // 1 ETH\n address: '0xf7b30036154fbee843c4346b717528ab41eebf02',\n walletPassphrase: 'secretpassphrase1a5df8380e0e30'\n};\nwallet.send(params)\n.then(function(transaction) {\n // print transaction details\n console.dir(transaction);\n});\n"
}
]
}
},
"/api/v2/{coin}/wallet/{walletId}/sendmany": {
"post": {
"tags": [
"Express"
],
"summary": "Send to many",
"operationId": "express.wallet.sendmany",
"description": "Send coins to multiple recipients. Only supported by UTXO coins currently.\n\nThis may be useful if you schedule outgoing transactions in bulk, as you will be able to process multiple recipients and lower the aggregate amount of blockchain fees paid.\n",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
},
{
"$ref": "#/components/parameters/pathWalletId"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"recipients": {
"type": "array",
"items": {
"type": "object",
"description": "List of recipient addresses and amounts to send",
"properties": {
"address": {
"$ref": "#/components/parameters/address/schema"
},
"amount": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7BwalletId%7D~1tx~1build/post/requestBody/content/application~1json/schema/properties/feeRate",
"description": "The amount in base units (e.g. satoshis) to send."
}
}
},
"description": "A list of recipient addresses and amounts. Must be present but empty for CPFP transactions."
},
"numBlocks": {
"type": "integer",
"description": "(BTC only) Number of blocks the transaction approximately should be confirmed. This controls the fee rate.",
"minimum": 2,
"maximum": 1000
},
"feeRate": {
"type": "integer",
"description": "Desired feeRate for the transaction in satothi/kB"
},
"maxFeeRate": {
"type": "integer",
"description": "Upper limit for feeRate in satoshis/kB"
},
"minConfirms": {
"type": "integer",
"description": "Minimum confirmation threshold for inputs"
},
"enforceMinConfirmsForChange": {
"type": "boolean",
"description": "Flag for enforcing minConfirms for change input. Defaults to false."
},
"targetWalletUnspents": {
"type": "integer",
"description": "Desired count of unspents in the wallet"
},
"minValue": {
"type": "integer",
"description": "Minimum value for unspents to get selected"
},
"maxValue": {
"type": "integer",
"description": "Minimum value for unspents to get selected"
},
"sequenceId": {
"type": "string",
"description": "A `sequenceId` allows API consumers to create transactions with a unique identifier they can use to reference later. If a transaction is created with a sequenceId, that identifier can be used to fetch the transaction from the API at a later point in time. The API does not allow the same sequenceId to be used to identify more than one transfer within a wallet.\n"
},
"lastLedgerSequence": {
"type": "integer",
"description": "(XRP only) Absolute max ledger the transaction should be accepted in, whereafter it will be rejected"
},
"ledgerSequenceDelta": {
"type": "string",
"description": "(XRP only) Relative ledger height (in relation to the current ledger) that the transaction should be accepted in, whereafter it will be rejected"
},
"gasPrice": {
"type": "integer",
"description": "Custom gas price to be used for sending the transaction"
},
"noSplitChange": {
"type": "boolean",
"description": "Flag for disabling automatic change splitting for purposes of unspent management"
},
"unspents": {
"type": "array",
"description": "For advanced users, specify the unspents to use in the transaction <br/> Each unspent should be in the form prevTxId:nOutput",
"items": {
"type": "string",
"description": "An unspent in the form prevTxId:nOutput",
"example": "12b147dd8b4f73c01f72bdbf5b589eea614f3de609ffdbdac84852d6505cf8a3:1"
}
},
"comment": {
"type": "string",
"description": "Any additional comment to attach to the transaction within BitGo. Will show up in UI."
},
"otp": {
"type": "string",
"description": "Two factor auth code to enable sending the transaction. Not necessary if using a long lived access token within the spending limit."
},
"changeAddress": {
"type": "string",
"allOf": [
{
"description": "Optional, destination of the change output"
},
{
"$ref": "#/components/parameters/address/schema"
}
]
},
"memo": {
"type": "object",
"description": "(Stellar only) Memo to use in transaction",
"properties": {
"type": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"data": {
"type": "string",
"description": "(ETH only) Optional data to pass to transaction"
},
"walletPassphrase": {
"type": "string",
"description": "Passphrase to decrypt the user key on the wallet"
},
"prv": {
"type": "string",
"description": "Optional, private key in string form, if `walletPassphrase` is not available or encrypted private key is not stored by BitGo."
}
}
}
}
}
},
"responses": {
"200": {
"description": "Transaction successfully sent",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7Bid%7D~1sweep/post/responses/200/content/application~1json/schema"
}
}
}
},
"202": {
"description": "A transaction has been created, but will require approval from admins on the wallet.",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7Bid%7D~1sweep/post/responses/200/content/application~1json/schema"
}
}
}
}
},
"x-code-samples": [
{
"lang": "javascript",
"source": "let params = {\n recipients: [{\n amount: 0.01 * 1e8,\n address: '2NFfxvXpAWjKng7enFougtvtxxCJ2hQEMo4',\n }, {\n amount: 0.01 * 1e8,\n address: '2MsMFw75RKRiMb548q6W4jrJ63jwvvDdR2w',\n }],\n walletPassphrase: 'secretpassphrase1a5df8380e0e30'\n};\nwallet.sendMany(params)\n.then(function(transaction) {\n // print transaction details\n console.dir(transaction);\n});\n"
}
]
}
},
"/api/v2/encrypt": {
"post": {
"tags": [
"Express"
],
"summary": "Encrypt messages",
"operationId": "express.encrypt",
"description": "Symmetrically encrypt an arbitrary message with provided password",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"input": {
"type": "string",
"description": "Plaintext message which should be encrypted"
},
"password": {
"type": "string",
"description": "Password which should be used to encrypt message"
}
}
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"encrypted": {
"type": "string"
}
}
}
}
}
}
}
}
},
"/api/v2/decrypt": {
"post": {
"tags": [
"Express"
],
"summary": "Decrypt messages",
"operationId": "express.decrypt",
"description": "Decrypt a ciphertext generated by encrypt route with provided password",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"input": {
"type": "string",
"description": "Ciphertext to decrypt"
},
"password": {
"type": "string",
"description": "Key which is used for decryption"
}
}
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"decrypted": {
"type": "string"
}
}
}
}
}
},
"500": {
"description": "If given decryption key does not decrypt the message"
}
}
}
},
"/api/v2/calculateminerfeeinfo": {
"post": {
"tags": [
"Express"
],
"summary": "Calculate mining fee",
"operationId": "express.calculateminerfeeinfo",
"description": "Calculate the fee and estimated size in bytes for a Bitcoin transaction",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"feeRate": {
"type": "integer",
"description": "Fee rate in base units per kB",
"example": 50000
},
"nP2shInputs": {
"type": "integer",
"description": "Number of P2SH (multi-signature) inputs",
"example": 2
},
"nP2pkhInputs": {
"type": "integer",
"description": "Number of P2PKH (single-signature) inputs",
"example": 0
},
"nP2shP2wshInputs": {
"type": "integer",
"description": "Number of P2SH_P2WSH (wrapped segwit multi-signature) inputs",
"example": 1
},
"nOutputs": {
"type": "integer",
"description": "Number of outputs",
"example": 2
}
},
"required": [
"nOutputs"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"size": {
"type": "integer",
"description": "Estimated size of the transaction in bytes",
"example": 776
},
"fee": {
"type": "integer",
"description": "Estimated fee in base units for the transaction",
"example": 38800
},
"feeRate": {
"type": "integer",
"description": "The fee rate in base units per kB used to estimate the fee for the transaction",
"example": 50000
}
}
}
}
}
}
}
}
},
"/api/v2/{coin}/keychain/local": {
"post": {
"tags": [
"Express"
],
"summary": "Create key",
"operationId": "express.keychain.local",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
}
],
"description": "Local client-side function to create a new keychain.\n\nCreating your keychains is a critical step for safely securing your Bitcoin. When generating new keychains, this API uses a random number generator that adheres to industry standards. If you provide your own seed, you must take extreme caution when creating it.\nReturns an object containing the xprv and xpub for the new chain. The created keychain is not known to the BitGo service. To use it with the BitGo service, use the ‘Store Keychain’ API call.\n\nFor security reasons, it is highly recommended that you encrypt and destroy the original xprv immediately to prevent theft.\n",
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"description": "Generated key pair",
"properties": {
"prv": {
"type": "string",
"description": "Private key",
"example": "xprv9s21ZrQH143K2Y4th5Bn8sCRCMNjVr3sm9TLj9yw9SRKxYbJdB18bpc7cZFHKKWKuWZUBATfbDVE26u7w2iUhmWD8Gsp8UkaemhLEfopC35"
},
"pub": {
"type": "string",
"description": "Public key",
"example": "xpub661MyMwAqRbcF29Mo6inW199kPDDuJmj8NNwXYPYhmxJqLvTAiKP9cvbTp6qNEkLJjEj1hcgocQyf44FwEm2qdj1NyCrE3LgCy6GhxsQg1Z"
}
}
}
}
}
}
},
"x-code-samples": [
{
"lang": "javascript",
"source": "let key = bitgo.coin('tbtc').keychains().create();\n"
}
]
}
},
"/api/v2/{coin}/wallet/generate": {
"post": {
"tags": [
"Express"
],
"summary": "Generate wallet",
"operationId": "express.wallet.generate",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
}
],
"description": "This API call creates a new wallet. Under the hood, the SDK (or BitGo Express) does the following:\n\n1. Creates the user keychain locally on the machine, and encrypts it with the provided passphrase (skipped if userKey is provided).\n2. Creates the backup keychain locally on the machine.\n3. Uploads the encrypted user keychain and public backup keychain.\n4. Creates the BitGo key (and the backup key if backupXpubProvider is set) on the service.\n5. Creates the wallet on BitGo with the 3 public keys above.\n\nⓘ Ethereum wallets can only be created under an enterprise. Pass in the id of the enterprise to associate the wallet with. Your enterprise id can be seen by clicking on the “Manage Organization” link on the enterprise dropdown. Each enterprise has a fee address which will be used to pay for transaction fees on all Ethereum wallets in that enterprise. The fee address is displayed in the dashboard of the website, please fund it before creating a wallet.\n\nⓘ You cannot generate a wallet by passing in an ERC20 token as the coin. ERC20 tokens share Ethereum wallets and it is not possible to create a wallet specific to one token. Please see Coin-Specific Implementation for details.\n\nⓘ This endpoint should be called through BitGo Express if used without the SDK, such as when using cURL.\n",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"label": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet/post/requestBody/content/application~1json/schema/properties/label"
},
"passphrase": {
"type": "string",
"description": "Passphrase to be used to encrypt the user key on the wallet"
},
"userKey": {
"type": "string",
"description": "User provided public key"
},
"backupXpub": {
"type": "string",
"description": "User provided backup public key"
},
"backupXpubProvider": {
"type": "string",
"enum": [
"keyternal"
],
"description": "Optional key recovery service to provide and store the backup key"
},
"enterprise": {
"$ref": "#/components/parameters/userId/schema",
"description": "Enterprise id. This is required for Ethereum wallets since they can only be created as part of an enterprise"
},
"disableTransactionNotifications": {
"type": "boolean",
"description": "Flag for disabling wallet transaction notifications"
},
"passcodeEncryptionCode": {
"type": "string",
"description": "The passphrase used for decrypting the encrypted user private key during wallet recovery"
},
"coldDerivationSeed": {
"type": "string",
"description": "Seed used to derive an extended user key for a cold wallet"
},
"gasPrice": {
"type": "integer",
"description": "Gas price to use when deploying an Ethereum wallet"
},
"disableKRSEmail": {
"type": "boolean",
"description": "Flag for preventing KRS from sending email after creating backup key"
}
},
"required": [
"label"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"wallet": {
"type": "object",
"properties": {
"baseCoin": {
"type": "object",
"description": "Instance of Coin"
},
"bitgo": {
"type": "object",
"description": "Instance of BitGo"
},
"_permissions": {
"type": "array",
"description": "Array of user permissions on the wallet",
"items": {
"type": "string",
"example": [
"admin",
"view",
"spend"
]
}
},
"_wallet": {
"type": "object",
"description": "Instance of wallet",
"properties": {
"id": {
"$ref": "#/components/parameters/userId/schema"
},
"coin": {
"type": "string",
"description": "Name of the blockchain the wallet is on",
"example": "tbtc"
},
"label": {
"type": "string",
"description": "Name the user assigned to the wallet",
"example": "My TBTC Wallet"
},
"m": {
"type": "integer",
"description": "Number of signatures required for the wallet to send",
"example": 2
},
"n": {
"type": "integer",
"description": "Number of signers on the wallet",
"example": 3
},
"users": {
"type": "array",
"description": "Ids of users with access to the wallet",
"items": {
"type": "object",
"properties": {
"user": {
"$ref": "#/components/parameters/userId/schema"
},
"permissions": {
"type": "array",
"description": "Array of permissions for the user",
"items": {
"type": "string",
"example": [
"admin",
"view",
"spend"
]
}
}
}
}
},
"receiveAddress": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7Bid%7D~1address/post/responses/200/content/application~1json/schema"
},
"balance": {
"type": "integer",
"description": "Wallet balance as number",
"example": 0
},
"balanceString": {
"type": "string",
"description": "Wallet balance as string",
"example": "0"
},
"confirmedBalance": {
"type": "integer",
"description": "Confirmed wallet balance as number",
"example": 0
},
"confirmedBalanceString": {
"type": "string",
"description": "Confirmed wallet balance as string",
"example": "0"
},
"spendableBalance": {
"type": "integer",
"description": "Spendable wallet balance as number",
"example": 0
},
"spendableBalanceString": {
"type": "string",
"description": "Spendable wallet balance as string",
"example": "0"
},
"keys": {
"type": "array",
"description": "Ids of wallet keys",
"items": {
"$ref": "#/components/parameters/userId/schema"
}
},
"keySignatures": {
"type": "object",
"description": "Non-user pub keys signed by the user key",
"properties": {
"backupPub": {
"type": "string",
"description": "Signature for the backup pub",
"example": "1fe81d0c91457d89993b01475bfb9e5809067ae046926faeab6e63beea009d8dd460387e0c3843034570798a9c2bcc1dbbea2988ee5a36979e0bbe6e02f7840af2"
},
"bitgoPub": {
"type": "string",
"description": "Signature for the BitGo pub",
"example": "209d0e9a6d4352b66fae0a35ce62c1059bcc4db9e2883abc4f1b3d20481c5cebb7299c581efd9e0151abaf2496da7c6d75d276de36ed3de37c94e9cc5a2ea77e59"
}
}
},
"deleted": {
"type": "boolean",
"description": "Flag for marking wallet as deleted",
"example": false
},
"isCold": {
"type": "boolean",
"description": "Flag for identifying cold wallets",
"example": false
},
"freeze": {
"type": "object",
"description": "Freeze state (used to stop the wallet from spending)",
"properties": {
"time": {
"type": "string",
"format": "date-time",
"description": "Timestamp the wallet gets frozen"
},
"expires": {
"type": "string",
"format": "date-time",
"description": "Timestamp the wallet can spend"
}
},
"example": {}
},
"disableTransactionNotifications": {
"type": "boolean",
"description": "Flag for disabling wallet transaction notifications",
"example": false
},
"tags": {
"type": "array",
"description": "Tags set on the wallet",
"items": {
"$ref": "#/components/parameters/userId/schema"
}
},
"admin": {
"type": "object",
"description": "Admin data (wallet policies)",
"example": {}
},
"approvalsRequired": {
"type": "integer",
"description": "Number of admin approvals required for an action to fire",
"example": 1
},
"pendingApprovals": {
"type": "array",
"description": "Pending approvals on the wallet",
"items": {
"$ref": "#/paths/~1api~1v2~1pendingApprovals~1%7Bid%7D/put/responses/200/content/application~1json/schema"
},
"example": []
},
"allowBackupKeySigning": {
"type": "boolean",
"description": "Flag for allowing signing with backup key",
"example": false
},
"coinSpecific": {
"type": "object",
"description": "Coin-specific data"
}
}
}
}
},
"userKeychain": {
"type": "object",
"description": "User keychain",
"properties": {
"id": {
"$ref": "#/components/parameters/userId/schema"
},
"encryptedPrv": {
"type": "string",
"description": "User private key encrypted with the user passphrase",
"example": "{\"iv\":\"TEd5eouui6hKashuVi5WHQ==\",\"v\":1,\"iter\":10000,\"ks\":256,\"ts\":64,\"mode\":\"ccm\",\"adata\":\"\",\"cipher\":\"aes\",\"salt\":\"dHu4PWoX2M8=\",\"ct\":\"fYr9Y/6kU40AosONkV0xi+fWsyhpYSew0L2YKH/qEZjOlxeDjpC2aTJ0Yc/KdmXheUGolcAxGSx93ykN21Zim1DGc/UGa25IUA/3ARgX7gBsYnYEy5e5Ol0YZYb9pa7KFeaDZSLMXrxxoahg5zL4AJsUx90Pwcg=\"}"
},
"prv": {
"type": "string",
"description": "User private key",
"example": "xprv9s21ZrQH143K3e1981rUcbKjJ9G57SDCDZ9HY4Sqhx5ZqMoyK1j49kAf1vuM1G9nhRr6kzqbUQb3gj5zuzrsvNRQ84tYf32EcyapRgBNpp4"
},
"pub": {
"type": "string",
"description": "User public key",
"example": "xpub661MyMwAqRbcG85cE3PUyjGTrB6ZWtw3an4tLSrTGHcYiA97rZ3JhYV8sFKoEVyQCV9YHa6GLmpvnFGMmbbWt5yg6QQY4wKnGjjMGJbBkHD"
},
"users": {
"type": "array",
"description": "Users that own the keychain",
"items": {
"$ref": "#/components/parameters/userId/schema"
}
},
"ethAddress": {
"type": "string",
"description": "Ethereum address corresponding to this keychain",
"example": "0xf5b7cca8621691f9dde304cb7128b6bb3d409363"
}
}
},
"backupKeychain": {
"type": "object",
"description": "Backup keychain",
"properties": {
"id": {
"$ref": "#/components/parameters/userId/schema"
},
"prv": {
"type": "string",
"description": "Backup private key",
"example": "xprv9s21ZrQH143K47iEnAFZRJz36E5ZxuEDBJETFYxJTsTVxuPc9z7oGWADUK6icX5P3ruoe244yxMt9uZ2LjWhddvnJJ4zB7zK93qBtxYrmN6"
},
"pub": {
"type": "string",
"description": "Backup public key",
"example": "xpub661MyMwAqRbcGbnhtBnZnSvmeFv4NMx4YXA43wMv2CzUqhikhXS3pJUhKajD9JYPrJDXmRn9ab98S5nuc2E8kURwvZhHC3QPLZRE9cxv4yn"
},
"source": {
"type": "string",
"description": "Party that created the key",
"example": "backup"
},
"users": {
"type": "array",
"description": "Users that own the keychain",
"items": {
"$ref": "#/components/parameters/userId/schema"
}
},
"ethAddress": {
"type": "string",
"description": "Ethereum address corresponding to this keychain",
"example": "0xf5b7cca8621691f9dde304cb7128b6bb3d409363"
}
}
},
"bitgoKeychain": {
"type": "object",
"description": "BitGo keychain",
"properties": {
"id": {
"$ref": "#/components/parameters/userId/schema"
},
"pub": {
"type": "string",
"description": "BitGo public key",
"example": "xpub661MyMwAqRbcGhjLMsL7LD2a1M4Uh6ttqCBFahhQTzoX4dNGZuh858tBAsXYNQJzxgcQ6oEyPM3VcRyR141R5EpqyCpcaiP4qvbo8Hx7Ea3"
},
"isBitGo": {
"type": "boolean",
"description": "Flag for identifying keychain as created by BitGo",
"example": true
},
"users": {
"type": "array",
"description": "Users that own the keychain",
"items": {
"$ref": "#/components/parameters/userId/schema"
}
},
"ethAddress": {
"type": "string",
"description": "Ethereum address corresponding to this keychain",
"example": "0xa487900d0de75107b1cc7ade0e2662980e5ce940"
}
}
}
}
}
}
}
}
},
"x-code-samples": [
{
"lang": "javascript",
"source": "bitgo.coin('tltc').wallets()\n.generateWallet({ label: 'My Test Wallet', passphrase: 'secretpassphrase1a5df8380e0e30' })\n.then(function(wallet) {\n // print the new wallet\n console.dir(wallet);\n});\n"
}
]
}
},
"/api/v2/{coin}/wallet/{id}/share": {
"post": {
"tags": [
"Express"
],
"summary": "Share wallet",
"operationId": "express.wallet.share",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
},
{
"$ref": "#/components/parameters/pathId"
}
],
"description": "Share wallet with an existing BitGo user",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"email": {
"type": "string",
"description": "Email address of the user being invited",
"example": "foo@bar.com"
},
"permissions": {
"type": "string",
"allOf": [
{
"description": "Comma-separated list of permissions which are granted by this share"
},
{
"type": "string",
"enum": [
"admin",
"view",
"spend"
]
}
],
"example": "spend,view"
},
"walletPassphrase": {
"type": "string",
"description": "Wallet passphrase of the user sharing the wallet"
},
"message": {
"type": "string",
"description": "User readable message to display to the share recipient"
},
"reshare": {
"type": "boolean",
"description": "Flag for reinviting a user to the wallet <br/> This is required if the invitee has already been invited to the wallet, but has changed their password and needs a new invite"
},
"skipKeychain": {
"type": "boolean",
"description": "Skips using a shared key (for when the wallet is shared without spend permission)"
},
"disableEmail": {
"type": "boolean",
"description": "Flag for disabling invite notification email"
}
},
"required": [
"email",
"permissions"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"description": "Wallet share object",
"properties": {
"id": {
"allOf": [
{
"$ref": "#/components/parameters/userId/schema"
},
{
"description": "Wallet share id"
}
]
},
"coin": {
"allOf": [
{
"$ref": "#/components/parameters/coin/schema"
},
{
"description": "Coin of the wallet"
}
]
},
"wallet": {
"allOf": [
{
"$ref": "#/components/parameters/userId/schema"
},
{
"description": "Wallet id"
}
]
},
"walletLabel": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet/post/requestBody/content/application~1json/schema/properties/label"
},
"fromUser": {
"allOf": [
{
"$ref": "#/components/parameters/userId/schema"
},
{
"description": "Id of the user sharing the wallet"
}
]
},
"toUser": {
"allOf": [
{
"$ref": "#/components/parameters/userId/schema"
},
{
"description": "Id of the user receiving the share"
}
]
},
"permissions": {
"type": "string",
"allOf": [
{
"description": "Comma-separated list of permissions which are granted by this share"
},
{
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7Bid%7D~1share/post/requestBody/content/application~1json/schema/properties/permissions/allOf/1"
}
],
"example": "spend,view"
},
"message": {
"type": "string",
"description": "Message for the user receiving the share"
},
"state": {
"type": "string",
"allOf": [
{
"description": "State of the share"
},
{
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1walletshare~1%7BshareId%7D/post/requestBody/content/application~1json/schema/properties/state"
}
]
},
"enterprise": {
"allOf": [
{
"$ref": "#/components/parameters/userId/schema"
},
{
"description": "If the wallet belongs to an enterprise, the id of that enterprise"
}
]
},
"pendingApprovalId": {
"allOf": [
{
"$ref": "#/components/parameters/userId/schema"
},
{
"description": "If the share generated a pending approval, the id of that pending approval"
}
]
},
"keychain": {
"type": "object",
"description": "Key passed to the receiving user, included if the wallet was shared with spend permission",
"properties": {
"pub": {
"description": "Root public key of the user sharing the wallet",
"type": "string"
},
"encryptedPrv": {
"description": "Private key of the user sharing the wallet encrypted under their wallet passphrase",
"type": "string"
},
"fromPubKey": {
"description": "Derived public key of the user sharing the wallet",
"type": "string"
},
"toPubKey": {
"description": "Derived public key of the user receiving the share",
"type": "string"
},
"path": {
"description": "BIP32 HD path of the derived public keys (fromPubKey and toPubKey)",
"example": "m/1234/1/1",
"type": "string"
}
}
}
}
}
}
}
}
}
}
},
"/api/v2/{coin}/walletshare/{id}/acceptshare": {
"post": {
"tags": [
"Express"
],
"summary": "Accept wallet share",
"operationId": "express.wallet.acceptshare",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
},
{
"$ref": "#/components/parameters/pathId"
}
],
"description": "Accept a wallet share, adding the wallet to the user's list",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"userPassword": {
"type": "string",
"description": "User's password to decrypt the shared wallet (required if the wallet was shared with spend permission)"
},
"newWalletPassphrase": {
"type": "string",
"description": "New wallet passphrase for saving the shared wallet private key If not provided and the wallet was shared with spend permission, then the userPassword is used"
},
"overrideEncryptedPrv": {
"type": "string",
"description": "Encrypted private key received out-of-band"
}
}
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"state": {
"type": "string",
"allOf": [
{
"description": "State of the share"
},
{
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1walletshare~1%7BshareId%7D/post/requestBody/content/application~1json/schema/properties/state"
}
]
},
"changed": {
"type": "boolean",
"description": "Indicates if the share changed"
}
}
}
}
}
}
}
}
},
"/api/v2/{coin}/signtx": {
"post": {
"tags": [
"Express"
],
"summary": "Sign transaction",
"operationId": "express.signtx",
"description": "This route is for users who would like to maintain their own keys, or otherwise would not like BitGo to decrypt their key, and instead provide it in the clear themselves",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"prv": {
"type": "string",
"description": "user private key",
"example": "xprv9s21ZrQH143K3xQwj4yx3fHjDieEdqFDweBvFxn28qGvfQGvweUWuUuDRpepDu6opq3jiWHU9h3yYTKk5vvu4ykRuGA4i4Kz1vmFMPLTsoC"
},
"txPrebuild": {
"type": "object",
"properties": {
"wallet": {
"$ref": "#/components/parameters/userId/schema"
},
"txHex": {
"type": "string",
"description": "Serialized transaction hex"
},
"txBase64": {
"type": "string",
"description": "Serialized transaction base64 (applies to XLM only) The request must include this or a txHex"
},
"txInfo": {
"oneOf": [
{
"type": "object",
"description": "txInfo (UTXO)",
"properties": {
"changeAddresses": {
"type": "array",
"items": {
"$ref": "#/components/parameters/address/schema"
}
},
"nOutputs": {
"type": "integer",
"description": "Number of outputs",
"example": 2
},
"nP2SHInputs": {
"type": "integer",
"example": 0
},
"nSegwitInputs": {
"type": "integer",
"example": 1
},
"unspents": {
"type": "array",
"items": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7Bid%7D~1unspents/get/responses/200/content/application~1json/schema/properties/unspents/items"
}
},
"walletAddressDetails": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7Bid%7D~1address/post/responses/200/content/application~1json/schema"
}
}
},
{
"type": "object",
"description": "txInfo (XLM)",
"properties": {
"fee": {
"type": "integer",
"description": "Network fee",
"example": 100
},
"operations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"amount": {
"type": "string",
"description": "Amount in Lumens as string",
"example": "10.5"
},
"asset": {
"type": "object",
"properties": {
"code": {
"type": "string",
"example": "XLM"
}
}
},
"destination": {
"type": "string",
"example": "GCNFRU774FPHLV3HAB6CR54XJYFYITOLU6KS2J5BNCLDPYN7I3DOMIPY"
},
"type": {
"type": "string",
"enum": [
"payment",
"createAccount"
],
"example": "payment"
}
}
}
},
"sequence": {
"type": "string",
"example": "35995558267060226"
},
"source": {
"type": "string",
"example": "GBSGOXQNPULNPBX7XTHXP2GDBOZMHPIZOOA7CQXYTLHYKF5J2JDCF7LT"
}
}
}
]
},
"feeInfo": {
"type": "object",
"properties": {
"size": {
"type": "integer",
"description": "Estimated size of the transaction in bytes",
"example": 776
},
"fee": {
"type": "integer",
"description": "Estimated fee in base units for the transaction",
"example": 38800
},
"feeRate": {
"type": "integer",
"description": "The fee rate in base units per kB used to estimate the fee for the transaction",
"example": 50000
},
"payGoFee": {
"type": "integer",
"description": "BitGo fee of the transaction (in base units)",
"example": 0
},
"payGoFeeString": {
"type": "integer",
"description": "BitGo fee of the transaction (in base units) represented as a String",
"example": "0"
}
}
}
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"txInfo": {
"oneOf": [
{
"type": "object",
"properties": {
"txHex": {
"type": "string",
"description": "Serialized transaction hex",
"example": "01000000000101d58f82d996dd872012675adadf4606734906b25a413f6e2ee535c0c10aef96020000000000ffffffff028de888000000000017a914c91aa24f65827eecec775037d886f2952b73cbe48740420f000000000017a9149304d18497b9bfe9532778a0f06d9fff3b3befaf870500473044022023d7210ba6d8bbd7a28b8af226f40f7235caab79156f93f9c9969fc459ea7f73022050fbdca788fba3de686b66b3501853695ff9d6f375867470207d233b099576e001000069522103d4788cda52f91c1f6c82eb91491ca76108c9c5f0839bc4f02eccc55fedb3311c210391bcef9dcc89570a79ba3c7514e65cd48e766a8868eca2769fa9242fdcc796662102ef3c5ebac4b54df70dea1bb2655126368be10ca0462382fcb730e55cddd2dd6a53aec8b11400"
}
}
},
{
"type": "object",
"properties": {
"halfSigned": {
"type": "object",
"properties": {
"txBase64": {
"type": "string",
"description": "Serialized transaction base64 (applies to XLM only)",
"example": "AAAAAGRnXg19FteG/7zPd+jDC7LDvRlzgfFC+JrPhRep0kYiAAAAZAB/4cUAAAACAAAAAAAAAAAAAAABAAAAAQAAAABkZ14NfRbXhv+8z3fowwuyw70Zc4HxQviaz4UXqdJGIgAAAAEAAAAAmljT/+FedddnAHwo95dOC4RNy6eVLSehaJY34b9GxuYAAAAAAAAAAAehIAAAAAAAAAAAAUrgwAkAAABAOExcvVJIUJv9HuVfbV0y7lRPRARv4wDtcdhHG7QN40h5wQ2uwPF52OGQ8KY+66a1A/8lNKB75sgj2xj44s8lDQ=="
}
}
}
}
}
]
}
}
}
}
}
}
},
"x-code-samples": [
{
"lang": "javascript",
"source": "// Before signing we need to get a half-built transaction\nconst buildParams = { recipients: [{ amount: 0.01 * 1e8, address: '2NFfxvXpAWjKng7enFougtvtxxCJ2hQEMo4' }] };\nbitgo.coin('tbtc').wallets().get({ id: '5a9d9f8e1223833c4df673a07cf8bc5f' }).then(function (wallet) {\n wallet.prebuildTransaction(buildParams, function(err, result) {\n\n bitgo.coin('tbtc').signTransaction({ txPrebuild: result, prv: '<your xrpv>' })\n .then(function(transaction) {\n // print half-signed transaction hex\n console.dir(transaction);\n });\n });\n});\n"
}
]
}
},
"/api/v2/{coin}/wallet/{id}/signtx": {
"post": {
"tags": [
"Express"
],
"summary": "Sign wallet transaction",
"operationId": "express.wallet.signtx",
"description": "This route is for users who want to use the normal encrypted private user key to sign, and would like BitGo to handle decryption of the private key for them",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
},
{
"$ref": "#/components/parameters/pathId"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"keychain": {
"type": "object",
"properties": {
"encryptedPrv": {
"type": "string",
"description": "Encrypted user private key"
}
}
},
"prv": {
"type": "string",
"description": "User private key <br/> The request must include this or a keychain",
"example": "xprv9s21ZrQH143K3xQwj4yx3fHjDieEdqFDweBvFxn28qGvfQGvweUWuUuDRpepDu6opq3jiWHU9h3yYTKk5vvu4ykRuGA4i4Kz1vmFMPLTsoC"
},
"txPrebuild": {
"type": "object",
"properties": {
"wallet": {
"$ref": "#/components/parameters/userId/schema"
},
"txHex": {
"type": "string",
"description": "Serialized transaction hex"
},
"txBase64": {
"type": "string",
"description": "Serialized transaction base64 (applies to XLM only). <br/> The request must include this or a txHex"
},
"txInfo": {
"oneOf": [
{
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1signtx/post/requestBody/content/application~1json/schema/properties/txPrebuild/properties/txInfo/oneOf/0"
},
{
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1signtx/post/requestBody/content/application~1json/schema/properties/txPrebuild/properties/txInfo/oneOf/1"
}
]
},
"feeInfo": {
"oneOf": [
{
"type": "object",
"description": "feeInfo (UTXO)",
"properties": {
"size": {
"type": "integer",
"description": "Estimated size of the transaction in bytes",
"example": 776
},
"fee": {
"type": "integer",
"description": "Estimated fee in base unit for the transaction",
"example": 38800
},
"feeRate": {
"type": "integer",
"description": "The fee rate in base uint per kB used to estimate the fee for the transaction",
"example": 50000
},
"payGoFee": {
"type": "integer",
"description": "BitGo fee of the transaction (in base units)",
"example": 0
},
"payGoFeeString": {
"type": "integer",
"description": "BitGo fee of the transaction (in base units) represented as a String",
"example": "0"
}
}
},
{
"type": "object",
"description": "feeInfo (XLM)",
"properties": {
"height": {
"type": "integer",
"description": "Height of the ledger that provided the values",
"example": 123456
},
"xlmBaseFee": {
"type": "string",
"description": "Base network fee per transaction operation",
"example": "100"
},
"xlmBaseReserve": {
"type": "string",
"description": "Base reserve used to calculate the minimum balance required by the network",
"example": "5000000"
}
}
}
]
}
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1signtx/post/responses/200/content/application~1json/schema"
}
}
}
}
},
"x-code-samples": [
{
"lang": "javascript",
"source": "let params = {\n \"txPrebuild\": {\n \"txHex\": \"010000000179b0b5ad6641de8fed13270395e52515236c922d1dd5bee3a9dae68c3cbbf57d0100000000ffffffff0240420f000000000017a914f600974688ccdf5e72ce3f2b187afabbf4f1d3ec878e7835000000000017a9140c0a513cb9d8e46113c57aa46ae42d1bad29063d8700000000\",\n \"txInfo\": {\n \"nP2SHInputs\": 1,\n \"nSegwitInputs\": 0,\n \"nOutputs\": 2,\n \"unspents\": [\n {\n \"chain\": 1,\n \"index\": 10,\n \"redeemScript\": \"52210208906f13de98b88bc9f83886c39a1555ada816b12de6f029626af2ef9413708b2102bca01320026604530fc47068ce015b39b91bd72d8964b0c5023697645b1441ab210336d8e968990c8a5b2bad83a237c37957ce70586ed507b155941ea28ec953860153ae\",\n \"id\": \"7df5bb3c8ce6daa9e3bed51d2d926c231525e595032713ed8fde4166adb5b079:1\",\n \"address\": \"2MvevrYxML8NkRng4avXz7oMCgs5qxR7Mef\",\n \"value\": 4508000\n }\n ],\n \"changeAddresses\": [\n \"2MtLtTSsC98dF4zriFGvCfmce3A17Zz1McK\"\n ]\n },\n \"feeInfo\": {\n \"size\": 373,\n \"fee\": 3730,\n \"feeRate\": 10000,\n \"payGoFee\": 0,\n \"payGoFeeString\": \"0\"\n }\n },\n \"prv\": \"xprvmysecretprivatekey\"\n};\nwallet.signTransaction(params)\n.then(function(transaction) {\n // print half-signed transaction hex\n console.dir(transaction);\n});\n"
}
]
}
},
"/api/v2/{coin}/wallet/{id}/recovertoken": {
"post": {
"tags": [
"Express"
],
"summary": "Recover ETH token",
"operationId": "express.wallet.recovertoken",
"description": "Recover an unsupported Ethereum token from a BitGo multisig wallet",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
},
{
"$ref": "#/components/parameters/pathId"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"tokenContractAddress": {
"type": "string",
"description": "Contract address of the unsupported token"
},
"recipient": {
"type": "string",
"description": "Destination address recovered tokens should be sent to"
},
"walletPassphrase": {
"type": "string",
"description": "Wallet passphrase"
},
"prv": {
"type": "string",
"description": "User private key"
}
}
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"halfSigned": {
"type": "object",
"properties": {
"contractSequenceId": {
"type": "integer",
"example": 1101
},
"expireTime": {
"type": "integer",
"example": 1550088020
},
"gasLimit": {
"type": "integer",
"example": 500000
},
"gasPrice": {
"type": "integer",
"example": 20000000000
},
"operationHash": {
"type": "string",
"example": 9.44792020725999e+76
},
"recipient": {
"type": "object",
"properties": {
"address": {
"type": "string",
"example": 4.7261295088313645e+47
},
"amount": {
"type": "string",
"example": "2400"
}
}
},
"signature": {
"type": "string",
"example": 1.9519588812712557e+156
},
"tokenContractAddress": {
"type": "string",
"example": 3.8941146273864216e+46
},
"walletId": {
"$ref": "#/components/parameters/userId/schema"
}
}
}
}
}
}
}
}
}
}
},
"/api/v2/{coin}/wallet/{id}/consolidateunspents": {
"post": {
"tags": [
"Express"
],
"summary": "Consolidate unspents",
"operationId": "express.wallet.consolidateunspents",
"description": "Consolidate unspents on a wallet",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
},
{
"$ref": "#/components/parameters/pathId"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"walletPassphrase": {
"type": "string",
"description": "Passphrase to decrypt the user key on the wallet"
},
"limit": {
"type": "integer",
"description": "Number of unspents retrieved per call"
},
"minValue": {
"type": "integer",
"description": "Minimum value of unspents to use in base units per kB"
},
"maxValue": {
"type": "integer",
"description": "Maximum value of unspents to use in base units per kB"
},
"minHeight": {
"type": "integer",
"description": "Minimum height of unspents on the block chain to use"
},
"numUnspentsToMake": {
"type": "integer",
"description": "Number of new unspents to make"
},
"targetUnspentPoolSize": {
"type": "integer",
"description": "Number of unspents wanted after the consolidation of valid unspents"
},
"minConfirms": {
"type": "integer",
"description": "Minimum confirmation threshold for inputs"
},
"enforceMinConfirmsForChange": {
"type": "boolean",
"description": "Flag for enforcing minConfirms for change inputs"
},
"feeRate": {
"type": "integer",
"description": "Fee rate in base units per kB to use in the consolodation"
},
"maxFeeRate": {
"type": "integer",
"description": "Upper limit for feeRate in base units per kB"
},
"maxFeePercentage": {
"type": "integer",
"description": "Maximum relative portion that can be spent towards fees"
},
"feeTxConfirmTarget": {
"type": "integer",
"description": "Number of blocks to wait to confirm the transaction"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Consolidation transaction successfully sent",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7Bid%7D~1sweep/post/responses/200/content/application~1json/schema"
}
}
}
}
},
"x-code-samples": [
{
"lang": "javascript",
"source": "let params = {\n numUnspentsToMake: 2,\n minValue: 100000,\n maxValue: 47000000,\n minHeight: 1,\n minConfirms: 2,\n limit: 100,\n walletPassphrase: 'secretpassphrase1a5df8380e0e30'\n};\nwallet.consolidateUnspents(params)\n.then(function(transactionInfo) {\n // print transaction info\n console.dir(transactionInfo);\n});\n"
}
]
}
},
"/api/v2/{coin}/wallet/{id}/fanoutunspents": {
"post": {
"tags": [
"Express"
],
"summary": "Fan out unspents",
"operationId": "express.wallet.fanoutunspents",
"description": "Fan out unspents on a wallet",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
},
{
"$ref": "#/components/parameters/pathId"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"walletPassphrase": {
"type": "string",
"description": "Passphrase to decrypt the user key on the wallet"
},
"xprv": {
"type": "string",
"description": "Private key in string form, if walletPassphrase is not available"
},
"minValue": {
"type": "integer",
"description": "Minimum value of unspents to use in base units per kB"
},
"maxValue": {
"type": "integer",
"description": "Maximum value of unspents to use in base units per kB"
},
"minHeight": {
"type": "integer",
"description": "Minimum height of unspents on the block chain to use"
},
"minConfirms": {
"type": "integer",
"description": "Minimum confirmation threshold for inputs"
},
"maxFeePercentage": {
"type": "integer",
"description": "Maximum relative portion that can be spent towards fees"
},
"feeTxConfirmTarget": {
"type": "integer",
"description": "Number of blocks to wait to confirm the transaction"
},
"feeRate": {
"type": "integer",
"description": "Fee rate in base units per kB to use in the consolodation"
},
"maxFeeRate": {
"type": "integer",
"description": "Upper limit for feeRate in base units per KB"
},
"maxNumInputsToUse": {
"type": "integer",
"description": "Maximum number of unspents to use in the transaction"
},
"numUnspentsToMake": {
"type": "integer",
"description": "Number of new unspents to make"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Fanout transaction successfully sent",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7Bid%7D~1sweep/post/responses/200/content/application~1json/schema"
}
}
}
}
},
"x-code-samples": [
{
"lang": "javascript",
"source": "let params = {\n maxNumInputsToUse: 20,\n numUnspentsToMake: 200,\n minValue: 100000,\n maxValue: 47000000,\n minHeight: 1,\n minConfirms: 2,\n walletPassphrase: 'secretpassphrase1a5df8380e0e30'\n};\nwallet.fanoutUnspents(params)\n.then(function(transactionInfo) {\n // print transaction info\n console.dir(transactionInfo);\n});\n"
}
]
}
},
"/api/v2/{coin}/wallet/{id}/sweep": {
"post": {
"tags": [
"Express"
],
"summary": "Sweep funds",
"operationId": "express.wallet.sweep",
"description": "This call attempts to move all of the funds of the wallet into the address provided.",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
},
{
"$ref": "#/components/parameters/pathId"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"address": {
"type": "string",
"description": "The destination address for the sweep transaction"
},
"walletPassphrase": {
"type": "string",
"description": "Passphrase to decrypt the user key on the wallet"
},
"xprv": {
"type": "string",
"description": "Private key in string form, if walletPassphrase is not available"
},
"otp": {
"type": "string",
"description": "Two factor auth code to enable sending the transaction"
},
"feeTxConfirmTarget": {
"type": "string",
"description": "Number of blocks to wait to confirm the transaction"
},
"feeRate": {
"type": "string",
"description": "Fee rate in base units per kB"
},
"maxFeeRate": {
"type": "string",
"description": "Upper limit for feeRate in base units per kB"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Sweep transaction successfully sent",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"transfer": {
"allOf": [
{
"description": "New transfer"
},
{
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7BwalletId%7D~1transfer~1%7BtransferId%7D/get/responses/206/content/application~1json/schema"
}
]
},
"txid": {
"type": "string",
"description": "Unique transaction identifier"
},
"tx": {
"type": "string",
"description": "Encoded transaction hex (or base64 for XLM)"
},
"status": {
"type": "string",
"description": "Transfer status",
"enum": [
"signed",
"signed (suppressed)",
"pendingApproval"
]
}
}
}
}
}
}
},
"x-code-samples": [
{
"lang": "javascript",
"source": "let params = {\n address: '2MwvR24yqym2CgHMp7zwvdeqBa4F8KTqunS',\n walletPassphrase: 'secretpassphrase1a5df8380e0e30'\n};\nwallet.sweep(params)\n.then(function(transactionInfo) {\n // print transaction info\n console.dir(transactionInfo);\n});\n"
}
]
}
},
"/api/v2/{coin}/wallet/{walletId}/acceleratetx": {
"post": {
"tags": [
"Express"
],
"summary": "Accelerate Transaction",
"operationId": "express.wallet.acceleratetx",
"description": "Send a child-pays-for-parent (CPFP) transaction to accelerate the target unconfirmed transactions.\n\n**Background**:\nIn Bitcoin, a transaction can only be included in a block when all its inputs are confirmed.\nThis requirement can be used to increase the effective fee rate of a stuck low-fee transaction.\nOne of the stuck transaction's outputs is spent in a child transaction with a much higher fee.\nMiners include the transactions with the highest fees first to maximize their revenue,\nbut the high-fee child transaction can only be included once the parent transaction is confirmed.\nThe miners are therefore incentived to include both the parent and the child transaction together in a block.\nA child-pays-for-parent transaction can be created by a recipient of the transaction or by the sender if the\ntarget transaction has a change output.\n\n**Note**:\nIf a target transaction depends on other unconfirmed transactions, this route will add sufficient fees\nto elevate the entire transaction ancestry's effective fee rate to the specified cpfpFeeRate.\n",
"parameters": [
{
"$ref": "#/components/parameters/pathUtxoCoin"
},
{
"$ref": "#/components/parameters/pathWalletId"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"cpfpTxIds": {
"type": "array",
"description": "txids of the transactions to bump\n\n**Notes**:\nEach target unconfirmed transaction must be sending funds to the calling wallet.\nAccepts only a single txid at this stage.\n",
"items": {
"$ref": "#/components/parameters/pathTransferId/schema/oneOf/1"
}
},
"cpfpFeeRate": {
"type": "integer",
"description": "Desired effective feerate of the bumped transactions and the CPFP transaction in satoshi per kilobyte"
},
"maxFee": {
"type": "integer",
"description": "Maximum allowed fee for the CPFP transaction in satoshi\n\n**Note**:\nA CPFP transaction accelerates the target transactions and all of the unconfirmed transactions the target transactions depends on.\nAs it can be difficult to discern the complete transaction ancestry at times, we recommend limiting the total fee for each CPFP attempt as a safety net to prevent CPFP transactions that exceed your cost expectations.\n"
}
}
}
}
}
},
"responses": {
"200": {
"description": "CPFP transaction successfully sent",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7Bid%7D~1sweep/post/responses/200/content/application~1json/schema"
}
}
}
}
}
}
},
"/api/v2/{coin}/canonicaladdress": {
"post": {
"tags": [
"Express"
],
"summary": "Canonicalize address",
"operationId": "express.canonicaladdress",
"description": "Canonicalize an address. Supported by LTC, BCH, BSV",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"address": {
"type": "string",
"description": "Address to canonicalize"
},
"version": {
"type": "string",
"description": "Version of the desired address (defaults to 'base58')",
"enum": [
"base58",
"bech32"
]
}
}
}
}
}
},
"responses": {
"200": {
"description": "Converted address",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/parameters/address/schema"
}
}
}
}
}
}
},
"/api/v2/{coin}/verifyaddress": {
"post": {
"tags": [
"Express"
],
"summary": "Verify address",
"operationId": "express.verifycoinaddress",
"description": "Verify address for a given coin",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"address": {
"type": "string",
"allOf": [
{
"description": "Address which should be verified for correct format"
},
{
"$ref": "#/components/parameters/address/schema"
}
]
}
}
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"isValid": {
"type": "boolean"
}
}
}
}
}
}
}
}
},
"/api/v2/{coin}/pendingapprovals/{id}": {
"put": {
"tags": [
"Express"
],
"summary": "Resolve pending approval",
"operationId": "express.pendingapprovals",
"description": "Accept or reject a pending approval",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
},
{
"$ref": "#/components/parameters/pathId"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"state": {
"type": "string",
"description": "New state for the pending approval",
"enum": [
"approved",
"rejected"
]
},
"walletPassphrase": {
"type": "string",
"description": "Passphrase to decrypt the user key on the wallet"
},
"xprv": {
"type": "string",
"description": "Private key in string form, if walletPassphrase is not available"
},
"otp": {
"$ref": "#/paths/~1api~1v2~1user~1login/post/requestBody/content/application~1json/schema/properties/otp"
}
}
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1pendingApprovals~1%7Bid%7D/put/responses/200/content/application~1json/schema"
}
}
}
}
}
}
},
"/api/v2/internal/{coin}/transfer": {
"get": {
"tags": [
"Internal"
],
"summary": "Internal list transfers",
"description": "Returns deposits and withdrawals for a wallet",
"operationId": "v2.internal.listtransfers",
"parameters": [
{
"$ref": "#/components/parameters/pathCoin"
},
{
"$ref": "#/components/parameters/allTokens"
},
{
"$ref": "#/components/parameters/prevId"
},
{
"$ref": "#/components/parameters/state"
},
{
"$ref": "#/components/parameters/searchLabel"
},
{
"$ref": "#/components/parameters/limit"
},
{
"$ref": "#/components/parameters/type"
},
{
"name": "valueGte",
"in": "query",
"description": "Return transfers with a `value` that is greater than or equal to the given number",
"schema": {
"type": "integer"
}
},
{
"name": "valueLt",
"in": "query",
"description": "Return transfers with a `value` that is less than the given number",
"schema": {
"type": "integer"
}
},
{
"name": "dateGte",
"in": "query",
"description": "Return transfers with a `date` that is greater than or equal to the given timestamp",
"schema": {
"type": "string",
"format": "date-time"
}
},
{
"name": "dateLt",
"in": "query",
"description": "Return transfers with a `date` that is less than the given timestamp",
"schema": {
"type": "string",
"format": "date-time"
}
},
{
"name": "address",
"in": "query",
"description": "Return transfers with elements in `entries` that have an `address` field set to this value",
"schema": {
"type": "array",
"items": {
"$ref": "#/components/parameters/address/schema"
}
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"transfers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"coin": {
"$ref": "#/components/parameters/coin/schema"
},
"id": {
"$ref": "#/components/parameters/userId/schema"
},
"wallet": {
"$ref": "#/components/parameters/userId/schema"
},
"txid": {
"type": "string"
},
"height": {
"type": "integer",
"description": "The height of the block this Transfer was confirmed in (999999999 if unconfirmed)"
},
"date": {
"type": "string",
"format": "date-time",
"description": "The date this Transfer was last updated"
},
"type": {
"type": "string",
"description": "Defines whether or not this Transfer was sent or received by the user",
"enum": [
"send",
"receive"
]
},
"value": {
"type": "integer",
"description": "The total value (in base units) sent by this Transfer (may be approximate for ETH and other coins where amounts in base units can exceed 2^53 - 1)"
},
"valueString": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7Bid%7D~1unspents/get/responses/200/content/application~1json/schema/properties/unspents/items/properties/valueString",
"description": "The total value (in base units) sent by this Transfer represented as a String"
},
"feeString": {
"type": "string",
"description": "The Transfer's fee (in base units) represented as a String"
},
"payGoFee": {
"type": "integer",
"description": "The Transfer's BitGo fee (in base units)"
},
"payGoFeeString": {
"type": "string",
"description": "The Transfer's BitGo fee (in base units) represented as a String"
},
"usdRate": {
"type": "number",
"description": "The USD price at the time this Transfer was created"
},
"state": {
"$ref": "#/components/parameters/state/schema"
},
"tags": {
"type": "array",
"description": "The tags to be used on this Transfer (used in Policies)",
"items": {
"$ref": "#/components/parameters/userId/schema"
}
},
"history": {
"type": "array",
"description": "An audit log of events that have happened to the Transfer during its lifecycle",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"format": "date-time",
"description": "The date of this history object"
},
"user": {
"$ref": "#/components/parameters/userId/schema"
},
"action": {
"type": "string",
"enum": [
"created",
"signed",
"unconfirmed",
"confirmed",
"approved",
"commented",
"removed",
"failed",
"rejected"
]
},
"comment": {
"type": "string",
"description": "If this history object is of action `commented`, this is the comment from the user"
}
}
}
},
"comment": {
"type": "string",
"description": "A comment from the user"
},
"vSize": {
"type": "integer",
"description": "The size of the transaction"
},
"sequenceId": {
"type": "string",
"description": "A user-supplied String for Transfers sent from the wallet which they can later use to ID the Transfer"
},
"entries": {
"type": "array",
"description": "An array of objects describing the change in address balances made as a result of this Transfer",
"items": {
"type": "object",
"properties": {
"address": {
"type": "string",
"description": "An address affected by this Transfer",
"example": "2NAUwNgXaoFj2VVnSEvNLGuez8CfdU2UCMZ"
},
"wallet": {
"$ref": "#/components/parameters/userId/schema"
},
"value": {
"type": "integer",
"description": "The change (in base units) in the address's balance"
},
"valueString": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1wallet~1%7Bid%7D~1unspents/get/responses/200/content/application~1json/schema/properties/unspents/items/properties/valueString",
"description": "The change (in base units) in the address's balance represented as a String"
},
"isChange": {
"type": "boolean",
"description": "True if this address is a change address (only exists for UTXO coins) and if this is a `sent` Transfer"
},
"isPayGo": {
"type": "boolean",
"description": "True if this address is the BitGo PayGo wallet"
},
"token": {
"type": "string",
"description": "If this is a token entry, the token's symbol",
"example": "omg"
}
}
},
"required": [
"address",
"valueString"
]
}
},
"required": [
"id",
"coin",
"wallet",
"txid",
"height",
"date",
"confirmations",
"type",
"valueString",
"usd",
"usdRate",
"state",
"tags",
"history",
"comment",
"coinSpecific"
]
}
},
"coin": {
"$ref": "#/components/parameters/coin/schema"
},
"nextBatchPrevId": {
"$ref": "#/paths/~1api~1v2~1auditlog/get/responses/200/content/application~1json/schema/properties/nextBatchPrevId"
}
},
"required": [
"transfers",
"coin"
]
}
}
}
},
"400": {
"description": "`InvalidEnterpriseId`",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
},
"404": {
"description": "`EnterpriseNotFound`",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
}
}
}
},
"/api/v2/admin/user": {
"get": {
"tags": [
"Admin"
],
"summary": "List users",
"operationId": "v2.admin.user.list",
"parameters": [
{
"name": "id",
"in": "query",
"schema": {
"type": "array",
"items": {
"$ref": "#/components/parameters/userId/schema"
}
},
"required": true
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"users": {
"type": "array",
"items": {
"$ref": "#/paths/~1api~1v2~1user~1%7Bid%7D/get/responses/200/content/application~1json/schema"
}
}
},
"required": [
"users"
]
}
}
}
},
"400": {
"description": "`InvalidUserId`",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
}
}
}
},
"/api/v2/admin/enterprise": {
"get": {
"tags": [
"Admin"
],
"summary": "List enterprises",
"operationId": "v2.admin.enterprise.list",
"parameters": [
{
"name": "id",
"in": "query",
"schema": {
"type": "array",
"items": {
"$ref": "#/components/parameters/userId/schema"
}
}
},
{
"name": "bitgoOrg",
"in": "query",
"schema": {
"type": "string",
"items": {
"$ref": "#/components/parameters/bitgoOrg/schema"
}
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/200/content/application~1json/schema"
}
}
}
},
"400": {
"description": "`InvalidEnterpriseId`",
"content": {
"application/json": {
"schema": {
"$ref": "#/paths/~1api~1v2~1enterprise/get/responses/400/content/application~1json/schema"
}
}
}
}
}
}
},
"/api/v2/auditlog": {
"get": {
"tags": [
"Audit log"
],
"summary": "List audit logs",
"description": "",
"operationId": "v2.auditlog.list",
"parameters": [
{
"$ref": "#/components/parameters/coinSingleOrList"
},
{
"$ref": "#/components/parameters/queryEnterpriseIdOrPersonal"
},
{
"$ref": "#/components/parameters/limit"
},
{
"$ref": "#/components/parameters/prevId"
},
{
"$ref": "#/components/parameters/auditLogType"
},
{
"$ref": "#/components/parameters/walletId"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"logs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"coin": {
"$ref": "#/components/parameters/coin/schema"
},
"data": {
"type": "object",
"description": "Properties that apply to the given audit log type"
},
"date": {
"$ref": "#/paths/~1api~1v2~1%7Bcoin%7D~1webhooks/post/responses/200/content/application~1json/schema/allOf/1/properties/created"
},
"enterpriseId": {
"$ref": "#/components/parameters/userId/schema"
},
"id": {
"$ref": "#/components/parameters/userId/schema"
},
"ip": {
"allOf": [
{
"type": "string",
"format": "ipv4",
"example": "127.0.0.1"
},
{
"description": "The client IP that caused the AuditLog entry to be written"
}
]
},
"target": {
"allOf": [
{
"$ref": "#/components/parameters/userId/schema"
},
{
"description": "Object that the AuditLog entry is associated with"
}
]
},
"type": {
"$ref": "#/components/parameters/auditLogType/schema/items"
},
"user": {
"allOf": [
{
"$ref": "#/components/parameters/userId/schema"
},
{
"description": "The user that caused the AuditLog entry to be written"
}
]
},
"walletId": {
"$ref": "#/components/parameters/userId/schema"
}
}
}
},
"nextBatchPrevId": {
"type": "string",
"format": "uuid",
"example": "585951a5df8380e0e3063e9f",
"description": "When a result set is truncated, this field returns the id of the last object in the previous batch. To get the next batch of results, pass this value via the `prevId` query parameter."
}
},
"required": [
"logs"
]
}
}
}
}
}
}
}
},
"tags": [
{
"name": "Address"
},
{
"name": "Admin"
},
{
"name": "Audit log"
},
{
"name": "Bank account",
"description": "Manage links to external bank accounts"
},
{
"name": "Circuit breaker",
"description": "An internal limit placed on transfers out of a wallet. Circuit breakers can\nbe defined at 3 levels:\n\n* Global\n* Enterprise\n* Wallet\n\nA lower-level circuit breaker overrides all higher-level circuit breakers.\nGlobal circuit breakers apply by default. An enterprise circuit breaker\noverrides all global circuit breakers. A wallet circuit breaker overrides\nall enterprise and global circuit breakers.\n"
},
{
"name": "Coin-specific implementation",
"description": "BitGo strives to provide a multitude of different digital currencies via a seamless common application interface. Our platform is designed for the simple funds transfer of such currencies.\nThe API operates at a wallet level above the blockchain, and the SDK handles the different transactional implementations without getting in the user's way.\n\nAt times, certain operations (such as wallet creation) are handled differently between Blockchains - in Bitcoin, a multisig address can be crafted with just the 3 keys, but in Ethereum, a multisig contract must be deployed.\n\nThis section explains the differences of how BitGo handle's our wallet operations - it is for informational use; our the SDK handles the intricacies of each digital currency, creating a common interface across all coins.\n\nFor a summarized list of all supported digital currencies, see [this section](#coin-digital-currency-support).\n\n## UTXO-based Coins\n\n### Generating addresses\n\nBitGo uses an HD wallet scheme supporting the <a href=\"https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki\" target=\"_new\">BIP32 standard</a> with the following paths:\n\nManually generated addresses (for deposits): `/0/0/chainCode/n`\n\nChange addresses: `/0/0/chainCode/n`\n\nWhere `chainCode` represents the type of address according to the table below:\n\nChain Code | Address Type | Deposit or Change\n---------- | ------------ | -----------------\n0 | Pay to Script Hash (P2SH) | Deposit\n1 | Pay to Script Hash (P2SH) | Change\n10 | Wrapped Segwit (P2SH-P2WSH) | Deposit\n11 | Wrapped Segwit (P2SH-P2WSH) | Change\n20 | Bech32/Native Segwit/Pay to Witness Script Hash (P2WSH) | Deposit\n21 | Bech32/Native Segwit/Pay to Witness Script Hash (P2WSH) | Change\n\n\n## Bitcoin\n\nBitcoin can be accessed with the following coin types\n\nEnvironment | Coin Type | Faucet\n----------- | --------- | ------\nBitcoin Production | btc\nBitcoin Testnet | tbtc | [https://testnet.manu.backend.hamburg/faucet](https://testnet.manu.backend.hamburg/faucet)\n\nThe Bitcoin wallets in Platform V2 should not be confused with the wallets created via V1 routes.\n\n### Wallet construction\n\n```javascript\nbitgo.coin('tbtc').wallets()\n.generateWallet({ label: 'My Test Wallet', passphrase: 'secretpassphrase1a5df8380e0e30' })\n.then(function(wallet) {\n // print the new wallet\n console.dir(wallet);\n});\n```\n```shell\nLABEL=\"My Test Wallet\"\nPASSPHRASE=\"secretpassphrase1a5df8380e0e30\"\n\ncurl -X POST \\\n-H \"Content-Type: application/json\" \\\n-H \"Authorization: Bearer $ACCESS_TOKEN\" \\\n-d \"{ \\\"label\\\": \\\"$LABEL\\\", \\\"passphrase\\\": \\\"$PASSPHRASE\\\" }\" \\\nhttp://$BITGO_EXPRESS_HOST:3080/api/v2/tbtc/wallet/generate\n```\n\nFor Bitcoin, BitGo uses a 2-of-3 multisig P2SH scheme, with the keys in the order of User, Backup and BitGo respectively.\n\nWallet creation can be done in a single line with the help of our SDK.\n\n### Generating addresses\n\n```javascript\nbitgo.coin('tbtc').wallets().getWallet({ id: '585c51a5df8380e0e3082e46' })\n.then(function(wallet) {\n return wallet.createAddress();\n})\n.then(function(newAddress) {\n // print new address details\n console.dir(newAddress);\n});\n```\n```shell\nWALLET=585c51a5df8380e0e3082e46\n\ncurl -X POST \\\n-H \"Authorization: Bearer $ACCESS_TOKEN\" \\\nhttps://test.bitgo.com/api/v2/tbtc/wallet/$WALLET/address\n```\n\nSee \"Generating addresses\" section of \"UTXO-based\" coins above. Bitcoin defaults to chain 10.\n\n### Balances\n\nBitcoin's unit subdivisibility goes up to `100,000,000` satoshis, so most amounts can be represented as multiples of the smallest subdivison unit without exceeding the range of Javascript numbers.\n\nFor that reason, both the integer and the string balance properties are available,\nwhich covers `balance`, `confirmedBalance`, and `spendableBalance`, as well as their string value counterparts,\n`balanceString`, `confirmedBalanceString`, and `spendableBalanceString`.\n\n## Bitcoin Cash\n\nBitcoin Cash can be accessed with the following coin types\n\nEnvironment | Coin Type | Faucet\n----------- | --------- | --------\nBitcoin Cash Production | bch\nBitcoin Cash Testnet | tbch | https://testnet.manu.backend.hamburg/bitcoin-cash-faucet\n\nNew wallets created within Bitcoin Cash are not able to receive normal Bitcoin.\n\n### Fork notes\n\nBitcoin Cash (BCH) forked from the Bitcoin mainnet on August 1st, 2017. Addresses with balances at that time have the same balance within Bitcoin Cash.\nAfter this date, blocks and transactions on the BCH fork no longer overlap with Bitcoin.\n\nThe Bitcoin Cash fork is replay-safe both ways, meaning that transactions made after August 1st, 2017 on one chain will not occur on the other.\n\n### Migrated Wallets\n\nAll BitGo customers using our Bitcoin wallets on August 1st, 2017 had their wallets and keys automatically migrated to the V2 BCH coin type.\n\nUsers can find migrated wallets by using the [list wallets](#list-wallets) API. On the wallet object, there is a `migratedFrom` property that corresponds to the Bitcoin Wallet ID.\n\nTo protect against confusion (users sending BCH to BTC addresses or vice versa), migrated wallets may not create new addresses by default. Users should create a new wallet with new keys to ensure all new BCH addresses do not collide with BTC addresses.\n\n### New Wallet construction\n\n```javascript\nbitgo.coin('bch').wallets()\n.generateWallet({ label: 'My Test Wallet', passphrase: 'secretpassphrase1a5df8380e0e30' })\n.then(function(wallet) {\n // print the new wallet\n console.dir(wallet);\n});\n```\n```shell\nLABEL=\"My Test Wallet\"\nPASSPHRASE=\"secretpassphrase1a5df8380e0e30\"\n\ncurl -X POST \\\n-H \"Content-Type: application/json\" \\\n-H \"Authorization: Bearer $ACCESS_TOKEN\" \\\n-d \"{ \\\"label\\\": \\\"$LABEL\\\", \\\"passphrase\\\": \\\"$PASSPHRASE\\\" }\" \\\nhttp://$BITGO_EXPRESS_HOST:3080/api/v2/bch/wallet/generate\n```\n\nFor Bitcoin, BitGo uses a 2-of-3 multisig P2SH scheme, with the keys in the order of User, Backup and BitGo respectively.\n\nWallet creation can be done in a single line with the help of our SDK.\n\n### Generating addresses\n\n```javascript\nbitgo.coin('bch').wallets().getWallet({ id: '585c51a5df8380e0e3082e46' })\n.then(function(wallet) {\n return wallet.createAddress();\n})\n.then(function(newAddress) {\n // print new address details\n console.dir(newAddress);\n});\n```\n```shell\nWALLET=585c51a5df8380e0e3082e46\n\ncurl -X POST \\\n-H \"Authorization: Bearer $ACCESS_TOKEN\" \\\nhttps://test.bitgo.com/api/v2/bch/wallet/$WALLET/address\n```\n\nSee \"Generating addresses\" section of \"UTXO-based\" coins above. Note that Bitcoin Cash does not support segwit. Bitcoin Cash defaults to chain 0.\n\n## Bitcoin SV\n\nBitcoin SV can be accessed with the following coin types\n\nEnvironment | Coin Type | Faucet\n----------- | --------- | --------\nBitcoin SV Production | bsv\nBitcoin SV Testnet | tbsv | https://bitcoincloud.net/faucet\n\nNew wallets created within Bitcoin SV are not able to receive Bitcoin or Bitcoin Cash.\n\n### Fork notes\n\nBitcoin SV (BSV) forked from the Bitcoin Cash mainnet on November 15th, 2018. Addresses with balances at that time have the same balance within Bitcoin SV.\nAfter this date, blocks and transactions on the BSV fork no longer overlap with Bitcoin Cash.\n\nBitGo is providing replay protection for the Bitcoin Cash/Bitcoin SV fork on November 15th, 2018. This means that BSV transactions sent from a BitGo Wallet since the fork are safe from being replayed to the Bitcoin Cash network. Vice versa, Bitcoin Cash transactions sent from a BitGo Wallet since the fork are safe from being replayed to the Bitcoin SV network.\n\n### Migrated Wallets\n\nAll BitGo customers using our Bitcoin Cash wallets on November 15th, 2018 had their wallets and keys automatically migrated to the BSV coin type.\n\nUsers can find migrated wallets by using the [list wallets](#list-wallets) API.\n\n### New Wallet construction\n\n```javascript\nbitgo.coin('bsv').wallets()\n.generateWallet({ label: 'My Test Wallet', passphrase: 'secretpassphrase1a5df8380e0e30' })\n.then(function(wallet) {\n // print the new wallet\n console.dir(wallet);\n});\n```\n```shell\nLABEL=\"My Test Wallet\"\nPASSPHRASE=\"secretpassphrase1a5df8380e0e30\"\n\ncurl -X POST \\\n-H \"Content-Type: application/json\" \\\n-H \"Authorization: Bearer $ACCESS_TOKEN\" \\\n-d \"{ \\\"label\\\": \\\"$LABEL\\\", \\\"passphrase\\\": \\\"$PASSPHRASE\\\" }\" \\\nhttp://$BITGO_EXPRESS_HOST:3080/api/v2/bsv/wallet/generate\n```\n\nFor Bitcoin SV, BitGo uses a 2-of-3 multisig P2SH scheme, with the keys in the order of User, Backup and BitGo respectively.\n\nWallet creation can be done in a single line with the help of our SDK.\n\n### Generating addresses\n\n```javascript\nbitgo.coin('bsv').wallets().getWallet({ id: '585c51a5df8380e0e3082e46' })\n.then(function(wallet) {\n return wallet.createAddress();\n})\n.then(function(newAddress) {\n // print new address details\n console.dir(newAddress);\n});\n```\n```shell\nWALLET=585c51a5df8380e0e3082e46\n\ncurl -X POST \\\n-H \"Authorization: Bearer $ACCESS_TOKEN\" \\\nhttps://test.bitgo.com/api/v2/bsv/wallet/$WALLET/address\n```\n\nSee \"Generating addresses\" section of \"UTXO-based\" coins above. Note that Bitcoin SV does not support segwit. Bitcoin SV defaults to chain 0.\n\n## Bitcoin Gold\n\nBitcoin Gold can be accessed with the following coin types\n\nEnvironment | Coin Type\n----------- | ---------\nBitcoin Gold Production | btg\n\n### Fork notes\n\nBitcoin Gold (BTG) forked from the Bitcoin mainnet on October 24th, 2017. Addresses with balances at that time have the same balance within Bitcoin Gold.\nAfter this date, blocks and transactions on the BTG fork no longer overlap with Bitcoin.\n\nBitcoin Gold uses a different address format from Bitcoin which protects users from accidentally sending coins to the wrong chain.\nAll Bitcoin Gold addresses start with either a G or an A. Since BitGo wallets use multisig addresses, all addresses for our wallets start with an A.\n\nThe Bitcoin Gold fork is replay-safe both ways, meaning that new transaction made on one chain will not occur on the other.\n\n### Migrated Wallets\n\nAll BitGo customers using our Bitcoin wallets on October 24th, 2017 had their wallets and keys automatically migrated to the V2 BTG coin type.\n\nUsers can find migrated wallets by using the [list wallets](#list-wallets) API. On the wallet object, there is a `migratedFrom` property that corresponds to the Bitcoin Wallet ID.\n\n### Generating addresses\n\nSee \"Generating addresses\" section of \"UTXO-based\" coins above. Bitcoin Gold defaults to chain 10.\n\n## Dash\n\nDash can be accessed with the following coin types\n\nEnvironment | Coin Type | Faucet\n----------- | --------- | ------\nDash Production | dash\nDash Testnet | tdash | [http://test.faucet.masternode.io/](http://test.faucet.masternode.io/)\n\n### Wallet construction\n\n```javascript\nbitgo.coin('tdash').wallets()\n.generateWallet({ label: 'My Test Wallet', passphrase: 'secretpassphrase1a5df8380e0e30' })\n.then(function(wallet) {\n // print the new wallet\n console.dir(wallet);\n});\n```\n```shell\nLABEL=\"My Test Wallet\"\nPASSPHRASE=\"secretpassphrase1a5df8380e0e30\"\n\ncurl -X POST \\\n-H \"Content-Type: application/json\" \\\n-H \"Authorization: Bearer $ACCESS_TOKEN\" \\\n-d \"{ \\\"label\\\": \\\"$LABEL\\\", \\\"passphrase\\\": \\\"$PASSPHRASE\\\" }\" \\\nhttp://$BITGO_EXPRESS_HOST:3080/api/v2/tdash/wallet/generate\n```\n\nFor Dash, BitGo uses the same 2-of-3 multisig P2SH scheme as for Bitcoin, with\nthe keys in the order of User, Backup and BitGo respectively.\n\n### Generating addresses\n\n```javascript\nbitgo.coin('tdash').wallets().getWallet({ id: '585c51a5df8380e0e3082e46' })\n.then(function(wallet) {\n return wallet.createAddress();\n})\n.then(function(newAddress) {\n // print new address details\n console.dir(newAddress);\n});\n```\n```shell\nWALLET=585c51a5df8380e0e3082e46\n\ncurl -X POST \\\n-H \"Authorization: Bearer $ACCESS_TOKEN\" \\\nhttps://test.bitgo.com/api/v2/tdash/wallet/$WALLET/address\n```\n\nSee \"Generating addresses\" section of \"UTXO-based\" coins above. Note that Dash does not support segwit. Dash defaults to chain 0.\n\n### Balances\n\nJust as with Bitcoin, Dash's unit subdivisibility goes up to `100,000,000`\nunits called Duff, so most amounts can be represented as multiples of the\nsmallest subdivison unit without exceeding the range of Javascript numbers.\n\nFor that reason, both the integer and the string balance properties are\navailable, which covers `balance`, `confirmedBalance`, and `spendableBalance`,\nas well as their string value counterparts, `balanceString`,\n`confirmedBalanceString`, and `spendableBalanceString`.\n\n### Dash InstantSend\n\nDash InstantSend is a Dash specific extension allowing instant on-chain\npayments. It works by committing to a transaction by a majority of Dash\nMasternodes. This way committed transaction can't be double-spent by the sender\nand the receiver can potentially consider transaction to be settled without\nwaiting for any on-chain confirmations. For more information on InstantSend\nplease refer to [Official Dash InstantSend documention](https://docs.dash.org/en/latest/wallets/dashcore/privatesend-instantsend.html#instantsend)\n\n\nDash InstantSend receiving and sending support is exposed through `instant`\nflag on Transfer objects and sending APIs.\n\nDash InstantSend transaction require higher than normal fees. Such fees will be\nautomatically calculated and enforced by transaction building / sending APIs,\nwhen `instant` flag is set to true.\n\n## Litecoin\n\nLitecoin can be accessed with the following coin types\n\nEnvironment | Coin Type | Faucet\n----------- | --------- | ------\nLitecoin Production | ltc\nLitecoin Testnet | tltc | [http://testnet.litecointools.com/](http://testnet.litecointools.com/)\n\n### Wallet construction\n\n```javascript\nbitgo.coin('tltc').wallets()\n.generateWallet({ label: 'My Test Wallet', passphrase: 'secretpassphrase1a5df8380e0e30' })\n.then(function(wallet) {\n // print the new wallet\n console.dir(wallet);\n});\n```\n```shell\nLABEL=\"My Test Wallet\"\nPASSPHRASE=\"secretpassphrase1a5df8380e0e30\"\n\ncurl -X POST \\\n-H \"Content-Type: application/json\" \\\n-H \"Authorization: Bearer $ACCESS_TOKEN\" \\\n-d \"{ \\\"label\\\": \\\"$LABEL\\\", \\\"passphrase\\\": \\\"$PASSPHRASE\\\" }\" \\\nhttp://$BITGO_EXPRESS_HOST:3080/api/v2/tltc/wallet/generate\n```\n\nFor Litecoin, BitGo uses the same 2-of-3 multisig P2SH scheme as for Bitcoin, with the keys in the order of User, Backup and BitGo respectively.\n\n### Generating addresses\n\n```javascript\nbitgo.coin('tltc').wallets().getWallet({ id: '585c51a5df8380e0e3082e46' })\n.then(function(wallet) {\n return wallet.createAddress();\n})\n.then(function(newAddress) {\n // print new address details\n console.dir(newAddress);\n});\n```\n```shell\nWALLET=585c51a5df8380e0e3082e46\n\ncurl -X POST \\\n-H \"Authorization: Bearer $ACCESS_TOKEN\" \\\nhttps://test.bitgo.com/api/v2/tltc/wallet/$WALLET/address\n```\n\nSee \"Generating addresses\" section of \"UTXO-based\" coins above. Litecoin defaults to chain 0.\n\n### Converting addresses\n\n```javascript\nbitgo.coin('ltc').canonicalAddress('3GBygsGPvTdfKMbq4AKZZRu1sPMWPEsBfd', 2);\n// MNQ7zkgMsaV67rsjA3JuP59RC5wxRXpwgE\n\nbitgo.coin('ltc').canonicalAddress('3GBygsGPvTdfKMbq4AKZZRu1sPMWPEsBfd', 1);\nbitgo.coin('ltc').canonicalAddress('MNQ7zkgMsaV67rsjA3JuP59RC5wxRXpwgE', 1);\n// 3GBygsGPvTdfKMbq4AKZZRu1sPMWPEsBfd\n```\n```shell\ncurl -X POST \\\n-H \"Content-Type: application/json\" \\\n-d \"{ \\\"address\\\": \\\"3GBygsGPvTdfKMbq4AKZZRu1sPMWPEsBfd\\\", \\\"scriptHashVersion\\\": 2 }\" \\\nhttp://$BITGO_EXPRESS_HOST:3080/api/v2/ltc/canonicaladdress\n# MNQ7zkgMsaV67rsjA3JuP59RC5wxRXpwgE\n```\n\nIt is worth noting that Litecoin used to support the same P2SH address format as Bitcoin, but then switched to other version identifiers.\nFor this reason, there can be confusion between Litecoin addresses that start with a `3` and those that start with `M`.\nHowever, both addresses are the same, and BitGo always interprets incoming transactions using the new address format (i. e. starting with an `M`).\nFor outgoing transactions, we have an address conversion tool that would take an address like this one `3GBygsGPvTdfKMbq4AKZZRu1sPMWPEsBfd` and convert it to this: `MNQ7zkgMsaV67rsjA3JuP59RC5wxRXpwgE`.\n\nIn testnet, the new P2SH addresses start with `Q`, so the corresponding conversion could be between `2MsFGJvxH1kCoRp3XEYvKduAjY6eYz9PJHz` and `QLc2RwpX2rFtZzoZrexLibcAgV6Nsg74Jn`.\n\nIn order to prevent ambiguity, BitGo only accepts the new address format for outgoing transactions.\n\n#### Method\n\n`bitgo.coin('ltc').canonicalAddress(address, scriptHashVersion)`\n\n`bitgo.coin('tltc').canonicalAddress(address, scriptHashVersion)`\n\n#### HTTP Request\n\n`POST /api/v2/:coin/canonicaladdress`\n\n#### Function Arguments\n\nParameter | Type | Required | Description\n--------- | ---- | -------- | -----------\naddress | String | Yes | The address string to convert\nscriptHashVersion | Integer | No | `1` for old address format, `2` for new. Defaults to `2`.\n\n### Balances\n\nJust as with Bitcoin, Litecoin's unit subdivisibility goes up to `100,000,000`, so most amounts can be represented as multiples of the smallest subdivison unit without exceeding the range of Javascript numbers.\n\nFor that reason, both the integer and the string balance properties are available,\nwhich covers `balance`, `confirmedBalance`, and `spendableBalance`, as well as their string value counterparts,\n`balanceString`, `confirmedBalanceString`, and `spendableBalanceString`.\n\n## Royal Mint Gold\n\nRMG can be accessed with the following coin types\n\nEnvironment | Coin Type | Faucet\n----------- | --------- | ------\nRMG Production | rmg\nRMG Testnet | trmg\n\n### Wallet construction\n\n```javascript\nbitgo.coin('trmg').wallets()\n.generateWallet({ label: 'My Test Wallet', passphrase: 'secretpassphrase1a5df8380e0e30' })\n.then(function(wallet) {\n // print the new wallet\n console.dir(wallet);\n});\n```\n```shell\nLABEL=\"My Test Wallet\"\nPASSPHRASE=\"secretpassphrase1a5df8380e0e30\"\n\ncurl -X POST \\\n-H \"Content-Type: application/json\" \\\n-H \"Authorization: Bearer $ACCESS_TOKEN\" \\\n-d \"{ \\\"label\\\": \\\"$LABEL\\\", \\\"passphrase\\\": \\\"$PASSPHRASE\\\" }\" \\\nhttp://$BITGO_EXPRESS_HOST:3080/api/v2/trmg/wallet/generate\n```\n\nRoyal Mint Gold wallets are very much alike Bitcoin's, except that the consensus protocol is designed to require 2 Account Service Provider IDs and a single public key hash.\n\n### Generating addresses\n\n```javascript\nbitgo.coin('trmg').wallets().getWallet({ id: '585c51a5df8380e0e3082e46' })\n.then(function(wallet) {\n return wallet.createAddress();\n})\n.then(function(newAddress) {\n // print new address details\n console.dir(newAddress);\n});\n```\n```shell\nWALLET=585c51a5df8380e0e3082e46\n\ncurl -X POST \\\n-H \"Authorization: Bearer $ACCESS_TOKEN\" \\\nhttps://test.bitgo.com/api/v2/trmg/wallet/$WALLET/address\n```\n\nRoyal Mint Gold addresses are generated using the BIP32 standard described earlier, but only the user key varies.\n\nThe BitGo and backup keys are referenced and enforced as Account Service Provider IDs on a consensus protocol level.\n\n### Balances\n\nRoyal Mint Gold subdivisibility goes up to `1,000,000` atoms per gram, so all amounts can be represented as multiples of the smallest subdivison unit without exceeding the range of Javascript numbers.\n\nFor that reason, both the integer and the string balance properties are available,\nwhich covers `balance`, `confirmedBalance`, and `spendableBalance`, as well as their string value counterparts,\n`balanceString`, `confirmedBalanceString`, and `spendableBalanceString`.\n\n## Ethereum\n\nEthereum can be accessed with the following coin types\n\nEnvironment | Coin Type | Faucet Instructions\n----------- | --------- | -------------------\nEthereum Production | eth\nEthereum Testnet | teth | [https://github.com/kovan-testnet/faucet](https://github.com/kovan-testnet/faucet)\n\n### Enterprise fee address\n\n```shell\nENTERPRISEID=585c51a5df8380e0e3082e46\n\ncurl -X POST \\\n-H \"Authorization: Bearer $ACCESS_TOKEN\" \\\nhttps://test.bitgo.com/api/v2/teth/enterprise/$ENTERPRISEID/feeAddressBalance\n```\n\nEach enterprise has a fee address which will be used to pay for transaction fees on all Ethereum wallets in that enterprise. The fee address is displayed in the dashboard of the BitGo website, and you must fund it before creating a wallet, address, or sending a transaction. Unlike in Bitcoin (where the sending wallet also pays the transaction fees) BitGo's Ethereum wallet contract requires a separate account to initiate the transaction and pay the fees. If the enterprise's fee address runs out of funds, you will not be able to create new wallets, addresses, or send transactions until you fund the fee address. You will not be able to use one of your own Ethereum wallets to fund the fee address if the fee address is too low (because you will not be able to send transactions from your Ethereum wallet) so it is best to create and fund a non-BitGo Ethereum account so you can use it to fund your BitGo enterprise fee address. Any open source Ethereum wallet or Ethereum exchange can be used to create an account.\n\nPlease note that the fee address is a single-signature account and the private key is created and owned by BitGo, so you will not be able to send funds out of the fee address once you have sent them in.\n\nThere will be a 'feeAddress' field under the 'CoinSpecific' key for Ethereum wallets. You will use this address to pay the fees for creating transactions and addresses.\n\n### Wallet construction\n\n```javascript\nbitgo.coin('teth').wallets()\n.generateWallet({ label: 'My Test Wallet', passphrase: 'secretpassphrase1a5df8380e0e30', enterprise: '5612c2beeecf83610b621b90964448cd' })\n.then(function(wallet) {\n // print the new wallet\n console.dir(wallet);\n});\n```\n```shell\nLABEL=\"My Test Wallet\"\nPASSPHRASE=\"secretpassphrase1a5df8380e0e30\"\n\ncurl -X POST \\\n-H \"Content-Type: application/json\" \\\n-H \"Authorization: Bearer $ACCESS_TOKEN\" \\\n-d \"{ \\\"label\\\": \\\"$LABEL\\\", \\\"passphrase\\\": \\\"$PASSPHRASE\\\" }\" \\\nhttp://$BITGO_EXPRESS_HOST:3080/api/v2/teth/wallet/generate\n```\nEthereum wallets can only be created under an enterprise. Pass in the id of the enterprise to associate the wallet with. Your enterprise id can be seen by clicking on the \"Manage Organization\" link on the enterprise dropdown.\n\nUnlike Bitcoin, when you create an Ethereum wallet, BitGo sends a transaction on the Ethereum network in order to deploy its multi-signature wallet contract. While this initialization transaction is unconfirmed, the wallet should not be used, nor should anyone attempt to send funds to the wallet. For this reason, while the wallet's initialization transaction is still unconfirmed on the Ethereum network the wallet's receive address will *not* be visible through the API. This is to protect users against accidentally sending to an Ethereum wallet which does not exist on the network and losing funds.\n\n### Generating addresses\n\n```javascript\nbitgo.coin('teth').wallets().getWallet({ id: '585c51a5df8380e0e3082e46' })\n.then(function(wallet) {\n return wallet.createAddress();\n})\n.then(function(newAddress) {\n // print new address details\n console.dir(newAddress);\n});\n```\n```shell\nWALLET=585c51a5df8380e0e3082e46\n\ncurl -X POST \\\n-H \"Authorization: Bearer $ACCESS_TOKEN\" \\\nhttps://test.bitgo.com/api/v2/teth/wallet/$WALLET/address\n```\n\nUnlike Bitcoin, Ethereum address creation requires interactions with the Ethereum blockchain. In order to deploy a receive address contract, BitGo sends a transaction on the Ethereum network. Please make sure to fund the fee address mentioned above. Like the wallet creation process, an Ethereum address will not be immediately usable upon creation and so the caller of this function will have to wait for the initialization transaction to be confirmed before attempting to fetch, or send to, the address\n\n### Balances\n\nUnlike Bitcoin, each ether is comprised of `1,000,000,000,000,000,000` (<code>10<sup>18</sup></code>) wei, so not even a single ether can be stored numerically without exceeding the range of Javascript numbers.\n\nFor that reason, only the string balance properties are available, which are `balanceString`, `confirmedBalanceString`, and `spendableBalanceString`.\n\n### Transactions\n\nBitGo's Ethereum multisig contract currently only supports one sender and one recipient. That means that the `sendMany` call will only accept one recipient.\n\n## Stellar\n\nStellar can be accessed with the following coin types\n\nEnvironment | Coin Type | Faucet\n----------- | --------- | ------\nStellar Production | xlm\nStellar Testnet | txlm | [https://www.stellar.org/laboratory/#account-creator?network=test](https://www.stellar.org/laboratory/#account-creator?network=test)\n\n### Wallet construction\n\n```javascript\nbitgo.coin('txlm').wallets()\n.generateWallet({ label: 'My Test Wallet', passphrase: 'secretpassphrase1a5df8380e0e30' })\n.then(function(wallet) {\n // print the new wallet\n console.dir(wallet);\n});\n```\n```shell\nLABEL=\"My Test Wallet\"\nPASSPHRASE=\"secretpassphrase1a5df8380e0e30\"\n\ncurl -X POST \\\n-H \"Content-Type: application/json\" \\\n-H \"Authorization: Bearer $ACCESS_TOKEN\" \\\n-d \"{ \\\"label\\\": \\\"$LABEL\\\", \\\"passphrase\\\": \\\"$PASSPHRASE\\\" }\" \\\nhttp://$BITGO_EXPRESS_HOST:3080/api/v2/txlm/wallet/generate\n```\n\nThe creation of Stellar wallets is similar to XRP and Ethereum's, in that wallet creation requires interaction with the network to complete. For a Stellar wallet to be initialized, a funding transaction needs to be sent to the wallet's address. When BitGo detects the funding transaction, another transaction is sent automatically to set up the signers and the home domain of the account.\n\nStellar accounts must maintain a minimum balance of lumens. This reserve is calculated using the [base reserve](https://www.stellar.org/developers/guides/concepts/fees.html#minimum-account-balance), which currently is `0.5 XLM`. The calculation is: `(2 + # of co-signers) × base reserve = 2.5 XLM.`\nThe [base fee](https://www.stellar.org/developers/guides/concepts/fees.html#transaction-fee) and [base reserve](https://www.stellar.org/developers/guides/concepts/fees.html#minimum-account-balance) values are provided by the latest ledger.\nThe minimum funding amount required is obtained by adding the account reserve plus initialization fees (i.e. 2.5 XLM + 0.00005 XLM = 2.50005 XLM).\n\n### Required reserve\n```shell\ncurl -X GET \\\n-H \"Authorization: Bearer $ACCESS_TOKEN\" \\\nhttps://test.bitgo.com/api/v2/txlm/requiredReserve\n```\nFetch information about reserve requirements for an account.\n\n#### HTTP Request\n`GET /api/v2/:coin/requiredReserve`\n\n#### Response\nField | Description\n----- | -----------\nbaseFee | base fee used in transaction fees.\nbaseReserve | base reserve used in minimum account balances.\nreserve | minimum account balance, calculated using base reserve.\nminimumFunding | minimum funding balance, calculated using reserve and base fee.\nheight | the height of the block that provides the base values.\n\n### Generating addresses\n\n```javascript\nbitgo.coin('txlm').wallets().getWallet({ id: '585c51a5df8380e0e3082e46' })\n.then(function(wallet) {\n return wallet.createAddress();\n})\n.then(function(newAddress) {\n // print new address details\n console.dir(newAddress);\n});\n```\n```shell\nWALLET=585c51a5df8380e0e3082e46\n\ncurl -X POST \\\n-H \"Authorization: Bearer $ACCESS_TOKEN\" \\\nhttps://test.bitgo.com/api/v2/txlm/wallet/$WALLET/address\n```\n\nThe BIP32 standard cannot be taken advantage of, and hence generated XLM addresses differ only in their sequentially incrementing [memo](https://www.stellar.org/developers/guides/concepts/transactions.html#memo) id components.\nThe memo type used by BitGo is `MEMO_ID`: a 64-bit unsigned numeric string.\nWhenever a new address is created, the incremented `memoId` and the `rootAddress` are returned in the address' `coinSpecific` property.\n\n### Balances\n\nAlthough Stellar supports transacting multiple types of assets, at this moment BitGo only supports the native asset type, called [Lumen (XLM)](https://www.stellar.org/developers/guides/concepts/assets.html#lumens-xlm).\n\nThe smallest amount unit for Stellar is called [\"stroop\"](https://www.stellar.org/developers/guides/concepts/assets.html#one-stroop-multiple-stroops). One stroop equals `0.0000001 XLM`.\n\n### Transactions\nStellar uses an account-based model, similar to XRP. Additionally, due to the use of memo, Stellar transactions only support one input and one output.\n\nCurrently, the [base fee](https://www.stellar.org/developers/guides/concepts/fees.html#transaction-fee) is 100 stroops `(0.00001 XLM)`. The minimum fee for a transaction is calculated as `(# of operations × base fee)`.\n\n### Federation\nBitGo supports the [Stellar federation protocol](https://www.stellar.org/developers/guides/concepts/federation.html) that matches Stellar addresses to Stellar accounts. Additionally, the BitGo federation server provides the next memo id for the wallet.\nStellar accounts can be looked up by their Stellar address, or their Account ID.\n\nUsers can create email-like usernames for their Stellar wallets. A [Stellar address](https://www.stellar.org/developers/guides/concepts/federation.html#stellar-addresses) is conformed by the Stellar username and the account's [home domain](https://www.stellar.org/developers/guides/concepts/accounts.html#home-domain) (e.g. `test*bitgo.com`).\nStellar usernames are unique, and only accept lower-case letters, numbers and the characters: `-_.+@`. The home domain is automatically set to `bitgo.com`.\nA Stellar username can only be set once the wallet has been initialized, and it cannot be changed. See [Update Wallet](#update-wallet).\n\n## XRP (formerly known as Ripple)\n\nXRP can be accessed with the following coin types\n\nEnvironment | Coin Type | Faucet\n----------- | --------- | ------\nXRP Production | xrp\nXRP Altnet | txrp\n\n### Wallet construction\n\n```javascript\nbitgo.coin('txrp').wallets()\n.generateWallet({ label: 'My Test Wallet', passphrase: 'secretpassphrase1a5df8380e0e30' })\n.then(function(wallet) {\n // print the new wallet\n console.dir(wallet);\n});\n```\n```shell\nLABEL=\"My Test Wallet\"\nPASSPHRASE=\"secretpassphrase1a5df8380e0e30\"\n\ncurl -X POST \\\n-H \"Content-Type: application/json\" \\\n-H \"Authorization: Bearer $ACCESS_TOKEN\" \\\n-d \"{ \\\"label\\\": \\\"$LABEL\\\", \\\"passphrase\\\": \\\"$PASSPHRASE\\\" }\" \\\nhttp://$BITGO_EXPRESS_HOST:3080/api/v2/txrp/wallet/generate\n```\n\nThe creation of XRP wallets is like Ethereum's, in that wallet creation requires interaction with the blockchain (or the XRP Ledger) to complete. When you create an XRP wallet, BitGo sends 4 initialization transactions on the XRP network in order to create the wallet. While these initialization transactions are unconfirmed, the wallet should not be used, nor should anyone attempt to send funds to the wallet. For this reason, while the wallet's initialization transactions are still unconfirmed on the XRP network the wallet's receive address be *not* be visible through the API. This is to protect users against accidentally sending to an XRP wallet which does not exist on the network and losing funds.\n\n\nAs with most blockchain interactions, **there is a fee associated with it, which is currently at 25 XRP**. Therefore, though the creation of XRP wallets is unlimited in our testing environment, a mandatory payment agreement is associated with it in production. Each enterprise has a default limit of 5 XRP wallets, but this limit can be increased by contacting BitGo at support@bitgo.com.\n\n### Generating addresses\n\n```javascript\nbitgo.coin('txrp').wallets().getWallet({ id: '585c51a5df8380e0e3082e46' })\n.then(function(wallet) {\n return wallet.createAddress();\n})\n.then(function(newAddress) {\n // print new address details\n console.dir(newAddress);\n});\n```\n```shell\nWALLET=585c51a5df8380e0e3082e46\n\ncurl -X POST \\\n-H \"Authorization: Bearer $ACCESS_TOKEN\" \\\nhttps://test.bitgo.com/api/v2/txrp/wallet/$WALLET/address\n```\n\nA key difference between XRP and Bitcoin is that XRP has no concept of UTXOs, and operates on an account-based model instead.\nAdditionally, XRP transactions only support one input and one output. That means that the `sendMany` call is not supported.\n\nThe BIP32 standard therefore cannot be taken advantage of, and hence generated XRP addresses differ only in their sequentially incrementing destination tag components.\n\n### Balances\n\nThough just like RMG, a single XRP is divisible only up to `1,000,000` drops, due to the very high potential number of total XRP in the system,\nit is likely that many amounts cannot be represented numerically without exceeding the range of Javascript numbers.\n\nFor that reason, only the string balance properties are available, which are `balanceString`, `confirmedBalanceString`, and `spendableBalanceString`.\n\n## Zcash\n\nBitGo supports transparent transactions with the latest Zcash network upgrade, Sapling. This means only Sapling\ncompatible transactions will be generated and read by BitGo.\n\nZcash can be accessed with the following coin types:\n\nEnvironment | Coin Type | Faucet\n----------- | --------- | ------\nZcash Production | zec\nZcash Testnet | tzec | [https://faucet.testnet.z.cash/](https://faucet.testnet.z.cash/)\n\n### Notes on shielded transactions\nOnly transparent addresses are supported by BitGo wallets which limits the type of transactions allowed. A Zcash BitGo\nwallet can receive funds from a transparent or a shielded address but can only send funds to a transparent address.\n\n### Wallet construction\n\n```javascript\nbitgo.coin('tzec').wallets()\n.generateWallet({ label: 'My Test TZec Wallet', passphrase: 'secretpassphrase1a5df8380e0e30' })\n.then(function(wallet) {\n // print the new wallet\n console.dir(wallet);\n});\n```\n```shell\nLABEL=\"My TZec Wallet\"\nPASSPHRASE=\"secretpassphrase1a5df8380e0e30\"\n\ncurl -X POST \\\n-H \"Content-Type: application/json\" \\\n-H \"Authorization: Bearer $ACCESS_TOKEN\" \\\n-d \"{ \\\"label\\\": \\\"$LABEL\\\", \\\"passphrase\\\": \\\"$PASSPHRASE\\\" }\" \\\nhttp://$BITGO_EXPRESS_HOST:3080/api/v2/tzec/wallet/generate\n```\n\n### Generating addresses\n\n```javascript\nbitgo.coin('tzec').wallets().getWallet({ id: '585c51a5df8380e0e3082e46' })\n.then(function(wallet) {\n return wallet.createAddress();\n})\n.then(function(newAddress) {\n // print new address details\n console.dir(newAddress);\n});\n```\n```shell\nWALLET=585c51a5df8380e0e3082e46\n\ncurl -X POST \\\n-H \"Authorization: Bearer $ACCESS_TOKEN\" \\\nhttps://test.bitgo.com/api/v2/tzec/wallet/$WALLET/address\n```\n\nSee \"Generating addresses\" section of \"UTXO-based\" coins above. Note that Zcash does not support segwit. Zcash defaults to chain 0.\n\n### Balances\n\nJust as with Bitcoin, Zcash's unit subdivisibility goes up to `100,000,000` zatoshis with a capped supply of\n`21,000,000` ZECs, so most amounts can be represented as multiples of the smallest subdivison unit without exceeding the\nrange of Javascript numbers.\n\nFor that reason, both the integer and the string balance properties are available, which covers `balance`,\n`confirmedBalance`, and `spendableBalance`, as well as their string value counterparts, `balanceString`,\n`confirmedBalanceString`, and `spendableBalanceString`.\n\n## ERC20 Tokens\n\nERC20 tokens can be accessed with the following coin types.\n\nEnvironment | Coin Type | Contract Details\n----------- | --------- | -------------------\nEthereum Kovan Testnet | terc | [https://kovan.etherscan.io/address/0x3cbda27c7c2b4c74055c2548fdba8ed92da53645](https://kovan.etherscan.io/address/0x3cbda27c7c2b4c74055c2548fdba8ed92da53645)\nEthereum Kovan Testnet | test | [https://kovan.etherscan.io/address/0x1fb879581f31687b905653d4bbcbe3af507bed37](https://kovan.etherscan.io/address/0x1fb879581f31687b905653d4bbcbe3af507bed37)\nEthereum Mainnet | ae | [https://etherscan.io/token/0x5ca9a71b1d01849c0a95490cc00559717fcf0d1d](https://etherscan.io/token/0x5ca9a71b1d01849c0a95490cc00559717fcf0d1d)\nEthereum Mainnet | aion | [https://etherscan.io/token/0x4CEdA7906a5Ed2179785Cd3A40A69ee8bc99C466](https://etherscan.io/token/0x4CEdA7906a5Ed2179785Cd3A40A69ee8bc99C466)\nEthereum Mainnet | amn | [https://etherscan.io/token/0x737f98ac8ca59f2c68ad658e3c3d8c8963e40a4c](https://etherscan.io/token/0x737f98ac8ca59f2c68ad658e3c3d8c8963e40a4c)\nEthereum Mainnet | ana | [https://etherscan.io/token/0xfafd51641ab09dff163cd04d2eb6b7865eb83f53](https://etherscan.io/token/0xfafd51641ab09dff163cd04d2eb6b7865eb83f53)\nEthereum Mainnet | aoa | [https://etherscan.io/token/0x9ab165d795019b6d8b3e971dda91071421305e5a](https://etherscan.io/token/0x9ab165d795019b6d8b3e971dda91071421305e5a)\nEthereum Mainnet | ant | [https://etherscan.io/token/0x960b236A07cf122663c4303350609A66A7B288C0](https://etherscan.io/token/0x960b236A07cf122663c4303350609A66A7B288C0)\nEthereum Mainnet | appc | [https://etherscan.io/token/0x1a7a8bd9106f2b8d977e08582dc7d24c723ab0db](https://etherscan.io/token/0x1a7a8bd9106f2b8d977e08582dc7d24c723ab0db)\nEthereum Mainnet | ast | [https://etherscan.io/token/0x27054b13b1b798b345b591a4d22e6562d47ea75a](https://etherscan.io/token/0x27054b13b1b798b345b591a4d22e6562d47ea75a)\nEthereum Mainnet | audx | [https://etherscan.io/token/0xdf1e9e1a218cff9888faef311d6fbb472e4175ce](https://etherscan.io/token/0xdf1e9e1a218cff9888faef311d6fbb472e4175ce)\nEthereum Mainnet | bat | [https://etherscan.io/token/0x0d8775f648430679a709e98d2b0cb6250d2887ef](https://etherscan.io/token/0x0d8775f648430679a709e98d2b0cb6250d2887ef)\nEthereum Mainnet | bbx | [https://etherscan.io/token/0x71529cea068e3785efd4f18aaf59a6cb82b7e5cb](https://etherscan.io/token/0x71529cea068e3785efd4f18aaf59a6cb82b7e5cb)\nEthereum Mainnet | bcap | [https://etherscan.io/token/0xff3519eeeea3e76f1f699ccce5e23ee0bdda41ac](https://etherscan.io/token/0xff3519eeeea3e76f1f699ccce5e23ee0bdda41ac)\nEthereum Mainnet | bid | [https://etherscan.io/token/0xf1f64f6b8e17dd68c1db10b0eed3d2541a6c09ab](https://etherscan.io/token/0xf1f64f6b8e17dd68c1db10b0eed3d2541a6c09ab)\nEthereum Mainnet | bnt | [https://etherscan.io/token/0x1f573d6fb3f13d689ff844b4ce37794d79a7ff1c](https://etherscan.io/token/0x1f573d6fb3f13d689ff844b4ce37794d79a7ff1c)\nEthereum Mainnet | bnty | [https://etherscan.io/token/0xd2d6158683aee4cc838067727209a0aaf4359de3](https://etherscan.io/token/0xd2d6158683aee4cc838067727209a0aaf4359de3)\nEthereum Mainnet | btt | [https://etherscan.io/token/0xFA456Cf55250A839088b27EE32A424d7DAcB54Ff](https://etherscan.io/token/0xFA456Cf55250A839088b27EE32A424d7DAcB54Ff)\nEthereum Mainnet | btu | [https://etherscan.io/token/0xb683d83a532e2cb7dfa5275eed3698436371cc9f](https://etherscan.io/token/0xb683d83a532e2cb7dfa5275eed3698436371cc9f)\nEthereum Mainnet | brd | [https://etherscan.io/token/0x558ec3152e2eb2174905cd19aea4e34a23de9ad6](https://etherscan.io/token/0x558ec3152e2eb2174905cd19aea4e34a23de9ad6)\nEthereum Mainnet | cadx | [https://etherscan.io/token/0x8ed876e408959643479534a21970ec023d0fb51e](https://etherscan.io/token/0x8ed876e408959643479534a21970ec023d0fb51e)\nEthereum Mainnet | cag | [https://etherscan.io/token/0x7d4b8cce0591c9044a22ee543533b72e976e36c3](https://etherscan.io/token/0x7d4b8cce0591c9044a22ee543533b72e976e36c3)\nEthereum Mainnet | cbc | [https://etherscan.io/token/0x26DB5439F651CAF491A87d48799dA81F191bDB6b](https://etherscan.io/token/0x26DB5439F651CAF491A87d48799dA81F191bDB6b)\nEthereum Mainnet | cdag | [https://etherscan.io/token/0xf43401ea8ac4b86155b929e1a5a5e46626c23842](https://etherscan.io/token/0xf43401ea8ac4b86155b929e1a5a5e46626c23842)\nEthereum Mainnet | cdt | [https://etherscan.io/token/0x177d39ac676ed1c67a2b268ad7f1e58826e5b0af](https://etherscan.io/token/0x177d39ac676ed1c67a2b268ad7f1e58826e5b0af)\nEthereum Mainnet | cel | [https://etherscan.io/token/0xaaaebe6fe48e54f431b0c390cfaf0b017d09d42d](https://etherscan.io/token/0xaaaebe6fe48e54f431b0c390cfaf0b017d09d42d)\nEthereum Mainnet | cgld | [https://etherscan.io/token/0x3f50e6cc943351f00971a9d01ac32739895df826](https://etherscan.io/token/0x3f50e6cc943351f00971a9d01ac32739895df826)\nEthereum Mainnet | chfx | [https://etherscan.io/token/0xe435502c85a4e7e79cfab4167af566c27a7a0784](https://etherscan.io/token/0xe435502c85a4e7e79cfab4167af566c27a7a0784)\nEthereum Mainnet | chsb | [https://etherscan.io/token/0xba9d4199fab4f26efe3551d490e3821486f135ba](https://etherscan.io/token/0xba9d4199fab4f26efe3551d490e3821486f135ba)\nEthereum Mainnet | cln | [https://etherscan.io/token/0x4162178b78d6985480a308b2190ee5517460406d](https://etherscan.io/token/0x4162178b78d6985480a308b2190ee5517460406d)\nEthereum Mainnet | cnyx | [https://etherscan.io/token/0x319ad3ff82bedddb3bc85fd7943002d25cdb3cb9](https://etherscan.io/token/0x319ad3ff82bedddb3bc85fd7943002d25cdb3cb9)\nEthereum Mainnet | cpay | [https://etherscan.io/token/0x0Ebb614204E47c09B6C3FeB9AAeCad8EE060E23E](https://etherscan.io/token/0x0Ebb614204E47c09B6C3FeB9AAeCad8EE060E23E)\nEthereum Mainnet | cplt | [https://etherscan.io/token/0xa3f7871a4b86bcc3b6e97c8fd0745e71c55e1f82](https://etherscan.io/token/0xa3f7871a4b86bcc3b6e97c8fd0745e71c55e1f82)\nEthereum Mainnet | cqx | [https://etherscan.io/token/0x618c29dd2d16475b2ae6244f9e8aaead68f0ca44](https://etherscan.io/token/0x618c29dd2d16475b2ae6244f9e8aaead68f0ca44)\nEthereum Mainnet | cro | [https://etherscan.io/token/0xa0b73e1ff0b80914ab6fe0444e65848c4c34450b](https://etherscan.io/token/0xa0b73e1ff0b80914ab6fe0444e65848c4c34450b)\nEthereum Mainnet | cvc | [https://etherscan.io/token/0x41e5560054824ea6b0732e656e3ad64e20e94e45](https://etherscan.io/token/0x41e5560054824ea6b0732e656e3ad64e20e94e45)\nEthereum Mainnet | cslv | [https://etherscan.io/token/0x6dc05497f0b087c7692816e6acaa8bdda73907fc](https://etherscan.io/token/0x6dc05497f0b087c7692816e6acaa8bdda73907fc)\nEthereum Mainnet | dai | [https://etherscan.io/token/0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359](https://etherscan.io/token/0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359)\nEthereum Mainnet | dent | [https://etherscan.io/token/0x3597bfd533a99c9aa083587b074434e61eb0a258](https://etherscan.io/token/0x3597bfd533a99c9aa083587b074434e61eb0a258)\nEthereum Mainnet | dgx | [https://etherscan.io/token/0x4f3afec4e5a3f2a6a1a411def7d7dfe50ee057bf](https://etherscan.io/token/0x4f3afec4e5a3f2a6a1a411def7d7dfe50ee057bf)\nEthereum Mainnet | drpu | [https://etherscan.io/token/0xe30e02f049957e2a5907589e06ba646fb2c321ba](https://etherscan.io/token/0xe30e02f049957e2a5907589e06ba646fb2c321ba)\nEthereum Mainnet | echt | [https://etherscan.io/token/0x1aadead0d2e0b6d888ae1d73b11db65a8447634a](https://etherscan.io/token/0x1aadead0d2e0b6d888ae1d73b11db65a8447634a)\nEthereum Mainnet | egl | [https://etherscan.io/token/0x8f00458479ea850f584ed82881421f9d9eac6cb1](https://etherscan.io/token/0x8f00458479ea850f584ed82881421f9d9eac6cb1)\nEthereum Mainnet | elf | [https://etherscan.io/token/0xbf2179859fc6D5BEE9Bf9158632Dc51678a4100e](https://etherscan.io/token/0xbf2179859fc6D5BEE9Bf9158632Dc51678a4100e)\nEthereum Mainnet | ethos | [https://etherscan.io/token/0x5af2be193a6abca9c8817001f45744777db30756](https://etherscan.io/token/0x5af2be193a6abca9c8817001f45744777db30756)\nEthereum Mainnet | eurx | [https://etherscan.io/token/0x05ac103f68e05da35e78f6165b9082432fe64b58](https://etherscan.io/token/0x05ac103f68e05da35e78f6165b9082432fe64b58)\nEthereum Mainnet | eux | [https://etherscan.io/token/0x1b9064207e8046ec1d8e83de79380ed31283914f](https://etherscan.io/token/0x1b9064207e8046ec1d8e83de79380ed31283914f)\nEthereum Mainnet | fet | [https://etherscan.io/token/0x1d287cc25dad7ccaf76a26bc660c5f7c8e2a05bd](https://etherscan.io/token/0x1d287cc25dad7ccaf76a26bc660c5f7c8e2a05bd)\nEthereum Mainnet | fmf | [https://etherscan.io/token/0xb4d0fdfc8497aef97d3c2892ae682ee06064a2bc](https://etherscan.io/token/0xb4d0fdfc8497aef97d3c2892ae682ee06064a2bc)\nEthereum Mainnet | fun | [https://etherscan.io/token/0x419d0d8bdd9af5e606ae2232ed285aff190e711b](https://etherscan.io/token/0x419d0d8bdd9af5e606ae2232ed285aff190e711b)\nEthereum Mainnet | gbpx | [https://etherscan.io/token/0xf85ef57fcdb36d628d063fa663e61e44d35ae661](https://etherscan.io/token/0xf85ef57fcdb36d628d063fa663e61e44d35ae661)\nEthereum Mainnet | gldx | [https://etherscan.io/token/0x7d2bebd6e41b05384f0a8eb8ff228daac6f39c96](https://etherscan.io/token/0x7d2bebd6e41b05384f0a8eb8ff228daac6f39c96)\nEthereum Mainnet | gen | [https://etherscan.io/token/0x543ff227f64aa17ea132bf9886cab5db55dcaddf](https://etherscan.io/token/0x543ff227f64aa17ea132bf9886cab5db55dcaddf)\nEthereum Mainnet | gno | [https://etherscan.io/token/0x6810e776880c02933d47db1b9fc05908e5386b96](https://etherscan.io/token/0x6810e776880c02933d47db1b9fc05908e5386b96)\nEthereum Mainnet | gnt | [https://etherscan.io/token/0xa74476443119A942dE498590Fe1f2454d7D4aC0d](https://etherscan.io/token/0xa74476443119A942dE498590Fe1f2454d7D4aC0d)\nEthereum Mainnet | gusd | [https://etherscan.io/token/0x056fd409e1d7a124bd7017459dfea2f387b6d5cd](https://etherscan.io/token/0x056fd409e1d7a124bd7017459dfea2f387b6d5cd)\nEthereum Mainnet | hedg | [https://etherscan.io/token/0xf1290473e210b2108a85237fbcd7b6eb42cc654f](https://etherscan.io/token/0xf1290473e210b2108a85237fbcd7b6eb42cc654f)\nEthereum Mainnet | hold | [https://etherscan.io/token/0xD6e1401a079922469e9b965Cb090ea6fF64C6839](https://etherscan.io/token/0xD6e1401a079922469e9b965Cb090ea6fF64C6839)\nEthereum Mainnet | hot | [https://etherscan.io/token/0x6c6ee5e31d828de241282b9606c8e98ea48526e2](https://etherscan.io/token/0x6c6ee5e31d828de241282b9606c8e98ea48526e2)\nEthereum Mainnet | hst | [https://etherscan.io/token/0x554c20b7c486beee439277b4540a434566dc4c02](https://etherscan.io/token/0x554c20b7c486beee439277b4540a434566dc4c02)\nEthereum Mainnet | ht | [https://etherscan.io/token/0x6f259637dcd74c767781e37bc6133cd6a68aa161](https://etherscan.io/token/0x6f259637dcd74c767781e37bc6133cd6a68aa161)\nEthereum Mainnet | hxro | [https://etherscan.io/token/0x4bd70556ae3f8a6ec6c4080a0c327b24325438f3](https://etherscan.io/token/0x4bd70556ae3f8a6ec6c4080a0c327b24325438f3)\nEthereum Mainnet | hyb | [https://etherscan.io/token/0x6059f55751603ead7dc6d280ad83a7b33d837c90](https://etherscan.io/token/0x6059f55751603ead7dc6d280ad83a7b33d837c90)\nEthereum Mainnet | hydro | [https://etherscan.io/token/0xebbdf302c940c6bfd49c6b165f457fdb324649bc](https://etherscan.io/token/0xebbdf302c940c6bfd49c6b165f457fdb324649bc)\nEthereum Mainnet | incx | [https://etherscan.io/token/0xa984a92731c088f1ea4d53b71a2565a399f7d8d5](https://etherscan.io/token/0xa984a92731c088f1ea4d53b71a2565a399f7d8d5)\nEthereum Mainnet | ind | [https://etherscan.io/token/0xf8e386eda857484f5a12e4b5daa9984e06e73705](https://etherscan.io/token/0xf8e386eda857484f5a12e4b5daa9984e06e73705)\nEthereum Mainnet | isr | [https://etherscan.io/token/0xd4a293ae8bb9e0be12e99eb19d48239e8c83a136](https://etherscan.io/token/0xd4a293ae8bb9e0be12e99eb19d48239e8c83a136)\nEthereum Mainnet | jpyx | [https://etherscan.io/token/0x743c79f88dcadc6e7cfd7fa2bd8e2bfc68dae053](https://etherscan.io/token/0x743c79f88dcadc6e7cfd7fa2bd8e2bfc68dae053)\nEthereum Mainnet | kin | [https://etherscan.io/token/0x818fc6c2ec5986bc6e2cbf00939d90556ab12ce5](https://etherscan.io/token/0x818fc6c2ec5986bc6e2cbf00939d90556ab12ce5)\nEthereum Mainnet | knc | [https://etherscan.io/token/0xdd974d5c2e2928dea5f71b9825b8b646686bd200](https://etherscan.io/token/0xdd974d5c2e2928dea5f71b9825b8b646686bd200)\nEthereum Mainnet | kze | [https://etherscan.io/token/0x8de67d55c58540807601dbf1259537bc2dffc84d](https://etherscan.io/token/0x8de67d55c58540807601dbf1259537bc2dffc84d)\nEthereum Mainnet | lba | [https://etherscan.io/token/0xfe5f141bf94fe84bc28ded0ab966c16b17490657](https://etherscan.io/token/0xfe5f141bf94fe84bc28ded0ab966c16b17490657)\nEthereum Mainnet | lgo | [https://etherscan.io/token/0x123ab195dd38b1b40510d467a6a359b201af056f](https://etherscan.io/token/0x123ab195dd38b1b40510d467a6a359b201af056f)\nEthereum Mainnet | lion | [https://etherscan.io/token/0x2167fb82309cf76513e83b25123f8b0559d6b48f](https://etherscan.io/token/0x2167fb82309cf76513e83b25123f8b0559d6b48f)\nEthereum Mainnet | link | [https://etherscan.io/token/0x514910771af9ca656af840dff83e8264ecf986ca](https://etherscan.io/token/0x514910771af9ca656af840dff83e8264ecf986ca)\nEthereum Mainnet | lnc | [https://etherscan.io/token/0x6BEB418Fc6E1958204aC8baddCf109B8E9694966](https://etherscan.io/token/0x6BEB418Fc6E1958204aC8baddCf109B8E9694966)\nEthereum Mainnet | mco | [https://etherscan.io/token/0xb63b606ac810a52cca15e44bb630fd42d8d1d83d](https://etherscan.io/token/0xb63b606ac810a52cca15e44bb630fd42d8d1d83d)\nEthereum Mainnet | mdx | [https://etherscan.io/token/0x9d03393d297e42c135625d450c814892505f1a84](https://etherscan.io/token/0x9d03393d297e42c135625d450c814892505f1a84)\nEthereum Mainnet | met | [https://etherscan.io/token/0xa3d58c4e56fedcae3a7c43a725aee9a71f0ece4e](https://etherscan.io/token/0xa3d58c4e56fedcae3a7c43a725aee9a71f0ece4e)\nEthereum Mainnet | mfg | [https://etherscan.io/token/0x6710c63432a2de02954fc0f851db07146a6c0312](https://etherscan.io/token/0x6710c63432a2de02954fc0f851db07146a6c0312)\nEthereum Mainnet | mft | [https://etherscan.io/token/0xdf2c7238198ad8b389666574f2d8bc411a4b7428](https://etherscan.io/token/0xdf2c7238198ad8b389666574f2d8bc411a4b7428)\nEthereum Mainnet | mkr | [https://etherscan.io/token/0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2](https://etherscan.io/token/0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2)\nEthereum Mainnet | mtl | [https://etherscan.io/token/0xF433089366899D83a9f26A773D59ec7eCF30355e](https://etherscan.io/token/0xF433089366899D83a9f26A773D59ec7eCF30355e)\nEthereum Mainnet | nexo | [https://etherscan.io/token/0xb62132e35a6c13ee1ee0f84dc5d40bad8d815206](https://etherscan.io/token/0xb62132e35a6c13ee1ee0f84dc5d40bad8d815206)\nEthereum Mainnet | neu | [https://etherscan.io/token/0xa823e6722006afe99e91c30ff5295052fe6b8e32](https://etherscan.io/token/0xa823e6722006afe99e91c30ff5295052fe6b8e32)\nEthereum Mainnet | nmr | [https://etherscan.io/token/0x1776e1F26f98b1A5dF9cD347953a26dd3Cb46671](https://etherscan.io/token/0x1776e1F26f98b1A5dF9cD347953a26dd3Cb46671)\nEthereum Mainnet | npxs | [https://etherscan.io/token/0xa15c7ebe1f07caf6bff097d8a589fb8ac49ae5b3](https://etherscan.io/token/0xa15c7ebe1f07caf6bff097d8a589fb8ac49ae5b3)\nEthereum Mainnet | nzdx | [https://etherscan.io/token/0x6871799a4866bb9068b36b7a9bb93475ac77ac5d](https://etherscan.io/token/0x6871799a4866bb9068b36b7a9bb93475ac77ac5d)\nEthereum Mainnet | omg | [https://etherscan.io/token/0xd26114cd6EE289AccF82350c8d8487fedB8A0C07](https://etherscan.io/token/0xd26114cd6EE289AccF82350c8d8487fedB8A0C07)\nEthereum Mainnet | opt | [https://etherscan.io/token/0xde8893346ce8052a02606b62d13b142648e062dd](https://etherscan.io/token/0xde8893346ce8052a02606b62d13b142648e062dd)\nEthereum Mainnet | orbs | [https://etherscan.io/token/0xff56cc6b1e6ded347aa0b7676c85ab0b3d08b0fa](https://etherscan.io/token/0xff56cc6b1e6ded347aa0b7676c85ab0b3d08b0fa)\nEthereum Mainnet | pay | [https://etherscan.io/token/0xB97048628DB6B661D4C2aA833e95Dbe1A905B280](https://etherscan.io/token/0xB97048628DB6B661D4C2aA833e95Dbe1A905B280)\nEthereum Mainnet | pax | [https://etherscan.io/token/0x8e870d67f660d95d5be530380d0ec0bd388289e1](https://etherscan.io/token/0x8e870d67f660d95d5be530380d0ec0bd388289e1)\nEthereum Mainnet | pdata | [https://etherscan.io/token/0x0db03b6cde0b2d427c64a04feafd825938368f1f](https://etherscan.io/token/0x0db03b6cde0b2d427c64a04feafd825938368f1f)\nEthereum Mainnet | plc | [https://etherscan.io/token/0xdf99c7f9e0eadd71057a801055da810985df38bd](https://etherscan.io/token/0xdf99c7f9e0eadd71057a801055da810985df38bd)\nEthereum Mainnet | plx | [https://etherscan.io/token/0x8d682bc7ad206e54055c609ea1d4717caab665d0](https://etherscan.io/token/0x8d682bc7ad206e54055c609ea1d4717caab665d0)\nEthereum Mainnet | poly | [https://etherscan.io/token/0x9992ec3cf6a55b00978cddf2b27bc6882d88d1ec](https://etherscan.io/token/0x9992ec3cf6a55b00978cddf2b27bc6882d88d1ec)\nEthereum Mainnet | powr | [https://etherscan.io/token/0x595832f8fc6bf59c85c527fec3740a1b7a361269](https://etherscan.io/token/0x595832f8fc6bf59c85c527fec3740a1b7a361269)\nEthereum Mainnet | ppt | [https://etherscan.io/token/0xd4fa1460f537bb9085d22c7bccb5dd450ef28e3a](https://etherscan.io/token/0xd4fa1460f537bb9085d22c7bccb5dd450ef28e3a)\nEthereum Mainnet | prdx | [https://etherscan.io/token/0xe17900f23b7ebb2791f25f1eaa63d8f5e603e9a5](https://etherscan.io/token/0xe17900f23b7ebb2791f25f1eaa63d8f5e603e9a5)\nEthereum Mainnet | pro | [https://etherscan.io/token/0x9041fe5b3fdea0f5e4afdc17e75180738d877a01](https://etherscan.io/token/0x9041fe5b3fdea0f5e4afdc17e75180738d877a01)\nEthereum Mainnet | qash | [https://etherscan.io/token/0x618e75ac90b12c6049ba3b27f5d5f8651b0037f6](https://etherscan.io/token/0x618e75ac90b12c6049ba3b27f5d5f8651b0037f6)\nEthereum Mainnet | qrl | [https://etherscan.io/token/0x697beac28b09e122c4332d163985e8a73121b97f](https://etherscan.io/token/0x697beac28b09e122c4332d163985e8a73121b97f)\nEthereum Mainnet | qsp | [https://etherscan.io/token/0x99ea4db9ee77acd40b119bd1dc4e33e1c070b80d](https://etherscan.io/token/0x99ea4db9ee77acd40b119bd1dc4e33e1c070b80d)\nEthereum Mainnet | qvt | [https://etherscan.io/token/0x1183f92a5624d68e85ffb9170f16bf0443b4c242](https://etherscan.io/token/0x1183f92a5624d68e85ffb9170f16bf0443b4c242)\nEthereum Mainnet | rdn | [https://etherscan.io/token/0x255aa6df07540cb5d3d297f0d0d4d84cb52bc8e6](https://etherscan.io/token/0x255aa6df07540cb5d3d297f0d0d4d84cb52bc8e6)\nEthereum Mainnet | reb | [https://etherscan.io/token/0x61383ac89988b498df5363050ff07fe5c52ecdda](https://etherscan.io/token/0x61383ac89988b498df5363050ff07fe5c52ecdda)\nEthereum Mainnet | rebl | [https://etherscan.io/token/0x5f53f7a8075614b699baad0bc2c899f4bad8fbbf](https://etherscan.io/token/0x5f53f7a8075614b699baad0bc2c899f4bad8fbbf)\nEthereum Mainnet | rep | [https://etherscan.io/token/0x1985365e9f78359a9b6ad760e32412f4a445e862](https://etherscan.io/token/0x1985365e9f78359a9b6ad760e32412f4a445e862)\nEthereum Mainnet | rby | [https://etherscan.io/token/0xf7705dee19a63e0bc1a240f723c5c0f570c78572](https://etherscan.io/token/0xf7705dee19a63e0bc1a240f723c5c0f570c78572)\nEthereum Mainnet | rfr | [https://etherscan.io/token/0xd0929d411954c47438dc1d871dd6081f5c5e149c](https://etherscan.io/token/0xd0929d411954c47438dc1d871dd6081f5c5e149c)\nEthereum Mainnet | roobee | [https://etherscan.io/token/0xa31b1767e09f842ecfd4bc471fe44f830e3891aa](https://etherscan.io/token/0xa31b1767e09f842ecfd4bc471fe44f830e3891aa)\nEthereum Mainnet | rubx | [https://etherscan.io/token/0xd6d69a3d5e51dbc2636dc332338765fcca71d5d5](https://etherscan.io/token/0xd6d69a3d5e51dbc2636dc332338765fcca71d5d5)\nEthereum Mainnet | salt | [https://etherscan.io/token/0x4156D3342D5c385a87D264F90653733592000581](https://etherscan.io/token/0x4156D3342D5c385a87D264F90653733592000581)\nEthereum Mainnet | shk | [https://etherscan.io/token/0xebe4a49df7885d015329c919bf43e6460a858f1e](https://etherscan.io/token/0xebe4a49df7885d015329c919bf43e6460a858f1e)\nEthereum Mainnet | shr | [https://etherscan.io/token/0xee5fe244406f35d9b4ddb488a64d51456630befc](https://etherscan.io/token/0xee5fe244406f35d9b4ddb488a64d51456630befc)\nEthereum Mainnet | slot | [https://etherscan.io/token/0xaee7474c3713ece228aa5ec43c89c708f2ec7ed2](https://etherscan.io/token/0xaee7474c3713ece228aa5ec43c89c708f2ec7ed2)\nEthereum Mainnet | slvx | [https://etherscan.io/token/0x8e4d222dbd4f8f9e7c175e77d6e71715c3da78e0](https://etherscan.io/token/0x8e4d222dbd4f8f9e7c175e77d6e71715c3da78e0)\nEthereum Mainnet | snov | [https://etherscan.io/token/0xbdc5bac39dbe132b1e030e898ae3830017d7d969](https://etherscan.io/token/0xbdc5bac39dbe132b1e030e898ae3830017d7d969)\nEthereum Mainnet | snt | [https://etherscan.io/token/0x744d70fdbe2ba4cf95131626614a1763df805b9e](https://etherscan.io/token/0x744d70fdbe2ba4cf95131626614a1763df805b9e)\nEthereum Mainnet | spo | [https://etherscan.io/token/0x89eafa06d99f0a4d816918245266800c9a0941e0](https://etherscan.io/token/0x89eafa06d99f0a4d816918245266800c9a0941e0)\nEthereum Mainnet | srnt | [https://etherscan.io/token/0xbc7942054f77b82e8a71ace170e4b00ebae67eb6](https://etherscan.io/token/0xbc7942054f77b82e8a71ace170e4b00ebae67eb6)\nEthereum Mainnet | storj | [https://etherscan.io/token/0xb64ef51c888972c908cfacf59b47c1afbc0ab8ac](https://etherscan.io/token/0xb64ef51c888972c908cfacf59b47c1afbc0ab8ac)\nEthereum Mainnet | storm | [https://etherscan.io/token/0xd0a4b8946cb52f0661273bfbc6fd0e0c75fc6433](https://etherscan.io/token/0xd0a4b8946cb52f0661273bfbc6fd0e0c75fc6433)\nEthereum Mainnet | taud | [https://etherscan.io/token/0x00006100f7090010005f1bd7ae6122c3c2cf0090](https://etherscan.io/token/0x00006100f7090010005f1bd7ae6122c3c2cf0090)\nEthereum Mainnet | ten | [https://etherscan.io/token/0xdd16ec0f66e54d453e6756713e533355989040e4](https://etherscan.io/token/0xdd16ec0f66e54d453e6756713e533355989040e4)\nEthereum Mainnet | tenx | [https://etherscan.io/token/0x515ba0a2e286af10115284f151cf398688a69170](https://etherscan.io/token/0x515ba0a2e286af10115284f151cf398688a69170)\nEthereum Mainnet | tiox | [https://etherscan.io/token/0xd947b0ceab2a8885866b9a04a06ae99de852a3d4](https://etherscan.io/token/0xd947b0ceab2a8885866b9a04a06ae99de852a3d4)\nEthereum Mainnet | tnt | [https://etherscan.io/token/0x08f5a9235b08173b7569f83645d2c7fb55e8ccd8](https://etherscan.io/token/0x08f5a9235b08173b7569f83645d2c7fb55e8ccd8)\nEthereum Mainnet | trst | [https://etherscan.io/token/0xcb94be6f13a1182e4a4b6140cb7bf2025d28e41b](https://etherscan.io/token/0xcb94be6f13a1182e4a4b6140cb7bf2025d28e41b)\nEthereum Mainnet | tkx | [https://etherscan.io/token/0x667102bd3413bfeaa3dffb48fa8288819e480a88](https://etherscan.io/token/0x667102bd3413bfeaa3dffb48fa8288819e480a88)\nEthereum Mainnet | tusd | [https://etherscan.io/token/0x8dd5fbce2f6a956c3022ba3663759011dd51e73e](https://etherscan.io/token/0x8dd5fbce2f6a956c3022ba3663759011dd51e73e)\nEthereum Mainnet | ukg | [https://etherscan.io/token/0x24692791bc444c5cd0b81e3cbcaba4b04acd1f3b](https://etherscan.io/token/0x24692791bc444c5cd0b81e3cbcaba4b04acd1f3b)\nEthereum Mainnet | upbtc | [https://etherscan.io/token/0xc7461b398005e50bcc43c8e636378c6722e76c01](https://etherscan.io/token/0xc7461b398005e50bcc43c8e636378c6722e76c01)\nEthereum Mainnet | upp | [https://etherscan.io/token/0xc86d054809623432210c107af2e3f619dcfbf652](https://etherscan.io/token/0xc86d054809623432210c107af2e3f619dcfbf652)\nEthereum Mainnet | upt | [https://etherscan.io/token/0x6ca88cc8d9288f5cad825053b6a1b179b05c76fc](https://etherscan.io/token/0x6ca88cc8d9288f5cad825053b6a1b179b05c76fc)\nEthereum Mainnet | upusd | [https://etherscan.io/token/0x86367c0e517622dacdab379f2de389c3c9524345](https://etherscan.io/token/0x86367c0e517622dacdab379f2de389c3c9524345)\nEthereum Mainnet | uqc | [https://etherscan.io/token/0xd01db73e047855efb414e6202098c4be4cd2423b](https://etherscan.io/token/0xd01db73e047855efb414e6202098c4be4cd2423b)\nEthereum Mainnet | usdc | [https://etherscan.io/token/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48](https://etherscan.io/token/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48)\nEthereum Mainnet | usdt | [https://etherscan.io/token/0xdac17f958d2ee523a2206206994597c13d831ec7](https://etherscan.io/token/0xdac17f958d2ee523a2206206994597c13d831ec7)\nEthereum Mainnet | usdx | [https://etherscan.io/token/0x4e3856c37b2fe7ff2fe34510cda82a1dffd63cd0](https://etherscan.io/token/0x4e3856c37b2fe7ff2fe34510cda82a1dffd63cd0)\nEthereum Mainnet | usx | [https://etherscan.io/token/0xe72f4c4ff9d294fc34829947e4371da306f90465](https://etherscan.io/token/0xe72f4c4ff9d294fc34829947e4371da306f90465)\nEthereum Mainnet | vdx | [https://etherscan.io/token/0x91e64f39c1fe14492e8fdf5a8b0f305bd218c8a1](https://etherscan.io/token/0x91e64f39c1fe14492e8fdf5a8b0f305bd218c8a1)\nEthereum Mainnet | wax | [https://etherscan.io/token/0x39Bb259F66E1C59d5ABEF88375979b4D20D98022](https://etherscan.io/token/0x39Bb259F66E1C59d5ABEF88375979b4D20D98022)\nEthereum Mainnet | wht | [https://etherscan.io/token/0xae8d4da01658dd0ac118dde60f5b78042d0da7f2](https://etherscan.io/token/0xae8d4da01658dd0ac118dde60f5b78042d0da7f2)\nEthereum Mainnet | wtc | [https://etherscan.io/token/0xb7cb1c96db6b22b0d3d9536e0108d062bd488f74](https://etherscan.io/token/0xb7cb1c96db6b22b0d3d9536e0108d062bd488f74)\nEthereum Mainnet | xrl | [https://etherscan.io/token/0xb24754be79281553dc1adc160ddf5cd9b74361a4](https://etherscan.io/token/0xb24754be79281553dc1adc160ddf5cd9b74361a4)\nEthereum Mainnet | zco | [https://etherscan.io/token/0x2008e3057bd734e10ad13c9eae45ff132abc1722](https://etherscan.io/token/0x2008e3057bd734e10ad13c9eae45ff132abc1722)\nEthereum Mainnet | zil | [https://etherscan.io/token/0x05f4a42e251f2d52b8ed15e9fedaacfcef1fad27](https://etherscan.io/token/0x05f4a42e251f2d52b8ed15e9fedaacfcef1fad27)\nEthereum Mainnet | zrx | [https://etherscan.io/token/0xe41d2489571d322189246dafa5ebde1f4699f498](https://etherscan.io/token/0xe41d2489571d322189246dafa5ebde1f4699f498)\n\n### Wallet functionality\n\nERC20 tokens are stored in Ethereum wallets. As a result certain wallet functionality available to other coins is not available to supported tokens. It is not possible to create wallets, create/list/get receive addresses, or share wallets for ERC20 tokens. All these functions will have to be done with the coin set to eth or teth since that is the actual coin type being used. In order to retrieve all token details associated with an Ethereum wallet, such as balance, pending approvals, policies, and webhooks, set the \"allTokens\" parameter to true with the following calls:\n\n 1. [Get Wallet](#get-wallet)\n 2. [List Wallets](#list-wallets)\n 3. [List Pending Approvals](#list-pending-approvals)\n 4. [List Wallet Webhooks](#list-wallet-webhooks)\n 5. [List Transfers](#list-wallet-transfers)\n 6. [List Transactions](#list-wallet-transactions)\n 7. [Add Wallet Webhook](#add-wallet-webhook)\n\n### Keychains\n\nERC20 tokens do not have a direct association with keys or keychains. Instead, all tokens share the same keys/keychains which belong to the Ethereum wallet.\n\n### Balances\n\nEach token has a different divisibility factor which is specified in the token contract. This value is usually `1,000,000,000,000,000,000` (<code>10<sup>18</sup></code>) units, but can vary from token to token. Please check the [client constants](#client-constants) to see the number of decimal places the token supports.\n\nOnly the string balance properties are available, which are `balanceString`, `confirmedBalanceString`, and `spendableBalanceString`.\n\n### Transactions\n\nBitGo's Ethereum multisig contract currently only supports one sender and one recipient. That means that the `sendMany` call will only accept one recipient for tokens.\n\n### ERC20 Tokens Webhooks\n\nBy setting the \"allTokens\" parameter to true, a generic webhook is created which will trigger on all ERC20 token and ETH transactions.\nIt will send an http request to your webhook url and specify whether it is Ethereum or token using the field \"coin\". Here's an example response for a test token called \"terc\".\n\n{\"hash\":\"0x3e00ae17961d3d42ae722085904ba84e63a32b005ff46afff28b7c9c76f63291\",\n\"transfer\":\"5b612d25c9067f2a1db11a15f165989e\",\n\"coin\":\"terc\",\n\"type\":\"transfer\",\n\"state\":\"confirmed\",\n\"wallet\":\"5a13adcab70f2c284fdd9682db5e6d64\"}\n\nTo get additional details about this transfer, you will then need to get the transfer details using the token name and transfer id.\nFor the above transfer you'd need to call the following URL /terc/wallet/5a13adcab70f2c284fdd9682db5e6d64/transfer/5b612d25c9067f2a1db11a15f165989e to check the amount transferred and other details.\n\nNote: A transaction that sends both Ethereum and an ERC20 token (or multiple token types) will cause one webhook notification for each.\nA transaction that sends a token not supported by BitGo (those listed above) will not cause a webhook notification.\n"
},
{
"name": "Config"
},
{
"name": "Enterprise"
},
{
"name": "Expected deposit"
},
{
"name": "Express"
},
{
"name": "Federation",
"description": "Implementation of the [Stellar Federation protocol.](https://www.stellar.org/developers/guides/concepts/federation.html)\n\nThe Stellar Federation protocol maps Stellar addresses to more information about a given user. It’s a way for Stellar client software to resolve email-like addresses such as test*bitgo.com into account IDs like: GCTTCPH4IIDK7P72FFAEJ3ZFN6WDHJH6GGMRPHPM56ZWGIQ7B3XTIJAM.\n"
},
{
"name": "Key"
},
{
"name": "Overview",
"description": "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**.\n\nThe BitGo SDK enables the following:\n\n* Creation of multi-signature wallets\n* Wallet balance and transaction listing\n* Transaction creation and signing\n* Transaction monitoring and notifications\n* Secure user authentication\n* Multi-user workflows for use in enterprise environments\n* Policies and spending limits\n\nThis is the latest documentation for Platform V2, and is generated from\n[OpenAPI 3.0](https://swagger.io/docs/specification/about/) schema. OpenAPI\ntechnology provides improved validation of client requests, and more\nconsistency between the API documentation and server-side implementation of\nAPI endpoints. The [original V2 API docs](/api/v2/slate) and [V1 docs](/api)\nare still available for your reference.\n\nLegacy users may also refer to the [V1 Bitcoin API](https://www.bitgo.com/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.\n\n## Multi-Signature Wallets\n\nThe primary advantage of multi-signature wallets is the ability for multiple machines and people to work together to approve a given transaction.\nWithout multiple signatures on a transaction, all credentials to approve a transaction must reside with a single person on a machine.\nIf 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.\n\nBitGo'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.\n\nFor more information, please read the <a href=\"https://www.bitgo.com/info/p2sh_safe_address\" target=\"_new\">BitGo Whitepaper</a>.\n\n## User Authentication\n\nAll calls to endpoints that require authentication must pass the client access\ntoken via the `Authorization` HTTP header. The format of this header is\n`Authorization: Bearer <TOKEN>`. Here's an example that uses\n[HTTPie](https://httpie.org/) to call the\n[Get session API](#operation/user.getsession) from the command line:\n\n```bash\n$ http -v get https://test.bitgo.com/api/v2/user/me Authorization:\"Bearer $TEST_TOKEN\"\nGET /api/v2/user/me HTTP/1.1\nAccept: */*\nAccept-Encoding: gzip, deflate\nAuthorization: Bearer v2x83...\nConnection: keep-alive\nHost: test.bitgo.com\nUser-Agent: HTTPie/1.0.0\n\nHTTP/1.1 200 OK\n...\n```\n\nYou can create an access token in the \"Developer Options\" tab of\nthe web UI, under \"User Settings.\" An access token can limit access\nin several ways:\n\n* Expiration date\n* Allowed operations\n* Allowed client IP addresses\n\n### Security note\n\nBitGo's SDK and Express App secures tokens using our\n[Auth V2](https://blog.bitgo.com/bitgo-public-key-pinning-1f22f9176958)\nprotocol, which does not send the access token over the wire. For this\nreason, we recommend that API requests from 3rd party clients should\nbe proxied through BitGo Express.\n\n## Software Development Kit\n\nThe 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.\nSeveral sensitive operations, such as the creation of user private keys and signing of transactions, must to be performed client-side.\n\nFor this reason, we provide and recommend the use of our <a href=\"https://github.com/BitGo/BitGoJS\" target=\"_new\">Software Development Kit (SDK)</a>, which implements these client-side wallet features and interfaces with our APIs.\n\nCurrently, our SDK is available in JavaScript and runs in either Node.js or a browser.\nIf your application does not use native JavaScript, you may refer to the [BitGo Express REST API guide](#bitgo-express-rest-api), which offers the same feature set via a local server daemon.\n\nInstalling the JavaScript SDK (via npm)\n\n```shell\nnpm install bitgo --save\n```\n\nInstalling the JavaScript SDK (via Github)\n\n* Visit our <a href=\"https://github.com/BitGo/BitGoJS\" target=\"_new\">open-source SDK page</a> on Github.\n* Install git and nodejs/npm (recommended to follow the examples).\n* Clone our repository locally by running the command: `git clone git@github.com:BitGo/BitGoJS.git`\n* In the BitGoJS directory, install dependencies using: `npm install`\n* Check out the `examples` directory to see how you can use the SDK! In the example directory, run\n\n```shell\nnode auth.js <testusername> <testpassword> 0000000\n```\n\nTo initialize your environment and authenticate, use the following code:\n\n```javascript\nconst BitGoJS = require('bitgo');\n// Read the user authentication section to get your API access token\nconst bitgo = new BitGoJS.BitGo({ env: 'test', accessToken: process.env.ACCESS_TOKEN });\nlet coin = bitgo.coin('tbtc');\n```\n\n## BitGo Express REST API\n\nThe BitGo Express REST API is a lightweight service for developers who want\nto use the BitGo service, but are developing in a language other than\nJavaScript.\n\nBitGo Express runs as a service in your own data center, and handles the\nclient-side operations involving your own keys, such as partially signing\ntransactions before submitting them to BitGo.\nThis ensures your keys never leave your network, and are never seen by BitGo.\nBitGo Express can also proxy the standard BitGo REST APIs, providing a\nunified interface to BitGo through a single REST API.\n\nTo use BitGo Express:\n\n* Install [BitGoJS](https://github.com/BitGo/BitGoJS/) globally:\n```shell\nnpm install -g bitgo\n```\n* Run `node bitgo-express` from the globally installed package:\n```shell\nnpm explore -g bitgo -- node bin/bitgo-express --debug --port 3080 --env test --bind localhost\n```\n\n* Make **all** BitGo REST API calls to the machine on which bitgo-express is running.\nBitGo Express will either handle the request itself or proxy it to the BitGo service.\n\nYou can use **curl** to verify that BitGo Express is running:\n\n```shell\nBITGO_EXPRESS_HOST='localhost'\ncurl http://$BITGO_EXPRESS_HOST:3080/api/v2/ping\n```\n\n**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`.\n\n### BitGo Express Proxy Support\n\nBitGo Express can also make requests to BitGo via a proxy. This can be done by setting the `BITGO_USE_PROXY` environment variable to the URI where your proxy is listening.\n\nFor 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:\n\n```shell\nBITGO_USE_PROXY=\"socks://192.0.2.1:12000\" npm explore -g bitgo -- bin/bitgo-express --debug --port 3080 --env test --bind localhost\n```\n\nBitGo Express currently supports the following proxy protocols:\n\n* HTTP\n* HTTPS\n* SOCKSv4\n* SOCKSv5\n* PAC\n\n## Environments\n\nBitGo has two separate environments available for development and production. For security reasons, all BitGo API requests are made using TLS over HTTPS.\n\n### Test Environment\n\nThe 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.\nYou will need to create accounts at <a href=\"https://test.bitgo.com/\" target=\"_new\">test.bitgo.com</a>.\n\n* BitGo Test Site: https://test.bitgo.com/\n* Test Environment API: https://test.bitgo.com/api/v2\n\nIn the test environment, you can use `0000000` in place of the OTP when authenticating.\n\nThis environment is connected to the TestNet networks of various [digital currencies](#coin-digital-currency-support) we support. Tokens on these networks can be obtained from faucets and do not represent real money.\n\n### Production Environment\nThe BitGo production endpoint is live and used by partners and our own web application on www.bitgo.com.\n\n* Production Site: https://www.bitgo.com/\n* Production API: https://www.bitgo.com/api/v2\n\nTo 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.\n\n## Coin / Digital Currency Support\n\nBitGo Platform V2 supports a variety of digital currencies, with more being added every quarter.\n\nTo select the coin or token:\n\n```javascript\nvar bitgo = new BitGoJS.BitGo({ env: 'test', accessToken: process.env.ACCESS_TOKEN });\nvar coin = bitgo.coin('btc');\n```\n\n(replace btc with your desired coin identifier)\n\nIdentifier | Digital Currency | Family | BitGo Environment | Release status\n--------- | ---- | -------- | ------ | ------\nbtc | Bitcoin | UTXO-based | Production | General availability\nbch | Bitcoin Cash | UTXO-based | Production | General availability\nbsv | Bitcoin SV | UTXO-based | Production | General availability\nbtg | Bitcoin Gold | UTXO-based | Production | General availability\ndash | Dash | UTXO-based | Production | General availability\neth | Ethereum | Account | Production | Enterprise access\nltc | Litecoin | UTXO-based | Production | General availability\nrmg | Royal Mint Gold | UTXO-based | Production | Enterprise access\nxlm | XLM | Account | Production | General availability\nxrp | XRP | Account | Production | Enterprise access\nzec | Zcash | UTXO-based | Production | General availability\naion | AION ERC20 token | Account | Production | Enterprise access\namn | Amon ERC20 token | Account | Production | Enterprise access\nana | ANA ERC20 token | Account | Production | Enterprise access\nant | Aragon ERC20 token | Account | Production | Enterprise access\nappc | AppCoins ERC20 token | Account | Production | Enterprise access\nast | AirSwap ERC20 token | Account | Production | Enterprise access\naudx | eToro Australian Dollar ERC20 token | Account | Production | Enterprise access\nbat | Basic Attention Token ERC20 token | Account | Production | Enterprise access\nbbx | BBX ERC20 token | Account | Production | Enterprise access\nbcap | BCAP ERC20 token | Account | Production | Enterprise access\nbid | Blockbid ERC20 token | Account | Production | Enterprise access\nbnt | Bancor ERC20 token | Account | Production | Enterprise access\nbnty | Bounty0x ERC20 token | Account | Production | Enterprise access\nbtt | Blocktrade ERC20 token | Account | Production | Enterprise access\nbtu | BTU Protocol ERC20 token | Account | Production | Enterprise access\nbrd | Bread ERC20 token | Account | Production | Enterprise access\ncadx | eToro Canadian Dollar ERC20 token | Account | Production | Enterprise access\ncag | Change ERC20 token | Account | Production | Enterprise access\ncbc | CashBet Coin ERC20 token | Account | Production | Enterprise access\ncdag | CannDollar ERC20 token | Account | Production | Enterprise access\ncdt | Blox ERC20 token | Account | Production | Enterprise access\ncel | Celsius ERC20 token | Account | Production | Enterprise access\ncgld | Coineru Gold ERC20 token | Account | Production | Enterprise access\nchfx | eToro Swiss Frank ERC20 token | Account | Production | Enterprise access\nchsb | SwissBorg ERC20 token | Account | Production | Enterprise access\ncln | Colu Local Network ERC20 token | Account | Production | Enterprise access\ncnyx | eToro Chinese Yuan ERC20 token | Account | Production | Enterprise access\ncpay | Cryptopay ERC20 token | Account | Production | Enterprise access\ncplt | Coineru Platinum ERC20 token | Account | Production | Enterprise access\ncqx | Coinquista Coin ERC20 token | Account | Production | Enterprise access\ncro | Crypto.com Chain ERC20 token | Account | Production | Enterprise access\ncslv | Coineru Silver ERC20 token | Account | Production | Enterprise access\ncvc | Civic ERC20 token | Account | Production | Enterprise access\ndai | Dai ERC20 token | Account | Production | Enterprise access\ndent | Dent ERC20 token | Account | Production | Enterprise access\ndgx | Digix ERC20 token | Account | Production | Enterprise access\ndrpu | DRP Utility ERC20 token | Account | Production | Enterprise access\necht | eChat ERC20 token | Account | Production | Enterprise access\negl | eGold ERC20 token | Account | Production | Enterprise access\nelf | Aelf ERC20 token | Account | Production | Enterprise access\nethos | Ethos ERC20 token | Account | Production | Enterprise access\neurx | eToro Euro ERC20 token | Account | Production | Enterprise access\neux | EUR Stable Token ERC20 token | Account | Production | Enterprise access\nfet | Fetch ERC20 token | Account | Production | Enterprise access\nfmf | Formosa Financial ERC20 token | Account | Production | Enterprise access\nfun | FunFair ERC20 token | Account | Production | Enterprise access\ngbpx | eToro Pound Sterling ERC20 token | Account | Production | Enterprise access\ngen | DAOstack ERC20 token | Account | Production | Enterprise access\ngldx | eToro Gold ERC20 token | Account | Production | Enterprise access\ngno | Gnosis ERC20 token | Account | Production | Enterprise access\ngnt | Golem ERC20 token | Account | Production | Enterprise access\ngusd | Gemini Dollar ERC20 token | Account | Production | Enterprise access\nhedg | Huobi Token ERC20 token | Account | Production | Enterprise access\nhold | Hold ERC20 token | Account | Production | Enterprise access\nhst | Decision Token ERC20 token | Account | Production | Enterprise access\nht | Huobi Token ERC20 token | Account | Production | Enterprise access\nhxro | Hxro ERC20 token | Account | Production | Enterprise access\nhyb | Hybrid Block ERC20 token | Account | Production | Enterprise access\nhydro | Hydro ERC20 token | Account | Production | Enterprise access\nincx | InternationalCryptoX ERC20 token | Account | Production | Enterprise access\nind | Indorse ERC20 token | Account | Production | Enterprise access\nisr | Insureum ERC20 token | Account | Production | Enterprise access\njpyx | eToro Japanese Yen ERC20 token | Account | Production | Enterprise access\nkin | Kin ERC20 token | Account | Production | Enterprise access\nknc | Kyber Network ERC20 token | Account | Production | Enterprise access\nkze | Almeela ERC20 token | Account | Production | Enterprise access\nlba | Cred ERC20 token | Account | Production | Enterprise acces\nlgo | LGO Exchange ERC20 token | Account | Production | Enterprise access\nlion | CoinLion ERC20 token | Account | Production | Enterprise access\nlnc | Linker Coin ERC20 token | Account | Production | Enterprise access\nmco | Crypto.com ERC20 token | Account | Production | Enterprise access\nmdx | Mandala ERC20 token | Account | Production | Enterprise access\nmfg | SyncFab ERC20 token | Account | Production | Enterprise access\nmkr | Maker ERC20 token | Account | Production | Enterprise access\nmtl | Metal ERC20 token | Account | Production | Enterprise access\nnexo | Nexo ERC20 token | Account | Production | Enterprise access\nneu | Neumark ERC20 token | Account | Production | Enterprise access\nnmr | Numeraire ERC20 token | Account | Production | Enterprise access\nnpxs | Pundi X ERC20 token | Account | Production | Enterprise access\nnzdx | eToro New Zealand Dollar ERC20 token | Account | Production | Enterprise access\nomg | OmiseGo ERC20 token | Account | Production | Enterprise access\nopt | OPTin Token ERC20 token | Account | Production | Enterprise access\norbs | Orbs Token ERC20 token | Account | Production | Enterprise access\npax | Paxos ERC20 token | Account | Production | Enterprise access\npay | TenX ERC20 token | Account | Production | Enterprise access\npdata | Opiria Token ERC20 token | Account | Production | Enterprise access\nplc | PlusCoin ERC20 token | Account | Production | Enterprise access\nplx | PLN Stable Token ERC20 token | Account | Production | Enterprise access\npoly | Polymath ERC20 token | Account | Production | Enterprise access\npowr | Power Ledger ERC20 token | Account | Production | Enterprise access\nppt | Populous ERC20 token | Account | Production | Enterprise access\nprdx | PRDX Token ERC20 token | Account | Production | Enterprise access\npro | Propy ERC20 token | Account | Production | Enterprise access\nqash | QASH ERC20 token | Account | Production | Enterprise access\nqrl | Quantum ERC20 token | Account | Production | Enterprise access\nqsp | Quantstamp ERC20 token | Account | Production | Enterprise access\nqvt | Qvolta ERC20 token | Account | Production | Enterprise access\nrdn | Raiden Network Token ERC20 token | Account | Production | Enterprise access\nreb | Regblo ERC20 token | Account | Production | Enterprise access\nrebl | Rebellious ERC20 token | Account | Production | Enterprise access\nrep | Augur ERC20 token | Account | Production | Enterprise access\nrfr | Refereum ERC20 token | Account | Production | Enterprise access\nroobee | ROOBEE ERC20 token | Account | Production | Enterprise access\nrubx | eToro Russian Ruble ERC20 token | Account | Production | Enterprise access\nsalt | Salt ERC20 token | Account | Production | Enterprise access\nshk | iShook ERC20 token | Account | Production | Enterprise access\nshr | ShareToken ERC20 token | Account | Production | Enterprise access\nslot | AlphaSlot ERC20 token | Account | Production | Enterprise access\nslvx | eToro Silver ERC20 token | Account | Production | Enterprise access\nsnov | Snovio ERC20 token | Account | Production | Enterprise access\nsnt | Status Network Token ERC20 token | Account | Production | Enterprise access\nspo | Sparrow Options ERC20 token | Account | Production | Enterprise access\nsrnt | Serenity ERC20 token | Account | Production | Enterprise access\nstorj | Storj ERC20 token | Account | Production | Enterprise access\nstorm | Storm ERC20 token | Account | Production | Enterprise access\ntaud | TrueAUD ERC20 token | Account | Production | Enterprise access\nten | Tokenomy ERC20 token | Account | Production | Enterprise access\ntenx | TenX Token ERC20 token | Account | Production | Enterprise access\ntiox | Trade Token X ERC20 token | Account | Production | Enterprise access\ntkx | Tokenize ERC20 token | Account | Production | Enterprise access\ntnt | Tierion ERC20 token | Account | Production | Enterprise access\ntrst | WeTrust ERC20 token | Account | Production | Enterprise access\ntusd | TrueUSD ERC20 token | Account | Production | Enterprise access\nukg | UnikoinGold ERC20 token | Account | Production | Enterprise access\nupbtc | Universal Bitcoin ERC20 token | Account | Production | Enterprise access\nupp | Sentinel Protocol ERC20 token | Account | Production | Enterprise access\nupt | Universal Protocol Token ERC20 token | Account | Production | Enterprise access\nupusd | Universal US Dollar ERC20 token | Account | Production | Enterprise access\nusdt | Tether ERC20 Token | Account | Production | Enterprise access\nusdx | eToro United States Dollar ERC20 token | Account | Production | Enterprise access\nusx | USD Stable Token ERC20 token | Account | Production | Enterprise access\nvdx | Vodi X ERC20 token | Account | Production | Enterprise access\nwax | Worldwide Asset eXchange ERC20 token | Account | Production | Enterprise access\nwht | Whatshalal ERC20 token | Account | Production | Enterprise access\nwtc | WaltonChain ERC20 token | Account | Production | Enterprise access\nxrl | Rialto ERC20 token | Account | Production | Enterprise access\nzco | Zebi Coin ERC20 token | Account | Production | Enterprise access\nzil | Zilliqa ERC20 token | Account | Production | Enterprise access\nzrx | 0x ERC20 token | Account | Production | Enterprise access\ntbtc | Bitcoin Testnet | UTXO-based | Test | General availability\ntbch | Bitcoin Cash Testnet | UTXO-based | Test | General availability\ntbsv | Bitcoin SV Testnet | UTXO-based | Test | General availability\ntdash | Dash Testnet | UTXO-based | Test | General availability\nteth | Ethereum Kovan Testnet | Account | Test | Enterprise access\nterc | Ethereum ERC20 Token Testnet | Account | Test | Enterprise access\ntest | Test Mintable ERC20 Token Testnet | Account | Test | Enterprise access\ntltc | Litecoin Testnet | UTXO-based | Test | General availability\ntrmg | Royal Mint Gold Testnet | UTXO-based | Test | Enterprise access\ntxlm | XLM Testnet | Account | Test | General availability\ntxrp | XRP Testnet | Account | Test | Enterprise access\ntzec | Zcash Testnet | UTXO-based | Test | Enterprise access\n\n<aside class=\"info\">\nPlease 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.\n</aside>\n\n## HTTP Status Codes\n\nThe BitGo API returns the following HTTP status codes:\n\nHTTP Status | Meaning | Description\n---------- | ------- | --------\n200 | Success | The operation succeeded\n201 | Created | A new object was created\n202 | Accepted | The operation succeeded, but requires approval (e.g. sending funds)\n400 | Bad Request | The client request is invalid\n401 | Unauthorized | Authentication failed (e.g. invalid token specified by the **Authorization** header)\n403 | Forbidden | Authentication failed, but the operation is not allowed\n404 | Not Found | Requested resource does not exist\n429 | Too Many Requests | Client request rate exceeded the limit\n\n## Error Handling\n\nWhen the server returns a 4xx status code, the response\nbody contains an error object with the following structure:\n\n```json\n{\n \"error\": \"invalid wallet id\",\n \"name\": \"InvalidWalletId\",\n \"requestId\": \"cjo7uw7si0buzttlmazmvthay\"\n}\n```\n\nThe **name** value is an error code that does not change. The **error**\nvalue is a human-readable message which may change.\n\n## Pagination\n\nCertain routes, such as listing wallets or transactions, may return an array of results.\n\nBy 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.\n\nTo 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.\n\n```javascript\nbitgo.coin('tbtc').wallets().list({ limit: 50 })\n.then(function(wallets) {\n // print wallet list\n console.dir(wallets);\n});\n```\n```shell\ncurl \\\n-H \"Authorization: Bearer $ACCESS_TOKEN\" \\\nhttps://test.bitgo.com/api/v2/tbtc/wallet?limit=50\n```\n> Example JSON Response:\n\n```javascript\n{\n \"coin\": \"tbtc\",\n \"wallets\": [\n {\n \"_wallet\": {\n \"id\": \"585a0860c5a04c696edd2c331ce2f346\",\n \"coin\": \"tbtc\",\n \"label\": \"V2 TBTC Test Wallet\",\n ...\n }\n },\n ...\n ],\n \"count\": 50,\n \"nextBatchPrevId\": \"590b73478c8fc40727b0c3d421ec909c\"\n}\n```\n\n## Balance Strings\n\nOn most digital currencies, the wallet, transaction and address objects all contain a `balance` property.\n\nIn 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.\n\nWhile 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.\n\n## BitGo UTXO Library\n\nThe 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.\n\n[Learn more about the BitGo UTXO Library here](https://github.com/BitGo/bitgo-utxo-lib/).\n"
},
{
"name": "Pending approval"
},
{
"name": "Policy"
},
{
"name": "Report"
},
{
"name": "Send label"
},
{
"name": "Transfer"
},
{
"name": "User"
},
{
"name": "User group"
},
{
"name": "User group member"
},
{
"name": "User group wallet"
},
{
"name": "Wallet"
},
{
"name": "Wallet share",
"description": "Sharing a wallet involves giving another user permission to use the wallet.\n\nIn order for the receiver to use the wallet, we also need to share the\nprivate key with them. Each user on BitGo creates\na public-private keypair for this purpose during their signup process.\n\nThe BitGo SDK does the following client-side to create a new wallet share:\n\n* Get the receiving user’s sharing key (a derived path of the receiver’s public key)\n* Decrypt the wallet to be shared locally\n* Re-encrypt the wallet against the public key above, so that only the receiver may decrypt it\n* Upload the encrypted keys to the BitGo service, which informs the receiver they have a pending share\n"
},
{
"name": "Webhook",
"description": "Webhooks may be setup to programmatically receive callbacks from BitGo. These may be attached to wallets (in the case of transfers), or to a block (for block notifications). Webhook notifications are triggered when the specified event occurs, such as an incoming transaction.\n\nBitGo servers will make a POST http request to the URL defined with a JSON payload, and expect a HTTP 200 OK. If a successful response is not received, BitGo will attempt to retry the webhook with an increasing delay between each retry.\n\nSince anyone on the Internet can send HTTP requests to the Webhook URL, the request body payload should not be trusted. Please verify any information sent in the webhook by fetching the transfer/block data from BitGo before processing the notification.\n\nDevelopers should take care to ensure that their application succeeds even in the cases of transient network error, or if receive the same webhook twice due to an improper acknowledgement.\n"
}
],
"x-tagGroups": [
{
"name": "Getting started",
"tags": [
"Overview"
]
},
{
"name": "API reference",
"tags": [
"Address",
"Enterprise",
"Express",
"Federation",
"Key",
"Pending approval",
"Policy",
"Send label",
"Transfer",
"User",
"Wallet",
"Wallet share",
"Webhook"
]
},
{
"name": "Addendum",
"tags": [
"Coin-specific implementation"
]
}
],
"components": {
"parameters": {
"address": {
"name": "address",
"in": "query",
"description": "Filter by address string",
"schema": {
"type": "string",
"example": "2MvrwRYBAuRtPTiZ5MyKg42Ke55W3fZJfZS",
"maxLength": 250
}
},
"addressOrId": {
"name": "addressOrId",
"in": "path",
"description": "Address or Id which will be used for information lookup",
"schema": {
"oneOf": [
{
"$ref": "#/components/parameters/userId/schema"
},
{
"type": "string"
}
]
},
"required": true
},
"auditLogType": {
"name": "type",
"in": "query",
"description": "Filter by AuditLog type",
"schema": {
"type": "array",
"items": {
"type": "string",
"enum": [
"addPolicy",
"addUser",
"addWebhook",
"approveEnterpriseUser",
"approvePolicy",
"approveTransaction",
"approveUser",
"bitgoSigned",
"changePolicy",
"createAccessToken",
"createEnterprise",
"createReset2FA",
"createSendLabel",
"createTransaction",
"createWallet",
"deleteAccessToken",
"deleteSendLabel",
"freezeEnterprise",
"freezeWallet",
"labelAddress",
"oAuthAuthorize",
"rejectEnterpriseUser",
"rejectPolicy",
"rejectTransaction",
"rejectUser",
"removePolicy",
"removeUser",
"removeWallet",
"removeWebhook",
"renameWallet",
"shareUser",
"shareUserAccept",
"shareUserCancel",
"shareUserDecline",
"supportReset2FA",
"unlabelAddress",
"updateApprovalsRequired",
"updateComment",
"updateEnterpriseUser",
"updateNotificationSettings",
"updateSendLabel",
"updateTag",
"updateWalletCoinSpecific",
"user2FAAdd",
"user2FARemove",
"userFailedLogin",
"userLogin",
"userPasswordChange",
"userPasswordReset",
"userSettingsChange",
"userSignup",
"verifyReset2FA"
]
}
}
},
"bitgoOrg": {
"name": "bitgoOrg",
"in": "query",
"description": "Filter by bitgoOrg",
"schema": {
"type": "string",
"enum": [
"BitGo Inc",
"BitGo Trust"
]
}
},
"coin": {
"name": "coin",
"in": "query",
"description": "Filter by coin",
"schema": {
"type": "string",
"example": "btc"
}
},
"coinArray": {
"name": "coin",
"in": "query",
"description": "Filter by coin",
"schema": {
"type": "array",
"items": {
"$ref": "#/components/parameters/coin/schema"
}
}
},
"coinSingleOrList": {
"name": "coin",
"in": "query",
"description": "Filter by coin(s)",
"schema": {
"type": "array",
"items": {
"$ref": "#/components/parameters/coin/schema"
}
}
},
"keyCurve": {
"name": "curve",
"in": "query",
"description": "Filter by key curve",
"schema": {
"type": "string",
"description": "The name of a cryptographic curve. `secp256k1` is used for most of our coins, `ed25519` is used for XLM",
"enum": [
"secp256k1",
"ed25519"
]
}
},
"pathId": {
"name": "id",
"in": "path",
"required": true,
"schema": {
"$ref": "#/components/parameters/userId/schema"
}
},
"pathShareId": {
"name": "shareId",
"in": "path",
"required": true,
"schema": {
"$ref": "#/components/parameters/userId/schema"
}
},
"pathWalletId": {
"name": "walletId",
"in": "path",
"required": true,
"schema": {
"$ref": "#/components/parameters/userId/schema"
}
},
"pathEnterpriseId": {
"name": "enterpriseId",
"in": "path",
"required": true,
"schema": {
"$ref": "#/components/parameters/userId/schema"
}
},
"queryEnterpriseIdOrPersonal": {
"name": "enterpriseId",
"in": "query",
"description": "Filter by Enterprise",
"schema": {
"oneOf": [
{
"$ref": "#/components/parameters/userId/schema"
},
{
"type": "string",
"enum": [
"personal"
]
}
]
}
},
"queryEnterpriseIdArray": {
"name": "enterpriseId",
"in": "query",
"description": "Filter by Enterprise",
"schema": {
"type": "array",
"items": {
"$ref": "#/components/parameters/userId/schema"
}
}
},
"pathUserId": {
"name": "userId",
"in": "path",
"required": true,
"schema": {
"$ref": "#/components/parameters/userId/schema"
}
},
"pathTransferId": {
"name": "transferId",
"in": "path",
"required": true,
"description": "a transfer or transaction id",
"example": "f5d8ee39a430901c91a5917b9f2dc19d6d1a0e9cea205b009ca73dd04470b9a5 or 585951a5df8380e0e3063e9f12345678",
"schema": {
"oneOf": [
{
"$ref": "#/components/parameters/userId/schema"
},
{
"type": "string",
"description": "The on-chain transaction id",
"example": "f5d8ee39a430901c91a5917b9f2dc19d6d1a0e9cea205b009ca73dd04470b9a5"
}
]
}
},
"pathSequenceId": {
"name": "sequenceId",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
"pathCoin": {
"name": "coin",
"in": "path",
"required": true,
"schema": {
"$ref": "#/components/parameters/coin/schema"
}
},
"pathUtxoCoin": {
"name": "coin",
"in": "path",
"required": true,
"schema": {
"type": "string",
"enum": [
"btc",
"bch",
"bsv",
"btg",
"dash",
"ltc",
"zec",
"tbtc",
"tbch",
"tbsv",
"tbtg",
"tdash",
"tltc",
"tzec"
]
}
},
"pathAddress": {
"name": "address",
"in": "path",
"required": true,
"schema": {
"$ref": "#/components/parameters/address/schema"
}
},
"pathV1WalletId": {
"name": "walletId",
"in": "path",
"required": true,
"schema": {
"$ref": "#/components/parameters/address/schema"
}
},
"pathWebhookId": {
"name": "webhookId",
"required": true,
"in": "path",
"schema": {
"$ref": "#/components/parameters/userId/schema"
}
},
"queryFederationQ": {
"name": "q",
"in": "query",
"required": true,
"example": "test*bitgo.com",
"schema": {
"type": "string"
}
},
"queryFederationType": {
"name": "type",
"in": "query",
"required": true,
"example": "name",
"schema": {
"type": "string",
"enum": [
"name",
"id"
]
}
},
"limit": {
"name": "limit",
"in": "query",
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 500,
"default": 25
},
"description": "Maximum number of results to return. If the result set is truncated, use the `nextBatchPrevId` value to get the next batch."
},
"feeRate": {
"name": "feeRate",
"in": "query",
"schema": {
"type": "integer",
"minimum": 0
}
},
"enterprise": {
"name": "enterprise",
"in": "query",
"description": "Filter by enterprise",
"schema": {
"$ref": "#/components/parameters/userId/schema"
}
},
"enterpriseId": {
"name": "enterpriseId",
"in": "query",
"description": "Filter by enterprise",
"schema": {
"$ref": "#/components/parameters/userId/schema"
}
},
"numBlocks": {
"name": "numBlocks",
"in": "query",
"schema": {
"type": "integer",
"default": 2,
"minimum": 1,
"maximum": 1000
},
"description": "Sets the target estimated number of blocks for a confirmation"
},
"maxFeeRate": {
"name": "maxFeeRate",
"in": "query",
"schema": {
"type": "integer",
"minimum": 0
}
},
"period": {
"name": "period",
"in": "query",
"schema": {
"description": "A time period for a report",
"type": "string",
"enum": [
"day",
"month",
"all"
]
},
"description": "Defines a period of time"
},
"format": {
"name": "format",
"in": "query",
"schema": {
"description": "A report format",
"type": "string",
"enum": [
"csv"
]
},
"description": "Defines an output format"
},
"reportsTimezone": {
"name": "timezone",
"in": "query",
"schema": {
"description": "A three character timezone code",
"type": "string",
"example": "UTC"
},
"description": "Defines a timezone to which reports timestamps are converted"
},
"currencyUnit": {
"name": "currencyUnit",
"in": "query",
"schema": {
"description": "A unit of currency for a report",
"type": "string",
"default": "USD",
"enum": [
"ZAR",
"USD",
"GBP",
"EUR",
"CNY",
"CAD",
"AUD"
]
},
"description": "Defines a unit of currency"
},
"currencySymbol": {
"name": "currencySymbol",
"in": "query",
"schema": {
"type": "string",
"default": "$"
},
"description": "Defines the symbol prefix for a unit of currency"
},
"start": {
"name": "start",
"in": "query",
"schema": {
"description": "Number of milliseconds since January 1, 1970",
"type": "integer",
"example": 1537289808000
},
"description": "Defines a start date"
},
"enforceMinConfirmsForChange": {
"name": "enforceMinConfirmsForChange",
"in": "query",
"description": "Enforces minConfirms on change inputs",
"schema": {
"type": "boolean"
}
},
"minValue": {
"name": "minValue",
"in": "query",
"description": "Minimum value of each unspent in base units (e.g. satoshis)",
"schema": {
"type": "number",
"minimum": 0
}
},
"maxValue": {
"name": "maxValue",
"in": "query",
"description": "Maximum value of each unspent in base units (e.g. satoshis)",
"schema": {
"type": "number",
"minimum": 0
}
},
"minHeight": {
"name": "minHeight",
"in": "query",
"description": "Minimum block height of the unspents",
"schema": {
"type": "number",
"minimum": 0
}
},
"segwit": {
"name": "segwit",
"in": "query",
"description": "DEPRECATED. Mutually exclusive with `chains`. Returns only `p2shP2wsh` unspents/addresses on true. Returns only `p2sh` unspents/addresses on false. Equivalent to passing 10 and 11 as the only value in `chains` on true, 0 and 1 on false.",
"schema": {
"type": "boolean"
}
},
"chains": {
"name": "chains",
"in": "query",
"description": "Replaces `segwit`. Mutually exclusive with `segwit`. Returns only unspents/addresses of the chains passed. If neither `chains` nor `segwit` is passed unspents/addresses from all chains are returned.",
"schema": {
"type": "array",
"items": {
"type": "string",
"enum": [
0,
1,
10,
11,
20,
21
]
}
}
},
"minConfirms": {
"name": "minConfirms",
"in": "query",
"description": "Minimum number of confirmation for the collected inputs",
"schema": {
"type": "integer",
"minimum": 0
}
},
"target": {
"name": "target",
"in": "query",
"description": "Combined target value of the unspents",
"schema": {
"type": "integer",
"minimum": 0
}
},
"pathPolicyId": {
"name": "policyId",
"description": "",
"in": "path",
"required": true,
"schema": {
"$ref": "#/components/parameters/userId/schema"
}
},
"prevId": {
"in": "query",
"name": "prevId",
"schema": {
"type": "string",
"format": "uuid",
"example": "585951a5df8380e0e3063e9f"
},
"description": "Return the next batch of results, based on the `nextBatchPrevId` value from the previous batch."
},
"searchLabel": {
"name": "searchLabel",
"in": "query",
"example": "3BAMY2UAudoEwucfwkg8sGR2FJHLPJoWsc",
"description": "Query for `Transfers` containing this string",
"schema": {
"type": "string"
}
},
"type": {
"name": "type",
"in": "query",
"description": "Filter on sending or receiving `Transfers`",
"schema": {
"type": "string",
"enum": [
"send",
"receive"
]
}
},
"usergroupId": {
"name": "usergroupId",
"description": "Filter by user group. May be specified multiple times.",
"in": "query",
"schema": {
"$ref": "#/components/parameters/userId/schema"
}
},
"userId": {
"name": "userId",
"description": "Filter by user. May be specified multiple times.",
"in": "query",
"schema": {
"type": "string",
"pattern": "^[0-9a-f]{32}$",
"example": "585951a5df8380e0e3063e9f12345678"
}
},
"wallet": {
"name": "wallet",
"description": "Filter by wallet",
"in": "query",
"schema": {
"$ref": "#/components/parameters/userId/schema"
}
},
"walletId": {
"name": "walletId",
"description": "Filter by wallet",
"in": "query",
"schema": {
"$ref": "#/components/parameters/userId/schema"
}
},
"allTokens": {
"name": "allTokens",
"schema": {
"type": "boolean"
},
"in": "query",
"example": true,
"description": "Include data for all ERC20 tokens"
},
"state": {
"name": "state",
"description": "The status of this Transfer",
"in": "query",
"schema": {
"type": "string",
"example": "confirmed",
"description": "The status of this Transfer",
"enum": [
"signed",
"unconfirmed",
"confirmed",
"pendingApproval",
"removed",
"failed",
"rejected"
]
}
},
"showAllWallets": {
"name": "showAllWallets",
"description": "Include wallets that have `deleted` or `creationFailed` set to **true**",
"in": "query",
"schema": {
"type": "boolean"
}
}
}
}
}
@harryoh
Copy link

harryoh commented Sep 24, 2019

Thank you!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment