From 2f8f6c776beecc46d9eef786fb56dcbbfb60c9cf Mon Sep 17 00:00:00 2001 From: "dev-portal-updater[bot]" <149019135+dev-portal-updater[bot]@users.noreply.github.com> Date: Mon, 15 Sep 2025 16:31:27 +0000 Subject: [PATCH] feat: update `bitgo-api-docs` This commit updates the BitGo API. --- api.yaml | 139 ++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 113 insertions(+), 26 deletions(-) diff --git a/api.yaml b/api.yaml index fbb5569..450e3d8 100644 --- a/api.yaml +++ b/api.yaml @@ -22584,6 +22584,78 @@ paths: application/json: schema: $ref: '#/components/schemas/ClosePositionRequestResponse' + /api/prime/trading/v1/accounts/{accountID}/margin/positions/close/requests: + get: + summary: List close position requests + description: List all close position requests for an account with optional filters on status and creation date. + operationId: trade.margin.positions.close.requests.list + tags: + - Margin + parameters: + - name: accountID + in: path + required: true + description: The ID of the account. + schema: + type: string + - name: offset + in: query + required: false + description: Pagination offset. + schema: + type: integer + default: 0 + - name: limit + in: query + required: false + description: Number of items per page. + schema: + type: integer + default: 500 + maximum: 500 + - name: status + in: query + required: false + description: Filter by close position request status. Multiple statuses can be provided as comma-separated values. + schema: + type: string + enum: + - pending + - in_progress + - completed + - failed + - cancelled + - name: dateGte + in: query + description: Return close position requests with a `createdAt` that is greater than or equal to the given timestamp, + required: false + style: form + explode: true + schema: + type: string + format: date-time + - name: dateLt + in: query + description: Return close position requests with a `createdAt` that is less than the given timestamp. + required: false + style: form + explode: true + schema: + type: string + format: date-time + responses: + '200': + description: List of close position requests + content: + application/json: + schema: + $ref: '#/components/schemas/ClosePositionRequestsResponse' + default: + description: unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' /api/prime/trading/v1/accounts/{accountID}/margin/positions/close/requests/{closePositionRequestID}: get: summary: Get close position request details @@ -42806,13 +42878,22 @@ components: type: object required: - closePositionsRequestId + - accountId + - enterpriseId - status - - createdAt + - bitgoUserId + - creationDate properties: closePositionsRequestId: type: string format: uuid description: Unique identifier for the close position request + accountId: + type: string + description: Account ID associated with the request + enterpriseId: + type: string + description: Enterprise ID associated with the request status: type: string enum: @@ -42822,37 +42903,43 @@ components: - failed - cancelled description: Current status of the close position request - currencies: - type: array - items: - type: string - description: List of currencies to close positions for - all: - type: boolean - description: Whether to close all positions - createdAt: - type: string - format: date-time - description: Timestamp when the request was created - updatedAt: + bitgoUserId: type: string - format: date-time - description: Timestamp when the request was last updated - completedAt: + description: BitGo user ID who initiated the request + creationDate: type: string format: date-time - description: Timestamp when the request was completed - failureReason: - type: string - description: Reason for failure if status is failed + description: Timestamp when the request was created example: closePositionsRequestId: b2c3d4e5-f6g7-8901-bcde-f23456789012 + accountId: f230fdebfa084ffebc7e00515f54603f + enterpriseId: a130kjebfa084ffebc7e00515f54603f status: pending - currencies: - - BTC - - ETH - createdAt: 2024-01-15T11:00:00.000Z - updatedAt: 2024-01-15T11:00:00.000Z + bitgoUserId: user123 + creationDate: 2024-01-15T11:00:00.000Z + ClosePositionRequestsResponse: + type: object + required: + - data + properties: + data: + type: array + items: + $ref: '#/components/schemas/ClosePositionRequestResponse' + example: + data: + - closePositionsRequestId: b2c3d4e5-f6g7-8901-bcde-f23456789012 + accountId: f230fdebfa084ffebc7e00515f54603f + enterpriseId: a130kjebfa084ffebc7e00515f54603f + status: pending + bitgoUserId: user123 + creationDate: 2024-01-15T11:00:00.000Z + - closePositionsRequestId: c3d4e5f6-g7h8-9012-cdef-345678901234 + accountId: a980fdebfa084ffebc7e00515f54603f + enterpriseId: c109kjebfa084ffebc7e00515f54603f + status: completed + bitgoUserId: user456 + creationDate: 2024-01-15T10:30:00.000Z ClosedByUnion: title: ClosedByUnion type: string