Skip to content

Commit d8c54f8

Browse files
feat: update bitgo-api-docs
This commit updates the BitGo API.
1 parent 5ef0dcc commit d8c54f8

File tree

1 file changed

+335
-0
lines changed

1 file changed

+335
-0
lines changed

api.yaml

Lines changed: 335 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22573,6 +22573,84 @@ paths:
2257322573
application/json:
2257422574
schema:
2257522575
$ref: '#/components/schemas/PlatformError'
22576+
/api/v2/{coin}/wallet/balances:
22577+
get:
22578+
summary: Get wallet by ID and coin
22579+
description: Get one wallet by its 'coin' and 'walletId'. One 'walletId' can map to multiple receive addresses.
22580+
operationId: v2.wallet.gettotalbalancesbycoin
22581+
tags:
22582+
- Wallet
22583+
parameters:
22584+
- name: allTokens
22585+
description: Include balances for all subtokens (i.e. ERC20 Tokens, Stellar Tokens)
22586+
in: query
22587+
schema:
22588+
type: string
22589+
enum:
22590+
- 'true'
22591+
- 'false'
22592+
- name: enterprise
22593+
description: Filter by enterprise ID
22594+
in: query
22595+
schema:
22596+
oneOf:
22597+
- $ref: '#/components/schemas/EnterpriseIdString'
22598+
- type: array
22599+
items:
22600+
type: string
22601+
example: 59cd72485007a239fb00282ed480da1f
22602+
pattern: ^[0-9a-f]{32}$
22603+
- name: showAllWallets
22604+
description: Include wallets that have 'deleted' or 'creationFailed' set to **true**
22605+
in: query
22606+
schema:
22607+
type: string
22608+
enum:
22609+
- 'true'
22610+
- 'false'
22611+
default: 'false'
22612+
- name: coin
22613+
in: path
22614+
required: true
22615+
schema:
22616+
$ref: '#/components/schemas/CoinString'
22617+
responses:
22618+
'200':
22619+
description: OK
22620+
content:
22621+
application/json:
22622+
schema:
22623+
$ref: '#/components/schemas/GetWalletBalancesByCoinResponse'
22624+
'400':
22625+
description: Bad Request
22626+
content:
22627+
application/json:
22628+
schema:
22629+
$ref: '#/components/schemas/PlatformError'
22630+
'401':
22631+
description: Unauthorized
22632+
content:
22633+
application/json:
22634+
schema:
22635+
$ref: '#/components/schemas/PlatformError'
22636+
'403':
22637+
description: Forbidden
22638+
content:
22639+
application/json:
22640+
schema:
22641+
$ref: '#/components/schemas/PlatformError'
22642+
'404':
22643+
description: Not Found
22644+
content:
22645+
application/json:
22646+
schema:
22647+
$ref: '#/components/schemas/PlatformError'
22648+
'500':
22649+
description: Internal Server Error
22650+
content:
22651+
application/json:
22652+
schema:
22653+
$ref: '#/components/schemas/PlatformError'
2257622654
/api/v2/auditlog:
2257722655
get:
2257822656
summary: List audit logs
@@ -26375,6 +26453,169 @@ paths:
2637526453
application/json:
2637626454
schema:
2637726455
$ref: '#/components/schemas/PlatformError'
26456+
/api/v2/wallet/balances:
26457+
get:
26458+
summary: Get wallet by ID and coin
26459+
description: Get one wallet by its 'coin' and 'walletId'. One 'walletId' can map to multiple receive addresses.
26460+
operationId: v2.wallet.gettotalbalances
26461+
tags:
26462+
- Wallet
26463+
parameters:
26464+
- name: allTokens
26465+
description: Include balances for all subtokens (i.e. ERC20 Tokens, Stellar Tokens)
26466+
in: query
26467+
schema:
26468+
type: string
26469+
enum:
26470+
- 'true'
26471+
- 'false'
26472+
- name: coin
26473+
description: Filter by coin
26474+
in: query
26475+
schema:
26476+
oneOf:
26477+
- $ref: '#/components/schemas/CoinNonEmptyString'
26478+
- type: array
26479+
items:
26480+
type: string
26481+
description: A cryptocurrency symbol or token ticker symbol
26482+
example: btc
26483+
minLength: 1
26484+
example: btc | ['btc', 'eth']
26485+
- name: deleted
26486+
description: Filter by deleted state
26487+
in: query
26488+
schema:
26489+
type: string
26490+
enum:
26491+
- 'true'
26492+
- 'false'
26493+
default: 'false'
26494+
- name: enterprise
26495+
description: Filter by enterprise ID
26496+
in: query
26497+
schema:
26498+
oneOf:
26499+
- $ref: '#/components/schemas/EnterpriseIdString'
26500+
- type: array
26501+
items:
26502+
type: string
26503+
example: 59cd72485007a239fb00282ed480da1f
26504+
pattern: ^[0-9a-f]{32}$
26505+
- name: excludeEmptyBalances
26506+
description: Exclude tokens with zero balance. When allTokens is passed, then every token supported by BitGo will be included, regardless of balance.
26507+
in: query
26508+
schema:
26509+
type: string
26510+
enum:
26511+
- 'true'
26512+
- 'false'
26513+
default: 'false'
26514+
- name: excludeSpendableBalances
26515+
description: Skip spendable balance calculations and only include confirmed balances. If absent, defaults to false.
26516+
in: query
26517+
schema:
26518+
type: string
26519+
enum:
26520+
- 'true'
26521+
- 'false'
26522+
default: 'false'
26523+
- name: expandCustodialWallet
26524+
description: Whether balances of linked custodial wallets should be included
26525+
in: query
26526+
schema:
26527+
type: string
26528+
enum:
26529+
- 'true'
26530+
- 'false'
26531+
default: 'false'
26532+
- name: id
26533+
description: Filter by wallet ID
26534+
in: query
26535+
schema:
26536+
oneOf:
26537+
- $ref: '#/components/schemas/WalletIdString'
26538+
- type: array
26539+
items:
26540+
type: string
26541+
example: 59cd72485007a239fb00282ed480da1f
26542+
pattern: ^[0-9a-f]{32}$
26543+
- name: labelContains
26544+
description: Filter by label substring
26545+
in: query
26546+
schema:
26547+
type: string
26548+
- name: skipPendingTxs
26549+
description: Do not include pending withdrawals when determining total balances. By default, pending withdrawals will be considered.
26550+
in: query
26551+
schema:
26552+
type: string
26553+
enum:
26554+
- 'true'
26555+
- 'false'
26556+
default: 'false'
26557+
- name: skipTxCounts
26558+
description: True, if excluding transfer counts when calculating total balances. If absent, defaults to false.
26559+
in: query
26560+
schema:
26561+
type: string
26562+
enum:
26563+
- 'true'
26564+
- 'false'
26565+
default: 'false'
26566+
- name: type
26567+
description: Filter by wallet type
26568+
in: query
26569+
schema:
26570+
oneOf:
26571+
- $ref: '#/components/schemas/WalletType'
26572+
- type: array
26573+
items:
26574+
type: string
26575+
enum:
26576+
- backing
26577+
- cold
26578+
- custodial
26579+
- custodialPaired
26580+
- hot
26581+
- trading
26582+
responses:
26583+
'200':
26584+
description: OK
26585+
content:
26586+
application/json:
26587+
schema:
26588+
$ref: '#/components/schemas/GetWalletBalanceResponse'
26589+
'400':
26590+
description: Bad Request
26591+
content:
26592+
application/json:
26593+
schema:
26594+
$ref: '#/components/schemas/PlatformError'
26595+
'401':
26596+
description: Unauthorized
26597+
content:
26598+
application/json:
26599+
schema:
26600+
$ref: '#/components/schemas/PlatformError'
26601+
'403':
26602+
description: Forbidden
26603+
content:
26604+
application/json:
26605+
schema:
26606+
$ref: '#/components/schemas/PlatformError'
26607+
'404':
26608+
description: Not Found
26609+
content:
26610+
application/json:
26611+
schema:
26612+
$ref: '#/components/schemas/PlatformError'
26613+
'500':
26614+
description: Internal Server Error
26615+
content:
26616+
application/json:
26617+
schema:
26618+
$ref: '#/components/schemas/PlatformError'
2637826619
/api/v2/wallets:
2637926620
get:
2638026621
summary: List wallets
@@ -48296,6 +48537,100 @@ components:
4829648537
description: The number of pending approvals
4829748538
required:
4829848539
- pendingApprovalsCount
48540+
GetWalletBalancesByCoinResponse:
48541+
title: GetWalletBalancesByCoinResponse
48542+
allOf:
48543+
- type: object
48544+
properties:
48545+
balance:
48546+
type: number
48547+
description: The total balance of all wallets containing the given coin type. May lose precision for large values.
48548+
confirmedBalance:
48549+
type: number
48550+
description: The total balance of confirmed transactions for all wallets containing the given coin type. May lose precision for large values.
48551+
spendableBalance:
48552+
type: number
48553+
description: The total balance of all wallets containing the given coin which may be used as inputs for creating new transactions. May lose precision for large values.
48554+
stakedBalance:
48555+
type: number
48556+
description: The total balance of all wallets containing the given coin which has been staked. May lose precision for large values.
48557+
stakedBalanceString:
48558+
type: string
48559+
description: String representation of 'stakedBalance'. Guaranteed to not lose precision.
48560+
tokens:
48561+
allOf:
48562+
- $ref: '#/components/schemas/tokenBalances'
48563+
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.
48564+
unsupportedTokens:
48565+
allOf:
48566+
- $ref: '#/components/schemas/tokenBalances'
48567+
description: Object of key value pairs where the keys are the unsupported token contracts (e.g. 0x9928e4046d7c6513326ccea028cd3e7a91c7590a) and the values are the balance data for that token contract. UnsupportedTokens will only be returned for wallets that supports Metamask Institutional and has enableMMI flag turned on
48568+
required:
48569+
- balance
48570+
- confirmedBalance
48571+
- spendableBalance
48572+
- $ref: '#/components/schemas/baseBalanceStrings'
48573+
baseBalanceStrings:
48574+
title: baseBalanceStrings
48575+
type: object
48576+
properties:
48577+
balanceString:
48578+
type: string
48579+
description: String representation of the total balance of all wallets containing the given coin type. Guaranteed to not lose precision.
48580+
confirmedBalanceString:
48581+
type: string
48582+
description: String representation of the total balance of confirmed transactions for all wallets containing the given coin type. Guaranteed to not lose precision.
48583+
spendableBalanceString:
48584+
type: string
48585+
description: String representation of the total balance of all wallets containing the given coin which may be used as inputs for creating new transactions. Guaranteed to not lose precision.
48586+
required:
48587+
- balanceString
48588+
- confirmedBalanceString
48589+
- spendableBalanceString
48590+
tokenBalances:
48591+
title: tokenBalances
48592+
type: object
48593+
additionalProperties:
48594+
allOf:
48595+
- type: object
48596+
properties:
48597+
transferCount:
48598+
type: number
48599+
description: Number of transfers for the token.
48600+
heldBalanceString:
48601+
type: string
48602+
description: The difference between the balanceString and the spendableBalanceString.
48603+
required:
48604+
- transferCount
48605+
- $ref: '#/components/schemas/baseBalanceStrings'
48606+
GetWalletBalanceResponse:
48607+
title: GetWalletBalanceResponse
48608+
type: object
48609+
properties:
48610+
balances:
48611+
type: array
48612+
items:
48613+
type: object
48614+
properties:
48615+
coin:
48616+
allOf:
48617+
- $ref: '#/components/schemas/CoinNonEmptyString'
48618+
description: A cryptocurrency or token ticker symbol.
48619+
balanceString:
48620+
type: string
48621+
description: String representation of the balance in base units. Guaranteed to not lose precision.
48622+
confirmedBalanceString:
48623+
type: string
48624+
description: String representation of the confirmed balance in base units. Guaranteed to not lose precision.
48625+
spendableBalanceString:
48626+
type: string
48627+
description: String representation of the spendable in base units. Guaranteed to not lose precision. Will not be included if 'excludeSpendableBalances=false'
48628+
required:
48629+
- coin
48630+
- balanceString
48631+
- confirmedBalanceString
48632+
required:
48633+
- balances
4829948634
DeployAddressAndForwardTokenResponse:
4830048635
title: DeployAddressAndForwardTokenResponse
4830148636
type: object

0 commit comments

Comments
 (0)