Skip to content

Commit ca37a98

Browse files
Merge pull request #162 from BitGo/update-bitgo-api-docs
Update API reference on BitGo Developer Portal
2 parents 0ebfacb + 24d25d1 commit ca37a98

File tree

1 file changed

+164
-122
lines changed

1 file changed

+164
-122
lines changed

api.yaml

Lines changed: 164 additions & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -18680,56 +18680,6 @@ paths:
1868018680
$ref: '#/components/schemas/PlatformError3'
1868118681
'404':
1868218682
description: Not Found
18683-
/api/v2/{coin}/wallet/{walletId}/unspents:
18684-
get:
18685-
tags:
18686-
- Wallet
18687-
summary: Get unspents
18688-
description: Returns unspent transaction outputs for a wallet
18689-
operationId: v2.wallet.unspents
18690-
parameters:
18691-
- $ref: '#/components/parameters/pathCoin'
18692-
- $ref: '#/components/parameters/pathWalletId'
18693-
- $ref: '#/components/parameters/limit'
18694-
- $ref: '#/components/parameters/maxValue'
18695-
- $ref: '#/components/parameters/minConfirms'
18696-
- $ref: '#/components/parameters/enforceMinConfirmsForChange'
18697-
- $ref: '#/components/parameters/minHeight'
18698-
- $ref: '#/components/parameters/minValue'
18699-
- $ref: '#/components/parameters/prevId'
18700-
- $ref: '#/components/parameters/segwit'
18701-
- name: includeRbf
18702-
in: query
18703-
description: True, if including Replace-By-Fee (RBF) unspents.
18704-
schema:
18705-
type: boolean
18706-
responses:
18707-
'200':
18708-
description: OK
18709-
content:
18710-
application/json:
18711-
schema:
18712-
$ref: '#/components/schemas/WalletUnspents'
18713-
'400':
18714-
description: Bad Request
18715-
content:
18716-
application/json:
18717-
schema:
18718-
oneOf:
18719-
- $ref: '#/components/schemas/PlatformError3'
18720-
- $ref: '#/components/schemas/InvalidWalletId'
18721-
'403':
18722-
description: Forbidden
18723-
content:
18724-
application/json:
18725-
schema:
18726-
$ref: '#/components/schemas/PlatformError3'
18727-
'404':
18728-
description: Not Found
18729-
content:
18730-
application/json:
18731-
schema:
18732-
$ref: '#/components/schemas/PlatformError3'
1873318683
/api/v2/{coin}/wallet/{walletId}/maximumSpendable:
1873418684
get:
1873518685
tags:
@@ -25533,6 +25483,72 @@ paths:
2553325483
application/json:
2553425484
schema:
2553525485
$ref: '#/components/schemas/PlatformError'
25486+
/api/v2/{coin}/wallet/{walletId}/unspents:
25487+
get:
25488+
summary: List unspents on a wallet
25489+
operationId: v2.wallet.unspents
25490+
tags:
25491+
- Wallet
25492+
parameters:
25493+
- name: limit
25494+
description: Limit the number of results.
25495+
in: query
25496+
schema:
25497+
type: string
25498+
default: '25'
25499+
minimum: 0
25500+
maximum: 2000
25501+
format: number
25502+
- name: prevId
25503+
description: Only return results created after this ID
25504+
in: query
25505+
schema:
25506+
type: string
25507+
minLength: 1
25508+
- name: chains
25509+
description: Filter by chains. May be given mutiple times
25510+
in: query
25511+
schema:
25512+
type: array
25513+
items:
25514+
type: string
25515+
format: number
25516+
description: Filter by chains. May be given mutiple times
25517+
- name: target
25518+
description: The combined target value of the unspents
25519+
in: query
25520+
schema:
25521+
type: string
25522+
format: number
25523+
- name: numRecipients
25524+
description: number of recipients of the unspents
25525+
in: query
25526+
schema:
25527+
type: string
25528+
format: number
25529+
- name: coin
25530+
in: path
25531+
required: true
25532+
schema:
25533+
$ref: '#/components/schemas/CoinNonEmptyString'
25534+
- name: walletId
25535+
in: path
25536+
required: true
25537+
schema:
25538+
$ref: '#/components/schemas/WalletIdNonEmptyString'
25539+
responses:
25540+
'200':
25541+
description: OK
25542+
content:
25543+
application/json:
25544+
schema:
25545+
$ref: '#/components/schemas/WalletUnspentsResponse'
25546+
'400':
25547+
description: Bad Request
25548+
content:
25549+
application/json:
25550+
schema:
25551+
$ref: '#/components/schemas/PlatformError'
2553625552
/api/v2/{coin}/wallet/balances:
2553725553
get:
2553825554
summary: List total balances by coin
@@ -29506,7 +29522,7 @@ paths:
2950629522
content:
2950729523
application/json:
2950829524
schema:
29509-
$ref: '#/components/schemas/InvoiceInfo'
29525+
$ref: '#/components/schemas/LightningInvoice'
2951029526
'400':
2951129527
description: Bad Request
2951229528
content:
@@ -34895,12 +34911,6 @@ components:
3489534911
description: Query for `Wallets` with a label containing this string
3489634912
schema:
3489734913
type: string
34898-
segwit:
34899-
name: segwit
34900-
in: query
34901-
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.
34902-
schema:
34903-
type: boolean
3490434914
showAllWallets:
3490534915
name: showAllWallets
3490634916
description: Include wallets that have `deleted` or `creationFailed` set to **true**
@@ -43722,40 +43732,63 @@ components:
4372243732
items:
4372343733
type: object
4372443734
properties:
43725-
valueMsat:
43735+
memo:
4372643736
type: string
43727-
format: number
43728-
paymentHash:
43737+
description: A memo or description for the invoice
43738+
example: Payment for the coffee
43739+
amtPaidMsat:
4372943740
type: string
43741+
description: The number of millisats actually paid to this invoice, this may be greater than the amount requested by the invoice, since lightning allows overpaying (but not underpaying) invoices.
43742+
format: number
4373043743
invoice:
4373143744
type: string
43732-
walletId:
43745+
description: The BOLT \#11 encoded invoice
43746+
example: lnbc500n1p3zv5vkpp5x0thcaz8wep54clc2xt5895azjdzmthyskzzh9yslggy74qtvl6sdpdg3hkuct5d9hkugrxdaezqjn0dphk2fmnypkk2mtsdahkccqzpgxqyz5vqsp5v80q4vq4pwakq2l0hcqgtelgajsymv4ud4jdcrqtnzhvet55qlus9qyyssquqh2wl2m866qs5n72c5vg6wmqx9vzwhs5ypualq4mcu76h2tdkcq3jtjwtggfff7xwtdqxlnwqk8cxpzryjghrmmq3syraswp9vjr7cqry9l96
43747+
paymentHash:
4373343748
type: string
43734-
status:
43735-
$ref: '#/components/schemas/InvoiceStatus'
43749+
description: The payment hash of the invoice
43750+
example: 63d9ce82e09d16761a85116ed8b65407db4fb22f85d03573de09c480f2c6d175
43751+
valueMsat:
43752+
type: string
43753+
description: The value of the invoice in satoshis
43754+
example: '50000'
43755+
format: number
4373643756
expiresAt:
4373743757
type: string
43758+
description: ISO-8601 string representing when the invoice will expire
43759+
example: '2022-04-01T18:46:24.677Z'
4373843760
format: date-time
4373943761
title: ISO Date String
43762+
status:
43763+
type: string
43764+
enum:
43765+
- open
43766+
- settled
43767+
- canceled
43768+
description: The status of the invoice
43769+
walletId:
43770+
allOf:
43771+
- $ref: '#/components/schemas/WalletIdString'
43772+
description: The wallet to which this invoice belongs
4374043773
createdAt:
4374143774
type: string
43775+
description: ISO-8601 string representing when the invoice was created
43776+
example: '2022-04-01T18:46:24.677Z'
4374243777
format: date-time
4374343778
title: ISO Date String
4374443779
updatedAt:
4374543780
type: string
43781+
description: ISO-8601 string representing when the invoice was updated
43782+
example: '2022-04-01T18:46:24.677Z'
4374643783
format: date-time
4374743784
title: ISO Date String
43748-
amtPaidMsat:
43749-
type: string
43750-
description: The number of millisats actually paid to this invoice, this may be greater than the amount requested by the invoice, since lightning allows overpaying (but not underpaying) invoices.
43751-
format: number
4375243785
required:
43753-
- valueMsat
43754-
- paymentHash
4375543786
- invoice
43756-
- walletId
43757-
- status
43787+
- paymentHash
43788+
- valueMsat
4375843789
- expiresAt
43790+
- status
43791+
- walletId
4375943792
- createdAt
4376043793
- updatedAt
4376143794
nextBatchPrevId:
@@ -45356,53 +45389,6 @@ components:
4535645389
required:
4535745390
- name
4535845391
- $ref: '#/components/schemas/InvalidId'
45359-
InvoiceInfo:
45360-
title: InvoiceInfo
45361-
type: object
45362-
properties:
45363-
valueMsat:
45364-
type: string
45365-
format: number
45366-
paymentHash:
45367-
type: string
45368-
invoice:
45369-
type: string
45370-
walletId:
45371-
type: string
45372-
status:
45373-
$ref: '#/components/schemas/InvoiceStatus'
45374-
expiresAt:
45375-
type: string
45376-
format: date-time
45377-
title: ISO Date String
45378-
createdAt:
45379-
type: string
45380-
format: date-time
45381-
title: ISO Date String
45382-
updatedAt:
45383-
type: string
45384-
format: date-time
45385-
title: ISO Date String
45386-
amtPaidMsat:
45387-
type: string
45388-
description: The number of millisats actually paid to this invoice, this may be greater than the amount requested by the invoice, since lightning allows overpaying (but not underpaying) invoices.
45389-
format: number
45390-
required:
45391-
- valueMsat
45392-
- paymentHash
45393-
- invoice
45394-
- walletId
45395-
- status
45396-
- expiresAt
45397-
- createdAt
45398-
- updatedAt
45399-
InvoiceStatus:
45400-
title: InvoiceStatus
45401-
type: string
45402-
enum:
45403-
- open
45404-
- settled
45405-
- canceled
4540645392
Ip:
4540745393
type: string
4540845394
format: ipv4
@@ -45977,6 +45963,10 @@ components:
4597745963
type: string
4597845964
description: A memo or description for the invoice
4597945965
example: Payment for the coffee
45966+
amtPaidMsat:
45967+
type: string
45968+
description: The number of millisats actually paid to this invoice, this may be greater than the amount requested by the invoice, since lightning allows overpaying (but not underpaying) invoices.
45969+
format: number
4598045970
invoice:
4598145971
type: string
4598245972
description: The BOLT \#11 encoded invoice
@@ -46007,13 +45997,27 @@ components:
4600745997
allOf:
4600845998
- $ref: '#/components/schemas/WalletIdString'
4600945999
description: The wallet to which this invoice belongs
46000+
createdAt:
46001+
type: string
46002+
description: ISO-8601 string representing when the invoice was created
46003+
example: '2022-04-01T18:46:24.677Z'
46004+
format: date-time
46005+
title: ISO Date String
46006+
updatedAt:
46007+
type: string
46008+
description: ISO-8601 string representing when the invoice was updated
46009+
example: '2022-04-01T18:46:24.677Z'
46010+
format: date-time
46011+
title: ISO Date String
4601046012
required:
4601146013
- invoice
4601246014
- paymentHash
4601346015
- valueMsat
4601446016
- expiresAt
4601546017
- status
4601646018
- walletId
46019+
- createdAt
46020+
- updatedAt
4601746021
LightningOnchainRequest:
4601846022
title: LightningOnchainRequest
4601946023
type: object
@@ -62055,15 +62059,53 @@ components:
6205562059
- hot
6205662060
- trading
6205762061
- distributedCustody
62058-
WalletUnspents:
62062+
WalletUnspentsResponse:
62063+
title: WalletUnspentsResponse
6205962064
type: object
6206062065
properties:
62061-
coin:
62062-
$ref: '#/components/schemas/Coin'
6206362066
unspents:
6206462067
type: array
6206562068
items:
62066-
$ref: '#/components/schemas/Unspent'
62069+
type: object
62070+
properties:
62071+
chain:
62072+
type: number
62073+
description: The chain of the UTXO
62074+
index:
62075+
type: number
62076+
description: The index of the UTXO
62077+
redeemScript:
62078+
type: string
62079+
description: The redeem script of the UTXO
62080+
witnessScript:
62081+
type: string
62082+
description: The witness script of the UTXO
62083+
id:
62084+
type: string
62085+
description: The ID of the UTXO
62086+
address:
62087+
type: string
62088+
description: The address of the UTXO
62089+
value:
62090+
type: number
62091+
description: The value of the UTXO
62092+
blockHeight:
62093+
type: number
62094+
description: The block this Unspent was created in
62095+
coinbase:
62096+
type: boolean
62097+
description: True if this unspent came from the coinbase transaction
62098+
nextBatchPrevId:
62099+
type: string
62100+
description: The ID from where the results can continue
62101+
coin:
62102+
$ref: '#/components/schemas/CoinString'
62103+
bumpFee:
62104+
type: string
62105+
description: fee bump
62106+
format: number
62107+
required:
62108+
- unspents
6206762109
WalletUpdateCoinSpecific:
6206862110
type: object
6206962111
properties:

0 commit comments

Comments
 (0)