Skip to content

Commit 09a3a55

Browse files
Merge pull request #82 from BitGo/update-bitgo-api-docs
Update API reference on BitGo Developer Portal
2 parents 9c01e7a + a3b37ff commit 09a3a55

File tree

1 file changed

+202
-32
lines changed

1 file changed

+202
-32
lines changed

api.yaml

Lines changed: 202 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -22942,6 +22942,59 @@ paths:
2294222942
oneOf:
2294322943
- $ref: '#/components/schemas/PlatformError'
2294422944
- $ref: '#/components/schemas/InvalidWalletId'
22945+
/api/v2/{coin}/wallet/{walletId}/token/approval/build:
22946+
post:
22947+
summary: Build an approval transaction for ERC20 token
22948+
operationId: v2.wallet.token.approval.build
22949+
tags:
22950+
- Wallet
22951+
parameters:
22952+
- name: coin
22953+
in: path
22954+
required: true
22955+
schema:
22956+
$ref: '#/components/schemas/CoinNonEmptyString'
22957+
- name: walletId
22958+
in: path
22959+
required: true
22960+
schema:
22961+
$ref: '#/components/schemas/WalletIdNonEmptyString'
22962+
requestBody:
22963+
content:
22964+
application/json:
22965+
schema:
22966+
type: object
22967+
properties:
22968+
amount:
22969+
type: string
22970+
minLength: 1
22971+
gasLimit:
22972+
type: number
22973+
gasPrice:
22974+
type: number
22975+
eip1559:
22976+
type: object
22977+
properties:
22978+
maxFeePerGas:
22979+
type: number
22980+
maxPriorityFeePerGas:
22981+
type: number
22982+
required:
22983+
- maxFeePerGas
22984+
- maxPriorityFeePerGas
22985+
responses:
22986+
'200':
22987+
description: OK
22988+
content:
22989+
application/json:
22990+
schema:
22991+
$ref: '#/components/schemas/BuildTokenApprovalResponse'
22992+
'400':
22993+
description: Bad Request
22994+
content:
22995+
application/json:
22996+
schema:
22997+
$ref: '#/components/schemas/PlatformError'
2294522998
/api/v2/{coin}/wallet/{walletId}/tx/changeFee:
2294622999
post:
2294723000
summary: Change Fee
@@ -23046,6 +23099,15 @@ paths:
2304623099
- 'true'
2304723100
- 'false'
2304823101
default: 'false'
23102+
- name: includeStakingBalances
23103+
description: Include 'stakingBalanceString' and 'rewardBalanceString' properties for each staking wallet.
23104+
in: query
23105+
schema:
23106+
type: string
23107+
enum:
23108+
- 'true'
23109+
- 'false'
23110+
default: 'false'
2304923111
- name: coin
2305023112
in: path
2305123113
required: true
@@ -26981,6 +27043,15 @@ paths:
2698127043
type: string
2698227044
example: 59cd72485007a239fb00282ed480da1f
2698327045
pattern: ^[0-9a-f]{32}$
27046+
- name: includeStakingBalances
27047+
description: Include 'stakingBalanceString' and 'rewardBalanceString' properties for each staking wallet.
27048+
in: query
27049+
schema:
27050+
type: string
27051+
enum:
27052+
- 'true'
27053+
- 'false'
27054+
default: 'false'
2698427055
- name: labelContains
2698527056
description: Filter by label substring
2698627057
in: query
@@ -27175,6 +27246,15 @@ paths:
2717527246
enum:
2717627247
- 'true'
2717727248
- 'false'
27249+
- name: includeStakingBalances
27250+
description: Include 'stakingBalanceString' and 'rewardBalanceString' properties for each staking wallet. Requires 'expandBalance' to be set to true.
27251+
in: query
27252+
schema:
27253+
type: string
27254+
enum:
27255+
- 'true'
27256+
- 'false'
27257+
default: 'false'
2717827258
- name: limit
2717927259
description: Maximum number of results to return. If the result set is truncated, use the "nextBatchPrevId" value to get the next batch.
2718027260
in: query
@@ -33618,6 +33698,44 @@ components:
3361833698
format: date-time
3361933699
description: Required. The time that the unspent reservations should expire.
3362033700
description: Optional parameter for UTXO coins to automatically reserve the unspents that are used in the build. Useful for Cold wallets. If using, must set expireTime.
33701+
BuildTokenApprovalResponse:
33702+
title: BuildTokenApprovalResponse
33703+
type: object
33704+
properties:
33705+
txHex:
33706+
type: string
33707+
txInfo:
33708+
type: object
33709+
properties:
33710+
amount:
33711+
type: string
33712+
contractAddress:
33713+
type: string
33714+
spender:
33715+
type: string
33716+
required:
33717+
- amount
33718+
- contractAddress
33719+
- spender
33720+
recipients:
33721+
type: array
33722+
items:
33723+
type: object
33724+
properties:
33725+
address:
33726+
type: string
33727+
amount:
33728+
type: string
33729+
data:
33730+
type: string
33731+
required:
33732+
- address
33733+
- amount
33734+
- data
33735+
required:
33736+
- txHex
33737+
- txInfo
33738+
- recipients
3362133739
BusinessModel:
3362233740
title: BusinessModel
3362333741
type: string
@@ -39400,6 +39518,12 @@ components:
3940039518
spendableBalanceString:
3940139519
type: string
3940239520
description: String representation of the spendable in base units. Guaranteed to not lose precision. Will not be included if 'excludeSpendableBalances=false'
39521+
stakingBalanceString:
39522+
type: string
39523+
description: The staked balance in base units. Guaranteed to not lose precision. The is only returned if the 'includeStakingBalances' query parameter is set to 'true'.
39524+
rewardBalanceString:
39525+
type: string
39526+
description: The staking reward balance in base units. Guaranteed to not lose precision. The is only returned if the 'includeStakingBalances' query parameter is set to 'true'.
3940339527
required:
3940439528
- coin
3940539529
- balanceString
@@ -40023,6 +40147,22 @@ components:
4002340147
type: boolean
4002440148
description: true, if multiple values can be provided, i.e. as a list of values. When false only one value can be provided, i.e. a list with more than one element will be rejected.
4002540149
example: false
40150+
InquiryStatus:
40151+
title: InquiryStatus
40152+
type: string
40153+
enum:
40154+
- completed
40155+
- failed
40156+
InquirySubType:
40157+
title: InquirySubType
40158+
type: string
40159+
enum:
40160+
- withdrawalLivenessCheck
40161+
InquiryType:
40162+
title: InquiryType
40163+
type: string
40164+
enum:
40165+
- livenessCheck
4002640166
InscriptionId:
4002740167
type: string
4002840168
description: The ID of the inscription in the form <txid>i<vin>
@@ -43532,6 +43672,25 @@ components:
4353243672
enum:
4353343673
- frozen
4353443674
- unFrozen
43675+
associatedInquiries:
43676+
type: array
43677+
items:
43678+
type: object
43679+
properties:
43680+
inquiryId:
43681+
type: string
43682+
inquiryStatus:
43683+
$ref: '#/components/schemas/InquiryStatus'
43684+
inquirySubType:
43685+
$ref: '#/components/schemas/InquirySubType'
43686+
inquiryType:
43687+
$ref: '#/components/schemas/InquiryType'
43688+
required:
43689+
- inquiryId
43690+
- inquiryStatus
43691+
- inquirySubType
43692+
- inquiryType
43693+
description: Associated inquiries
4353543694
required:
4353643695
- id
4353743696
- creator
@@ -55511,42 +55670,28 @@ components:
5551155670
properties:
5551255671
id:
5551355672
$ref: '#/components/schemas/Id'
55514-
coin:
55515-
$ref: '#/components/schemas/Coin'
5551655673
type:
5551755674
$ref: '#/components/schemas/WebhookTypeWallet'
55518-
walletType:
55519-
type: string
55520-
example: cold
55521-
transferType:
55522-
type: string
55523-
example: receive
55524-
value:
55525-
type: integer
55526-
example: 1055354
55527-
valueString:
55528-
type: string
55529-
example: 1055354
55530-
baseValue:
55531-
type: integer
55532-
example: 1055354
55533-
baseValueString:
55534-
type: string
55535-
example: 1055354
55536-
feeString:
55675+
wallet:
55676+
$ref: '#/components/schemas/Id'
55677+
enterprise:
55678+
$ref: '#/components/schemas/Id'
55679+
organization:
55680+
$ref: '#/components/schemas/Id'
55681+
bankAccount:
55682+
$ref: '#/components/schemas/Id'
55683+
url:
5553755684
type: string
55538-
example: 71854
55539-
initiator:
55540-
type: array
55541-
items:
55542-
type: string
55543-
example: external
55544-
receiver:
55685+
format: uri
55686+
example: https://your.server.com/webhook
55687+
hash:
5554555688
type: string
55546-
example: tb1q3tzuxef7qc0sl8jq6vh3hpeq0w7swmq9a7eh4p
55547-
version:
55548-
type: integer
55549-
example: 2
55689+
example: 1311768467294899700
55690+
description: A transaction hash for transactions, or a block hash for block notifications.
55691+
coin:
55692+
$ref: '#/components/schemas/Coin'
55693+
transfer:
55694+
$ref: '#/components/schemas/Id'
5555055695
state:
5555155696
type: string
5555255697
description: If 'failed', webhook notification failed to connect with the target URL. If 'new', webhook notification was newly generated, in response to an event. If 'pending', webhook notification is awaiting processing by the webhook worker. If 'processed', webhook notification successfully sent to target URL. If 'unconfirmed', webhook notification is awaiting confirmation on the blockchain.
@@ -55557,6 +55702,25 @@ components:
5555755702
- processed
5555855703
- unconfirmed
5555955704
example: new
55705+
simulation:
55706+
type: boolean
55707+
example: false
55708+
retries:
55709+
type: integer
55710+
example: 0
55711+
description: The number of retries that have been attempted for this webhook notification.
55712+
webhook:
55713+
$ref: '#/components/schemas/Id'
55714+
updateAt:
55715+
$ref: '#/components/schemas/DateTime'
55716+
nextAttempt:
55717+
$ref: '#/components/schemas/DateTime'
55718+
version:
55719+
type: integer
55720+
example: 2
55721+
idempotencyKey:
55722+
type: string
55723+
description: A unique id that can be used to de-duplicate notifications.
5556055724
WebhookNotificationState:
5556155725
title: WebhookNotificationState
5556255726
type: string
@@ -56111,6 +56275,12 @@ components:
5611156275
spendableBalanceString:
5611256276
type: string
5611356277
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.
56278+
stakingBalanceString:
56279+
type: string
56280+
description: The staked balance in base units. Guaranteed to not lose precision. The is only returned if the 'includeStakingBalances' query parameter is set to 'true'.
56281+
rewardBalanceString:
56282+
type: string
56283+
description: The staking reward balance in base units. Guaranteed to not lose precision. The is only returned if the 'includeStakingBalances' query parameter is set to 'true'.
5611456284
required:
5611556285
- balanceString
5611656286
- confirmedBalanceString

0 commit comments

Comments
 (0)