Skip to content

Commit 2f8f6c7

Browse files
feat: update bitgo-api-docs
This commit updates the BitGo API.
1 parent 70d40cb commit 2f8f6c7

File tree

1 file changed

+113
-26
lines changed

1 file changed

+113
-26
lines changed

api.yaml

Lines changed: 113 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -22584,6 +22584,78 @@ paths:
2258422584
application/json:
2258522585
schema:
2258622586
$ref: '#/components/schemas/ClosePositionRequestResponse'
22587+
/api/prime/trading/v1/accounts/{accountID}/margin/positions/close/requests:
22588+
get:
22589+
summary: List close position requests
22590+
description: List all close position requests for an account with optional filters on status and creation date.
22591+
operationId: trade.margin.positions.close.requests.list
22592+
tags:
22593+
- Margin
22594+
parameters:
22595+
- name: accountID
22596+
in: path
22597+
required: true
22598+
description: The ID of the account.
22599+
schema:
22600+
type: string
22601+
- name: offset
22602+
in: query
22603+
required: false
22604+
description: Pagination offset.
22605+
schema:
22606+
type: integer
22607+
default: 0
22608+
- name: limit
22609+
in: query
22610+
required: false
22611+
description: Number of items per page.
22612+
schema:
22613+
type: integer
22614+
default: 500
22615+
maximum: 500
22616+
- name: status
22617+
in: query
22618+
required: false
22619+
description: Filter by close position request status. Multiple statuses can be provided as comma-separated values.
22620+
schema:
22621+
type: string
22622+
enum:
22623+
- pending
22624+
- in_progress
22625+
- completed
22626+
- failed
22627+
- cancelled
22628+
- name: dateGte
22629+
in: query
22630+
description: Return close position requests with a `createdAt` that is greater than or equal to the given timestamp,
22631+
required: false
22632+
style: form
22633+
explode: true
22634+
schema:
22635+
type: string
22636+
format: date-time
22637+
- name: dateLt
22638+
in: query
22639+
description: Return close position requests with a `createdAt` that is less than the given timestamp.
22640+
required: false
22641+
style: form
22642+
explode: true
22643+
schema:
22644+
type: string
22645+
format: date-time
22646+
responses:
22647+
'200':
22648+
description: List of close position requests
22649+
content:
22650+
application/json:
22651+
schema:
22652+
$ref: '#/components/schemas/ClosePositionRequestsResponse'
22653+
default:
22654+
description: unexpected error
22655+
content:
22656+
application/json:
22657+
schema:
22658+
$ref: '#/components/schemas/Error'
2258722659
/api/prime/trading/v1/accounts/{accountID}/margin/positions/close/requests/{closePositionRequestID}:
2258822660
get:
2258922661
summary: Get close position request details
@@ -42806,13 +42878,22 @@ components:
4280642878
type: object
4280742879
required:
4280842880
- closePositionsRequestId
42881+
- accountId
42882+
- enterpriseId
4280942883
- status
42810-
- createdAt
42884+
- bitgoUserId
42885+
- creationDate
4281142886
properties:
4281242887
closePositionsRequestId:
4281342888
type: string
4281442889
format: uuid
4281542890
description: Unique identifier for the close position request
42891+
accountId:
42892+
type: string
42893+
description: Account ID associated with the request
42894+
enterpriseId:
42895+
type: string
42896+
description: Enterprise ID associated with the request
4281642897
status:
4281742898
type: string
4281842899
enum:
@@ -42822,37 +42903,43 @@ components:
4282242903
- failed
4282342904
- cancelled
4282442905
description: Current status of the close position request
42825-
currencies:
42826-
type: array
42827-
items:
42828-
type: string
42829-
description: List of currencies to close positions for
42830-
all:
42831-
type: boolean
42832-
description: Whether to close all positions
42833-
createdAt:
42834-
type: string
42835-
format: date-time
42836-
description: Timestamp when the request was created
42837-
updatedAt:
42906+
bitgoUserId:
4283842907
type: string
42839-
format: date-time
42840-
description: Timestamp when the request was last updated
42841-
completedAt:
42908+
description: BitGo user ID who initiated the request
42909+
creationDate:
4284242910
type: string
4284342911
format: date-time
42844-
description: Timestamp when the request was completed
42845-
failureReason:
42846-
type: string
42847-
description: Reason for failure if status is failed
42912+
description: Timestamp when the request was created
4284842913
example:
4284942914
closePositionsRequestId: b2c3d4e5-f6g7-8901-bcde-f23456789012
42915+
accountId: f230fdebfa084ffebc7e00515f54603f
42916+
enterpriseId: a130kjebfa084ffebc7e00515f54603f
4285042917
status: pending
42851-
currencies:
42852-
- BTC
42853-
- ETH
42854-
createdAt: 2024-01-15T11:00:00.000Z
42855-
updatedAt: 2024-01-15T11:00:00.000Z
42918+
bitgoUserId: user123
42919+
creationDate: 2024-01-15T11:00:00.000Z
42920+
ClosePositionRequestsResponse:
42921+
type: object
42922+
required:
42923+
- data
42924+
properties:
42925+
data:
42926+
type: array
42927+
items:
42928+
$ref: '#/components/schemas/ClosePositionRequestResponse'
42929+
example:
42930+
data:
42931+
- closePositionsRequestId: b2c3d4e5-f6g7-8901-bcde-f23456789012
42932+
accountId: f230fdebfa084ffebc7e00515f54603f
42933+
enterpriseId: a130kjebfa084ffebc7e00515f54603f
42934+
status: pending
42935+
bitgoUserId: user123
42936+
creationDate: 2024-01-15T11:00:00.000Z
42937+
- closePositionsRequestId: c3d4e5f6-g7h8-9012-cdef-345678901234
42938+
accountId: a980fdebfa084ffebc7e00515f54603f
42939+
enterpriseId: c109kjebfa084ffebc7e00515f54603f
42940+
status: completed
42941+
bitgoUserId: user456
42942+
creationDate: 2024-01-15T10:30:00.000Z
4285642943
ClosedByUnion:
4285742944
title: ClosedByUnion
4285842945
type: string

0 commit comments

Comments
 (0)