Skip to content

Commit 467629a

Browse files
Merge pull request #163 from BitGo/update-bitgo-api-docs
Update API reference on BitGo Developer Portal
2 parents ca37a98 + f9ba977 commit 467629a

File tree

1 file changed

+123
-15
lines changed

1 file changed

+123
-15
lines changed

api.yaml

Lines changed: 123 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21885,8 +21885,54 @@ paths:
2188521885
properties:
2188621886
availableCurrencies:
2188721887
type: array
21888+
description: Returns a Currency object that consists of the ID, Name and Symbol for the instrument
2188821889
items:
2188921890
$ref: '#/components/schemas/Currency'
21891+
/api/prime/trading/v1/accounts/{accountID}/margin/collateral/transferred:
21892+
get:
21893+
summary: List transferred collateral
21894+
description: Returns the balance of assets deposited as collateral for the specified account.
21895+
operationId: trade.margin.collateral.transferred.list
21896+
tags:
21897+
- Trade REST API
21898+
parameters:
21899+
- name: accountID
21900+
in: path
21901+
required: true
21902+
description: The ID of the account
21903+
schema:
21904+
type: string
21905+
responses:
21906+
'200':
21907+
description: A list of transferred collateral
21908+
content:
21909+
application/json:
21910+
schema:
21911+
type: object
21912+
properties:
21913+
balances:
21914+
type: array
21915+
items:
21916+
type: object
21917+
properties:
21918+
currency:
21919+
type: string
21920+
description: Symbol of the collateral asset
21921+
quantity:
21922+
type: string
21923+
description: Number representing the balance for the specified collateral
21924+
balanceValue:
21925+
allOf:
21926+
- $ref: '#/components/schemas/Amount4'
21927+
- type: object
21928+
description: Returns the value of the collateral. Has 2 fields denoting the currency used and the actual value.
21929+
example:
21930+
balances:
21931+
- currency: BTC
21932+
quantity: '2'
21933+
balanceValue:
21934+
quantity: '1000000'
21935+
currency: USD
2189021936
/api/prime/trading/v1/accounts/{accountID}/margin/risksettings:
2189121937
get:
2189221938
summary: Get margin risk settings
@@ -21910,14 +21956,20 @@ paths:
2191021956
type: object
2191121957
properties:
2191221958
totalShortPositionLimit:
21913-
$ref: '#/components/schemas/Amount4'
21959+
allOf:
21960+
- $ref: '#/components/schemas/Amount4'
21961+
- type: object
21962+
description: Quantity representing the total NOP limit across all currencies. It sets a limit that is compared to the total short position across all currencies (eg. 1000000). Currency represents the currency that the quantity is valued in (eg. USD)
2191421963
marginCallPercentage:
21964+
description: Number representing the percentage at which a margin call will be initiated if the margin percentage falls below this number. It is in decimal form (eg. 0.8 to mean 80%)
2191521965
type: number
2191621966
format: decimal
2191721967
liquidationThresholdPercentage:
21968+
description: Number representing the liquidation threshold percentage at which positions will be automatically liquidated if the margin utilization exceeds this level. It is in decimal form (eg. 1.2 to mean 120%)
2191821969
type: number
2191921970
format: decimal
2192021971
marginRequirementPercentage:
21972+
description: Number representing the margin requirement percentage which is used with the NOP to determine the margin required. It is in decimal form (eg.0.2 for 20%)
2192121973
type: number
2192221974
format: decimal
2192321975
example:
@@ -22013,18 +22065,34 @@ paths:
2201322065
type: object
2201422066
properties:
2201522067
netOpenPosition:
22016-
$ref: '#/components/schemas/Amount4'
22068+
allOf:
22069+
- $ref: '#/components/schemas/Amount4'
22070+
- type: object
22071+
description: Quantity representing the total NOP limit across all currencies. It sets a limit that is compared to the total short position across all currencies (eg. 1000000). Currency represents the currency that the quantity is valued in (eg. USD)
2201722072
transferredCollateral:
22018-
$ref: '#/components/schemas/Amount4'
22073+
allOf:
22074+
- $ref: '#/components/schemas/Amount4'
22075+
- type: object
22076+
description: Quantity representing the notional value of all collateral balances. This may change as the value of collateral changes with market movements. Currency represents the notional currency (eg. USD)
2201922077
unrealizedPnL:
22020-
$ref: '#/components/schemas/Amount4'
22078+
allOf:
22079+
- $ref: '#/components/schemas/Amount4'
22080+
- type: object
22081+
description: Quantity representing the sum of unrealized profit and loss across all per-asset open positions. Currency represents the notional currency (eg. USD)
2202122082
marginBalance:
22022-
$ref: '#/components/schemas/Amount4'
22083+
allOf:
22084+
- $ref: '#/components/schemas/Amount4'
22085+
- type: object
22086+
description: Quantity representing the sum of the transferredCollateral and unrealizedPnL. Currency represents the notional currency (eg. USD)
2202322087
marginRequirement:
22024-
$ref: '#/components/schemas/Amount4'
22088+
allOf:
22089+
- $ref: '#/components/schemas/Amount4'
22090+
- type: object
22091+
description: Quantity representing the marginBalance required to continue trading without risk of margin call or liquidation. If margin requirement is not present, either netOpenPosition is zero or there is no requirement. Currency represents the notional currency (eg. USD)
2202522092
marginUtilizationPercentage:
2202622093
type: number
2202722094
nullable: true
22095+
description: Quantity representing the ratio of marginRequirement to marginBalance, measured directly against liquidation and margin call thresholds. This is null if there is no margin requirement.
2202822096
example:
2202922097
riskProfile:
2203022098
netOpenPosition:
@@ -22081,10 +22149,15 @@ paths:
2208122149
properties:
2208222150
currency:
2208322151
type: string
22152+
description: Symbol of the collateral asset
2208422153
quantity:
2208522154
type: string
22155+
description: Number representing the balance for the specified collateral
2208622156
balanceValue:
22087-
$ref: '#/components/schemas/Amount4'
22157+
allOf:
22158+
- $ref: '#/components/schemas/Amount4'
22159+
- type: object
22160+
description: Returns the value of the collateral.
2208822161
example:
2208922162
currency: BTC
2209022163
quantity: '2'
@@ -22129,10 +22202,15 @@ paths:
2212922202
properties:
2213022203
currency:
2213122204
type: string
22205+
description: Symbol of the collateral asset
2213222206
quantity:
2213322207
type: number
22208+
description: Number representing the balance for the specified collateral
2213422209
balanceValue:
22135-
$ref: '#/components/schemas/Amount4'
22210+
allOf:
22211+
- $ref: '#/components/schemas/Amount4'
22212+
- type: object
22213+
description: Returns the value of the collateral. Has 2 fields denoting the currency used and the actual value.
2213622214
example:
2213722215
currency: BTC
2213822216
quantity: 2
@@ -22189,10 +22267,15 @@ paths:
2218922267
properties:
2219022268
currency:
2219122269
type: string
22270+
description: Symbol of the margin position asset
2219222271
quantity:
2219322272
type: number
22273+
description: Number representing the balance for the specified margin position
2219422274
balanceValue:
22195-
$ref: '#/components/schemas/Amount4'
22275+
allOf:
22276+
- $ref: '#/components/schemas/Amount4'
22277+
- type: object
22278+
description: Returns the value of the margin position. Has 2 fields denoting the currency used and the actual value.
2219622279
example:
2219722280
balances:
2219822281
- currency: BTC
@@ -22237,7 +22320,7 @@ paths:
2223722320
all: true
2223822321
responses:
2223922322
'202':
22240-
description: Acknowledgement that the action was received
22323+
description: Returns an acknowledgement that the action was received. Async process will kick off to perform trades to close out open positions.
2224122324
/api/prime/trading/v1/ws:
2224222325
get:
2224322326
summary: Get WebSocket connection
@@ -39429,10 +39512,13 @@ components:
3942939512
id:
3943039513
type: string
3943139514
format: uuid
39515+
description: ID of the currency
3943239516
symbol:
3943339517
type: string
39518+
description: Symbol of the currency
3943439519
name:
3943539520
type: string
39521+
description: Name of the currency
3943639522
example:
3943739523
id: 6016e0a9-545a-45fb-8370-caab1680956a
3943839524
symbol: BTC
@@ -46763,24 +46849,38 @@ components:
4676346849
properties:
4676446850
currency:
4676546851
type: string
46852+
description: Symbol of the instrument (ex. BTC)
4676646853
enterpriseId:
4676746854
type: string
4676846855
format: uuid
46856+
description: Enterprise ID for the margin NOP limit
4676946857
netOpenPosition:
4677046858
type: number
4677146859
format: decimal
46860+
description: Number representing the current net open position for the NOP instrument in question (ex. -10 BTC). Negative means a short position and positive means a long position.
4677246861
netOpenPositionValue:
4677346862
type: number
4677446863
format: decimal
46864+
description: Number representing the net open position denoted in notional amount (ex 600,000 USD)
4677546865
shortMarginPositionNotionalLimit:
46776-
$ref: '#/components/schemas/Amount4'
46866+
allOf:
46867+
- $ref: '#/components/schemas/Amount4'
46868+
- type: object
46869+
description: Number representing the maximum open margin position that can be short in terms of the notional instrument (ex. 10,000 USD) in absolute notional terms, as the NOP is signed
4677746870
longMarginPositionNotionalLimit:
46778-
$ref: '#/components/schemas/Amount4'
46871+
allOf:
46872+
- $ref: '#/components/schemas/Amount4'
46873+
- type: object
46874+
description: Number representing the maximum open margin position that can be long in terms of the notional instrument (ex. 10,000 USD)
4677946875
unrealizedPnL:
46780-
$ref: '#/components/schemas/Amount4'
46876+
allOf:
46877+
- $ref: '#/components/schemas/Amount4'
46878+
- type: object
46879+
description: Number representing the unrealized profit and loss. Difference between the NOP value at the time of creation and the NOP value as of now.
4678146880
lastModified:
4678246881
type: string
4678346882
format: date-time
46883+
description: ISO format datetime for date and time the record was last updated in the database
4678446884
example:
4678546885
currency: BTC
4678646886
enterpriseId: 63925f940c259a00061853808ffea830
@@ -46806,12 +46906,20 @@ components:
4680646906
properties:
4680746907
enterpriseId:
4680846908
type: string
46909+
description: The unique identifier for the enterprise (e.g., "enterprise-123").
4680946910
currency:
4681046911
type: string
46912+
description: The currency symbol for the net open position limit (e.g., "BTC").
4681146913
shortMarginPositionNotionalLimit:
46812-
$ref: '#/components/schemas/Amount4'
46914+
allOf:
46915+
- $ref: '#/components/schemas/Amount4'
46916+
- type: object
46917+
description: Quantity representing the notional limit for short margin positions in the specified currency (e.g., "1000000"). Currency represents the currency in which the quantity is valued (e.g., "BTC").
4681346918
longMarginPositionNotionalLimit:
46814-
$ref: '#/components/schemas/Amount4'
46919+
allOf:
46920+
- $ref: '#/components/schemas/Amount4'
46921+
- type: object
46922+
description: Quantity representing the notional limit for long margin positions in the specified currency (e.g., "2000000"). Currency represents the currency in which the quantity is valued (e.g., "BTC").
4681546923
example:
4681646924
enterpriseId: enterprise-123
4681746925
currency: BTC

0 commit comments

Comments
 (0)