{
  "openapi": "3.1.0",
  "info": {
    "version": "0.1.0",
    "title": "Trading API",
    "description": "The Trading API provides resources to estimate prices and place fill-or-kill orders.",
    "contact": {
      "name": "Uphold API Team",
      "email": "developer@uphold.com",
      "url": "https://developer.uphold.com"
    }
  },
  "servers": [
    {
      "url": "https://api.enterprise.sandbox.uphold.com",
      "description": "Sandbox"
    },
    {
      "url": "https://api.enterprise.uphold.com",
      "description": "Production"
    }
  ],
  "security": [
    {
      "OAuth2": []
    }
  ],
  "tags": [
    {
      "name": "Prices",
      "description": "Prices."
    },
    {
      "name": "Orders",
      "description": "Orders."
    }
  ],
  "paths": {
    "/trading/prices": {
      "post": {
        "operationId": "trading.estimate-price",
        "summary": "Estimate price",
        "description": "Estimate the volume-weighted price to buy or sell a quantity of an asset. The estimate is nonbinding and does not create an order or reserve funds.",
        "tags": [
          "Prices"
        ],
        "x-uphold": {
          "operation": {
            "notImplementedIn": [
              "production"
            ]
          },
          "security": {
            "OAuth2": {
              "subjects": [
                "client",
                "user:business",
                "user:individual"
              ]
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "trading.prices:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/x-on-behalf-of"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-ip"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-agent"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-origin"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-country"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-subdivision"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-city"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/estimate-trading-price-request-body"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/estimate-trading-price-response"
          },
          "400": {
            "$ref": "#/components/responses/bad-request"
          },
          "401": {
            "$ref": "#/components/responses/unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/forbidden"
          },
          "409": {
            "$ref": "#/components/responses/estimate-trading-price-conflict-response"
          },
          "429": {
            "$ref": "#/components/responses/too-many-requests"
          },
          "503": {
            "$ref": "#/components/responses/estimate-trading-price-service-unavailable-response"
          }
        }
      }
    },
    "/trading/orders": {
      "get": {
        "operationId": "trading.list-orders",
        "summary": "List orders",
        "description": "List the orders of a user, newest first.",
        "tags": [
          "Orders"
        ],
        "x-uphold": {
          "operation": {
            "notImplementedIn": [
              "production"
            ]
          },
          "security": {
            "OAuth2": {
              "subjects": [
                "user:business",
                "user:individual"
              ]
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "trading.orders:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/pagination-per-page"
          },
          {
            "$ref": "#/components/parameters/x-on-behalf-of"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-ip"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-agent"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-origin"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-country"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-subdivision"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-city"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/list-trading-orders-response"
          },
          "400": {
            "$ref": "#/components/responses/bad-request"
          },
          "401": {
            "$ref": "#/components/responses/unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/forbidden"
          },
          "429": {
            "$ref": "#/components/responses/too-many-requests"
          }
        }
      },
      "post": {
        "operationId": "trading.create-order",
        "summary": "Create order",
        "description": "Create an order to buy or sell an asset.",
        "tags": [
          "Orders"
        ],
        "x-uphold": {
          "operation": {
            "notImplementedIn": [
              "production"
            ]
          },
          "security": {
            "OAuth2": {
              "subjects": [
                "user:business",
                "user:individual"
              ]
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "trading.orders:create"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/x-on-behalf-of"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-ip"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-agent"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-origin"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-country"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-subdivision"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-city"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/create-trading-order-request-body"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/create-trading-order-replayed-response"
          },
          "201": {
            "$ref": "#/components/responses/create-trading-order-response"
          },
          "400": {
            "$ref": "#/components/responses/bad-request"
          },
          "401": {
            "$ref": "#/components/responses/unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/forbidden"
          },
          "404": {
            "$ref": "#/components/responses/create-trading-order-not-found-response"
          },
          "409": {
            "$ref": "#/components/responses/create-trading-order-conflict-response"
          },
          "429": {
            "$ref": "#/components/responses/too-many-requests"
          },
          "503": {
            "$ref": "#/components/responses/create-trading-order-service-unavailable-response"
          }
        }
      }
    },
    "/trading/orders/{orderId}": {
      "get": {
        "operationId": "trading.get-order",
        "summary": "Get order",
        "description": "Retrieve an order by its id.",
        "tags": [
          "Orders"
        ],
        "x-uphold": {
          "operation": {
            "notImplementedIn": [
              "production"
            ]
          },
          "security": {
            "OAuth2": {
              "subjects": [
                "user:business",
                "user:individual"
              ]
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "trading.orders:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/trading-order-id"
          },
          {
            "$ref": "#/components/parameters/x-on-behalf-of"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-ip"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-agent"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-origin"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-country"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-subdivision"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-city"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/get-trading-order-response"
          },
          "400": {
            "$ref": "#/components/responses/bad-request"
          },
          "401": {
            "$ref": "#/components/responses/unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/forbidden"
          },
          "404": {
            "$ref": "#/components/responses/get-trading-order-not-found-response"
          },
          "429": {
            "$ref": "#/components/responses/too-many-requests"
          }
        }
      }
    },
    "/trading/orders/{orderId}/trades": {
      "get": {
        "operationId": "trading.list-order-trades",
        "summary": "List order trades",
        "description": "List the trades that executed an order, oldest first.",
        "tags": [
          "Orders"
        ],
        "x-uphold": {
          "operation": {
            "notImplementedIn": [
              "production"
            ]
          },
          "security": {
            "OAuth2": {
              "subjects": [
                "user:business",
                "user:individual"
              ]
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "trading.orders:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/trading-order-id"
          },
          {
            "$ref": "#/components/parameters/pagination-per-page"
          },
          {
            "$ref": "#/components/parameters/x-on-behalf-of"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-ip"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-agent"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-origin"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-country"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-subdivision"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-city"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/list-trading-order-trades-response"
          },
          "400": {
            "$ref": "#/components/responses/bad-request"
          },
          "401": {
            "$ref": "#/components/responses/unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/forbidden"
          },
          "404": {
            "$ref": "#/components/responses/list-trading-order-trades-not-found-response"
          },
          "429": {
            "$ref": "#/components/responses/too-many-requests"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "OAuth2": {
        "type": "oauth2",
        "description": "OAuth 2.0",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "/core/oauth2/token",
            "scopes": {
              "trading.prices:read": "Grants access to read prices.",
              "trading.orders:create": "Grants access to create orders.",
              "trading.orders:read": "Grants access to read orders and their trades."
            }
          }
        }
      }
    },
    "parameters": {
      "x-on-behalf-of": {
        "name": "X-On-Behalf-Of",
        "description": "The subject on whose behalf the operation is being performed.",
        "in": "header",
        "schema": {
          "type": "string",
          "pattern": "^(user|client)\\s[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$"
        },
        "examples": {
          "User Identifier": {
            "value": "user cd21b26d-35d2-408a-9201-b8fdbef7a604"
          },
          "Client Identifier": {
            "value": "client 3fa85f64-5717-4562-b3fc-2c963f66afa6"
          }
        }
      },
      "x-uphold-user-ip": {
        "name": "X-Uphold-User-Ip",
        "description": "Contains the IP of the end user that is requesting the operation.",
        "in": "header",
        "schema": {
          "oneOf": [
            {
              "title": "IPv4",
              "type": "string",
              "format": "ipv4"
            },
            {
              "title": "IPv6",
              "type": "string",
              "format": "ipv6"
            }
          ]
        },
        "examples": {
          "User Ip": {
            "value": "47.174.97.164"
          }
        }
      },
      "x-uphold-user-agent": {
        "name": "X-Uphold-User-Agent",
        "description": "Contains the user agent of the end user that is requesting the operation.",
        "in": "header",
        "schema": {
          "$ref": "#/components/schemas/string-no-edge-spaces"
        },
        "examples": {
          "User Agent": {
            "value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36"
          }
        }
      },
      "x-uphold-user-origin": {
        "name": "X-Uphold-User-Origin",
        "description": "Contains the origin of the request made by the end user.",
        "in": "header",
        "schema": {
          "$ref": "#/components/schemas/string-no-edge-spaces"
        },
        "examples": {
          "Origin": {
            "value": "https://uphold.com"
          }
        }
      },
      "x-uphold-user-country": {
        "name": "X-Uphold-User-Country",
        "description": "Contains the code of the country of the end user that is requesting the operation.",
        "in": "header",
        "schema": {
          "$ref": "#/components/schemas/country-code-for-request"
        },
        "examples": {
          "User Country": {
            "value": "US"
          }
        }
      },
      "x-uphold-user-subdivision": {
        "name": "X-Uphold-User-Subdivision",
        "description": "Contains the code of the subdivision of the end user that is requesting the operation.",
        "in": "header",
        "schema": {
          "$ref": "#/components/schemas/subdivision-code-for-request"
        },
        "examples": {
          "User Subdivision": {
            "value": "US-CA"
          }
        }
      },
      "x-uphold-user-city": {
        "name": "X-Uphold-User-City",
        "description": "Contains the name of the city of the end user that is requesting the operation.",
        "in": "header",
        "schema": {
          "$ref": "#/components/schemas/string-no-edge-spaces"
        },
        "examples": {
          "User City": {
            "value": "San Francisco"
          }
        }
      },
      "pagination-per-page": {
        "name": "perPage",
        "description": "The number of items per page.",
        "in": "query",
        "schema": {
          "type": "integer",
          "format": "int32",
          "minimum": 1,
          "maximum": 100,
          "default": 10
        },
        "examples": {
          "10 Items Per Page": {
            "value": 10
          }
        }
      },
      "trading-order-id": {
        "name": "orderId",
        "description": "The order id.",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        },
        "examples": {
          "Order Id": {
            "value": "0192f3a1-7c2e-7d4b-9a1f-3e5c8b2d4f60"
          }
        }
      }
    },
    "schemas": {
      "string-no-edge-spaces": {
        "type": "string",
        "pattern": "^\\S.*\\S$|^\\S$"
      },
      "country-code-for-request": {
        "type": "string",
        "pattern": "^[A-Z]{2}$"
      },
      "subdivision-code-for-request": {
        "type": "string",
        "pattern": "^[A-Z]{2}-[A-Z0-9]{1,3}$"
      },
      "trading-order-side": {
        "description": "Whether the base asset is bought or sold.",
        "type": "string",
        "enum": [
          "buy",
          "sell"
        ]
      },
      "non-zero-decimal-amount": {
        "type": "string",
        "pattern": "^(?!0+(\\.0+)?$)\\d+(\\.\\d+)?$"
      },
      "feedback": {
        "description": "A feedback message with a code and human-readable description.",
        "type": "object",
        "properties": {
          "code": {
            "description": "A short string with a brief explanation about the code reported.",
            "type": "string"
          },
          "message": {
            "description": "A human-readable message providing more details.",
            "type": "string"
          },
          "details": {
            "description": "Additional information about the feedback reported.",
            "type": "object",
            "additionalProperties": true
          }
        },
        "required": [
          "code",
          "message"
        ]
      },
      "error": {
        "description": "The error information.",
        "allOf": [
          {
            "$ref": "#/components/schemas/feedback"
          }
        ]
      },
      "trading-order-type": {
        "description": "The type of the order.",
        "type": "string",
        "enum": [
          "market",
          "limit"
        ]
      },
      "trading-account-node": {
        "type": "object",
        "properties": {
          "type": {
            "description": "The type of the node.",
            "type": "string",
            "enum": [
              "account"
            ]
          },
          "id": {
            "description": "The account id.",
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "required": [
          "type",
          "id"
        ]
      },
      "trading-order-time-in-force": {
        "description": "How long the order stays active. Only `fok` is supported for now.",
        "type": "string",
        "enum": [
          "fok"
        ]
      },
      "trading-order-status": {
        "description": "The status of the order. `closed` does not mean the order executed.",
        "type": "string",
        "enum": [
          "pending",
          "open",
          "closed"
        ]
      },
      "trading-order-execution": {
        "description": "What the order has executed so far.",
        "type": "object",
        "properties": {
          "quantity": {
            "description": "The base quantity executed.",
            "type": "string"
          },
          "notional": {
            "description": "The gross amount executed, in the quote asset.",
            "type": "string"
          },
          "averagePrice": {
            "description": "The average price, in the quote asset per one unit of the base asset. Null until something executes.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "quantity",
          "notional",
          "averagePrice"
        ]
      },
      "trading-order-reason": {
        "description": "Why the order did not execute.",
        "type": "string",
        "enum": [
          "insufficient-liquidity",
          "limit-price-not-met",
          "unspecified-error",
          "venue-closed",
          "venue-limit-exceeded",
          "venue-rejected"
        ]
      },
      "trading-order-timeline-item": {
        "type": "object",
        "properties": {
          "event": {
            "description": "The event that occurred in the order's lifecycle.",
            "type": "string",
            "enum": [
              "created",
              "filled",
              "canceled",
              "rejected",
              "failed"
            ]
          },
          "reason": {
            "$ref": "#/components/schemas/trading-order-reason"
          },
          "createdAt": {
            "description": "The time at which the event occurred.",
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "event",
          "createdAt"
        ]
      },
      "trading-order": {
        "type": "object",
        "properties": {
          "id": {
            "description": "The id of the order.",
            "type": "string",
            "format": "uuid"
          },
          "clientOrderId": {
            "description": "The key chosen when the order was created.",
            "type": "string"
          },
          "side": {
            "$ref": "#/components/schemas/trading-order-side"
          },
          "type": {
            "$ref": "#/components/schemas/trading-order-type"
          },
          "origin": {
            "$ref": "#/components/schemas/trading-account-node"
          },
          "destination": {
            "$ref": "#/components/schemas/trading-account-node"
          },
          "quantity": {
            "description": "The quantity the order was sized by.",
            "type": "string"
          },
          "price": {
            "description": "The limit price. Absent on a market order.",
            "type": "string"
          },
          "timeInForce": {
            "$ref": "#/components/schemas/trading-order-time-in-force"
          },
          "status": {
            "$ref": "#/components/schemas/trading-order-status"
          },
          "execution": {
            "$ref": "#/components/schemas/trading-order-execution"
          },
          "timeline": {
            "description": "The events of the order's lifecycle, oldest first.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/trading-order-timeline-item"
            }
          },
          "createdAt": {
            "description": "The time at which the order was created.",
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "description": "The last time at which the order was updated.",
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "clientOrderId",
          "side",
          "type",
          "origin",
          "destination",
          "quantity",
          "timeInForce",
          "status",
          "execution",
          "timeline",
          "createdAt",
          "updatedAt"
        ]
      },
      "pagination": {
        "description": "The pagination information.",
        "type": "object",
        "properties": {
          "first": {
            "description": "The URL to the first set of results.",
            "type": "string",
            "format": "uri"
          },
          "prev": {
            "description": "The URL to the previous set of results.",
            "type": "string",
            "format": "uri"
          },
          "next": {
            "description": "The URL to the next set of results.",
            "type": "string",
            "format": "uri"
          }
        }
      },
      "trading-trade": {
        "description": "An execution of an order.",
        "type": "object",
        "properties": {
          "transactionId": {
            "description": "The id of the transaction that booked the trade.",
            "type": "string",
            "format": "uuid"
          },
          "quantity": {
            "description": "The base quantity executed.",
            "type": "string"
          },
          "price": {
            "description": "The price, in the quote asset per one unit of the base asset.",
            "type": "string"
          },
          "notional": {
            "description": "The gross amount, in the quote asset.",
            "type": "string"
          },
          "createdAt": {
            "description": "The time at which the trade executed.",
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "transactionId",
          "quantity",
          "price",
          "notional",
          "createdAt"
        ]
      }
    },
    "requestBodies": {
      "estimate-trading-price-request-body": {
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "base": {
                  "description": "The base asset, the one bought or sold.",
                  "type": "string",
                  "minLength": 1
                },
                "quote": {
                  "description": "The quote asset, the one the price is expressed in.",
                  "type": "string",
                  "minLength": 1
                },
                "side": {
                  "$ref": "#/components/schemas/trading-order-side"
                },
                "quantity": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/non-zero-decimal-amount"
                    },
                    {
                      "description": "The quantity of the base asset to estimate the price of."
                    }
                  ]
                }
              },
              "additionalProperties": false,
              "required": [
                "base",
                "quote",
                "side",
                "quantity"
              ]
            },
            "examples": {
              "Sell Half A Bitcoin": {
                "value": {
                  "base": "BTC",
                  "quote": "USD",
                  "side": "sell",
                  "quantity": "0.5"
                }
              },
              "Buy Half A Bitcoin": {
                "value": {
                  "base": "BTC",
                  "quote": "USD",
                  "side": "buy",
                  "quantity": "0.5"
                }
              }
            }
          }
        }
      },
      "create-trading-order-request-body": {
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "clientOrderId": {
                  "description": "A unique key you choose for the order. Replaying it returns the existing order.",
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64
                },
                "side": {
                  "$ref": "#/components/schemas/trading-order-side"
                },
                "type": {
                  "$ref": "#/components/schemas/trading-order-type"
                },
                "origin": {
                  "description": "The account the traded amount leaves.",
                  "$ref": "#/components/schemas/trading-account-node"
                },
                "destination": {
                  "description": "The account the proceeds are credited to.",
                  "$ref": "#/components/schemas/trading-account-node"
                },
                "quantity": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/non-zero-decimal-amount"
                    },
                    {
                      "description": "The quantity of the base asset to trade."
                    }
                  ]
                },
                "price": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/non-zero-decimal-amount"
                    },
                    {
                      "description": "The limit price, in the quote asset per one unit of the base asset. Required on a limit order, and not allowed on a market order."
                    }
                  ]
                },
                "timeInForce": {
                  "$ref": "#/components/schemas/trading-order-time-in-force"
                }
              },
              "additionalProperties": false,
              "required": [
                "clientOrderId",
                "side",
                "type",
                "origin",
                "destination",
                "quantity",
                "timeInForce"
              ]
            },
            "examples": {
              "Sell At Market By Quantity": {
                "value": {
                  "clientOrderId": "3a9e1f7c-2d4b-4e6a-8c1f-5b7d9e2a4c61",
                  "side": "sell",
                  "type": "market",
                  "origin": {
                    "type": "account",
                    "id": "651ffcd3-a706-4c91-82ce-5a5eb9c1da62"
                  },
                  "destination": {
                    "type": "account",
                    "id": "9a3d7e4b-2c1f-4e8d-b7a6-5f4e3d2c1b0a"
                  },
                  "quantity": "0.5",
                  "timeInForce": "fok"
                }
              },
              "Sell With A Limit": {
                "value": {
                  "clientOrderId": "8d5f1c0e-1b2a-4c3d-9e8f-77a0b1c2d3e4",
                  "side": "sell",
                  "type": "limit",
                  "origin": {
                    "type": "account",
                    "id": "651ffcd3-a706-4c91-82ce-5a5eb9c1da62"
                  },
                  "destination": {
                    "type": "account",
                    "id": "9a3d7e4b-2c1f-4e8d-b7a6-5f4e3d2c1b0a"
                  },
                  "quantity": "0.5",
                  "price": "61500.00",
                  "timeInForce": "fok"
                }
              },
              "Buy At Market": {
                "value": {
                  "clientOrderId": "5c1e8a3d-7f2b-4d9e-a6c0-3b8f1e5d9a24",
                  "side": "buy",
                  "type": "market",
                  "origin": {
                    "type": "account",
                    "id": "9a3d7e4b-2c1f-4e8d-b7a6-5f4e3d2c1b0a"
                  },
                  "destination": {
                    "type": "account",
                    "id": "651ffcd3-a706-4c91-82ce-5a5eb9c1da62"
                  },
                  "quantity": "0.25",
                  "timeInForce": "fok"
                }
              }
            }
          }
        }
      }
    },
    "responses": {
      "estimate-trading-price-response": {
        "description": "Price estimated.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "price": {
                  "description": "The estimated volume-weighted execution price, in the quote asset per one unit of the base asset.",
                  "type": "string"
                },
                "snapshotAt": {
                  "description": "The time of the order book snapshot the price was calculated from. It is not the time of the request or of the calculation.",
                  "type": "string",
                  "format": "date-time"
                }
              },
              "additionalProperties": false,
              "required": [
                "price",
                "snapshotAt"
              ]
            },
            "examples": {
              "Price Estimated": {
                "value": {
                  "price": "61919.14",
                  "snapshotAt": "2026-10-12T10:31:04.218Z"
                }
              }
            }
          }
        },
        "headers": {
          "x-uphold-request-id": {
            "description": "A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "Request ID": {
                "value": "a4e390583b3ac581-MRS"
              }
            }
          }
        }
      },
      "bad-request": {
        "description": "Bad Request.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/error"
            },
            "examples": {
              "Invalid Request": {
                "value": {
                  "code": "request_invalid",
                  "message": "The request has missing or invalid parameters",
                  "details": {
                    "context": "<context>",
                    "violations": [
                      {
                        "property": "<property>",
                        "rule": "required"
                      },
                      {
                        "property": "<property>",
                        "rule": "type",
                        "ruleParams": {
                          "type": "string"
                        }
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "headers": {
          "x-uphold-request-id": {
            "description": "A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "Request ID": {
                "value": "a4e390583b3ac581-MRS"
              }
            }
          }
        }
      },
      "unauthorized": {
        "description": "Unauthorized.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/error"
            },
            "examples": {
              "Token Expired": {
                "value": {
                  "code": "token_expired",
                  "message": "The access token has expired"
                }
              },
              "Token Invalid": {
                "value": {
                  "code": "token_invalid",
                  "message": "The access token is invalid"
                }
              },
              "Token Revoked": {
                "value": {
                  "code": "token_revoked",
                  "message": "The access token has been revoked"
                }
              }
            }
          }
        },
        "headers": {
          "x-uphold-request-id": {
            "description": "A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "Request ID": {
                "value": "a4e390583b3ac581-MRS"
              }
            }
          }
        }
      },
      "forbidden": {
        "description": "Forbidden.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/error"
            },
            "examples": {
              "Token Insufficient Scopes": {
                "value": {
                  "code": "token_insufficient_scopes",
                  "message": "Authorization failed due to insufficient scopes",
                  "details": {
                    "security": [
                      {
                        "scheme": "OAuth",
                        "schemeScopes": [
                          "required:scope_1",
                          "required:scope_2"
                        ],
                        "tokenScopes": [
                          "token:scope"
                        ]
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "headers": {
          "x-uphold-request-id": {
            "description": "A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "Request ID": {
                "value": "a4e390583b3ac581-MRS"
              }
            }
          }
        }
      },
      "estimate-trading-price-conflict-response": {
        "description": "Business logic error.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/error"
            },
            "examples": {
              "Insufficient Book Depth": {
                "value": {
                  "code": "transaction_amount_invalid",
                  "message": "The amount exceeds the available order book depth",
                  "details": {
                    "context": "body",
                    "property": "quantity",
                    "rule": "insufficient-book-depth",
                    "limit": {
                      "availableAmount": "7.84"
                    }
                  }
                }
              },
              "Asset Pair Not Supported": {
                "value": {
                  "code": "asset_pair_not_supported",
                  "message": "The asset pair is not supported for trading"
                }
              }
            }
          }
        },
        "headers": {
          "x-uphold-request-id": {
            "description": "A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "Request ID": {
                "value": "a4e390583b3ac581-MRS"
              }
            }
          }
        }
      },
      "too-many-requests": {
        "description": "Too Many Requests.",
        "headers": {
          "Retry-After": {
            "description": "The number of seconds to wait before making a new request.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "examples": {
              "Retry After": {
                "value": 60
              }
            }
          },
          "x-uphold-request-id": {
            "description": "A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "Request ID": {
                "value": "a4e390583b3ac581-MRS"
              }
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/error"
            },
            "examples": {
              "Too Many Requests": {
                "value": {
                  "code": "too_many_requests",
                  "message": "Try again later"
                }
              }
            }
          }
        }
      },
      "estimate-trading-price-service-unavailable-response": {
        "description": "The venue is unavailable.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/error"
            },
            "examples": {
              "Service Unavailable": {
                "value": {
                  "code": "service_unavailable",
                  "message": "Service Unavailable"
                }
              }
            }
          }
        },
        "headers": {
          "x-uphold-request-id": {
            "description": "A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "Request ID": {
                "value": "a4e390583b3ac581-MRS"
              }
            }
          }
        }
      },
      "list-trading-orders-response": {
        "description": "Orders retrieved.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "orders": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/trading-order"
                  }
                },
                "pagination": {
                  "$ref": "#/components/schemas/pagination"
                }
              },
              "required": [
                "orders",
                "pagination"
              ]
            },
            "examples": {
              "Orders Retrieved": {
                "value": {
                  "orders": [
                    {
                      "id": "0192f3a3-9c1d-7e4b-8a2f-3d6c9e1b7a58",
                      "clientOrderId": "7e2c9a4d-1f6b-4d8e-b3a5-9c1e7f2d4b06",
                      "side": "sell",
                      "type": "limit",
                      "origin": {
                        "type": "account",
                        "id": "651ffcd3-a706-4c91-82ce-5a5eb9c1da62"
                      },
                      "destination": {
                        "type": "account",
                        "id": "9a3d7e4b-2c1f-4e8d-b7a6-5f4e3d2c1b0a"
                      },
                      "quantity": "0.5",
                      "price": "62500.00",
                      "timeInForce": "fok",
                      "status": "closed",
                      "execution": {
                        "quantity": "0",
                        "notional": "0",
                        "averagePrice": null
                      },
                      "timeline": [
                        {
                          "event": "created",
                          "createdAt": "2026-10-12T10:36:41.330Z"
                        },
                        {
                          "event": "canceled",
                          "reason": "limit-price-not-met",
                          "createdAt": "2026-10-12T10:36:41.902Z"
                        }
                      ],
                      "createdAt": "2026-10-12T10:36:41.330Z",
                      "updatedAt": "2026-10-12T10:36:41.902Z"
                    },
                    {
                      "id": "0192f3a1-7c2e-7d4b-9a1f-3e5c8b2d4f60",
                      "clientOrderId": "8d5f1c0e-1b2a-4c3d-9e8f-77a0b1c2d3e4",
                      "side": "sell",
                      "type": "limit",
                      "origin": {
                        "type": "account",
                        "id": "651ffcd3-a706-4c91-82ce-5a5eb9c1da62"
                      },
                      "destination": {
                        "type": "account",
                        "id": "9a3d7e4b-2c1f-4e8d-b7a6-5f4e3d2c1b0a"
                      },
                      "quantity": "0.5",
                      "price": "61500.00",
                      "timeInForce": "fok",
                      "status": "closed",
                      "execution": {
                        "quantity": "0.5",
                        "notional": "30959.57",
                        "averagePrice": "61919.14"
                      },
                      "timeline": [
                        {
                          "event": "created",
                          "createdAt": "2026-10-12T10:31:04.512Z"
                        },
                        {
                          "event": "filled",
                          "createdAt": "2026-10-12T10:31:05.104Z"
                        }
                      ],
                      "createdAt": "2026-10-12T10:31:04.512Z",
                      "updatedAt": "2026-10-12T10:31:05.104Z"
                    }
                  ],
                  "pagination": {
                    "first": "https://api.enterprise.uphold.com/trading/orders?page=1&perPage=2",
                    "next": "https://api.enterprise.uphold.com/trading/orders?page=2&perPage=2"
                  }
                }
              }
            }
          }
        },
        "headers": {
          "x-uphold-request-id": {
            "description": "A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "Request ID": {
                "value": "a4e390583b3ac581-MRS"
              }
            }
          }
        }
      },
      "create-trading-order-replayed-response": {
        "description": "Order already existed.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "order": {
                  "$ref": "#/components/schemas/trading-order"
                }
              },
              "required": [
                "order"
              ]
            },
            "examples": {
              "Order Replayed": {
                "value": {
                  "order": {
                    "id": "0192f3a1-7c2e-7d4b-9a1f-3e5c8b2d4f60",
                    "clientOrderId": "8d5f1c0e-1b2a-4c3d-9e8f-77a0b1c2d3e4",
                    "side": "sell",
                    "type": "limit",
                    "origin": {
                      "type": "account",
                      "id": "651ffcd3-a706-4c91-82ce-5a5eb9c1da62"
                    },
                    "destination": {
                      "type": "account",
                      "id": "9a3d7e4b-2c1f-4e8d-b7a6-5f4e3d2c1b0a"
                    },
                    "quantity": "0.5",
                    "price": "61500.00",
                    "timeInForce": "fok",
                    "status": "closed",
                    "execution": {
                      "quantity": "0.5",
                      "notional": "30959.57",
                      "averagePrice": "61919.14"
                    },
                    "timeline": [
                      {
                        "event": "created",
                        "createdAt": "2026-10-12T10:31:04.512Z"
                      },
                      {
                        "event": "filled",
                        "createdAt": "2026-10-12T10:31:05.104Z"
                      }
                    ],
                    "createdAt": "2026-10-12T10:31:04.512Z",
                    "updatedAt": "2026-10-12T10:31:05.104Z"
                  }
                }
              }
            }
          }
        },
        "headers": {
          "x-uphold-request-id": {
            "description": "A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "Request ID": {
                "value": "a4e390583b3ac581-MRS"
              }
            }
          }
        }
      },
      "create-trading-order-response": {
        "description": "Order created.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "order": {
                  "$ref": "#/components/schemas/trading-order"
                }
              },
              "required": [
                "order"
              ]
            },
            "examples": {
              "Order Completed": {
                "value": {
                  "order": {
                    "id": "0192f3a1-7c2e-7d4b-9a1f-3e5c8b2d4f60",
                    "clientOrderId": "8d5f1c0e-1b2a-4c3d-9e8f-77a0b1c2d3e4",
                    "side": "sell",
                    "type": "limit",
                    "origin": {
                      "type": "account",
                      "id": "651ffcd3-a706-4c91-82ce-5a5eb9c1da62"
                    },
                    "destination": {
                      "type": "account",
                      "id": "9a3d7e4b-2c1f-4e8d-b7a6-5f4e3d2c1b0a"
                    },
                    "quantity": "0.5",
                    "price": "61500.00",
                    "timeInForce": "fok",
                    "status": "closed",
                    "execution": {
                      "quantity": "0.5",
                      "notional": "30959.57",
                      "averagePrice": "61919.14"
                    },
                    "timeline": [
                      {
                        "event": "created",
                        "createdAt": "2026-10-12T10:31:04.512Z"
                      },
                      {
                        "event": "filled",
                        "createdAt": "2026-10-12T10:31:05.104Z"
                      }
                    ],
                    "createdAt": "2026-10-12T10:31:04.512Z",
                    "updatedAt": "2026-10-12T10:31:05.104Z"
                  }
                }
              },
              "Limit Not Met": {
                "value": {
                  "order": {
                    "id": "0192f3a3-9c1d-7e4b-8a2f-3d6c9e1b7a58",
                    "clientOrderId": "7e2c9a4d-1f6b-4d8e-b3a5-9c1e7f2d4b06",
                    "side": "sell",
                    "type": "limit",
                    "origin": {
                      "type": "account",
                      "id": "651ffcd3-a706-4c91-82ce-5a5eb9c1da62"
                    },
                    "destination": {
                      "type": "account",
                      "id": "9a3d7e4b-2c1f-4e8d-b7a6-5f4e3d2c1b0a"
                    },
                    "quantity": "0.5",
                    "price": "62500.00",
                    "timeInForce": "fok",
                    "status": "closed",
                    "execution": {
                      "quantity": "0",
                      "notional": "0",
                      "averagePrice": null
                    },
                    "timeline": [
                      {
                        "event": "created",
                        "createdAt": "2026-10-12T10:36:41.330Z"
                      },
                      {
                        "event": "canceled",
                        "reason": "limit-price-not-met",
                        "createdAt": "2026-10-12T10:36:41.902Z"
                      }
                    ],
                    "createdAt": "2026-10-12T10:36:41.330Z",
                    "updatedAt": "2026-10-12T10:36:41.902Z"
                  }
                }
              },
              "Order Processing": {
                "value": {
                  "order": {
                    "id": "0192f3a6-2e9c-7b1d-8f4a-5c3e7a1b9d02",
                    "clientOrderId": "a4d7c2e9-3b6f-4e1a-9c8d-2f5b7e0a1c63",
                    "side": "sell",
                    "type": "market",
                    "origin": {
                      "type": "account",
                      "id": "651ffcd3-a706-4c91-82ce-5a5eb9c1da62"
                    },
                    "destination": {
                      "type": "account",
                      "id": "9a3d7e4b-2c1f-4e8d-b7a6-5f4e3d2c1b0a"
                    },
                    "quantity": "1",
                    "timeInForce": "fok",
                    "status": "pending",
                    "execution": {
                      "quantity": "0",
                      "notional": "0",
                      "averagePrice": null
                    },
                    "timeline": [
                      {
                        "event": "created",
                        "createdAt": "2026-10-12T10:52:40.220Z"
                      }
                    ],
                    "createdAt": "2026-10-12T10:52:40.220Z",
                    "updatedAt": "2026-10-12T10:52:40.220Z"
                  }
                }
              }
            }
          }
        },
        "headers": {
          "x-uphold-request-id": {
            "description": "A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "Request ID": {
                "value": "a4e390583b3ac581-MRS"
              }
            }
          }
        }
      },
      "create-trading-order-not-found-response": {
        "description": "Resource not found.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/error"
            },
            "examples": {
              "Origin Not Found": {
                "value": {
                  "code": "entity_not_found",
                  "message": "The origin cannot be found",
                  "details": {
                    "entity": "account",
                    "context": "body",
                    "property": "origin"
                  }
                }
              },
              "Destination Not Found": {
                "value": {
                  "code": "entity_not_found",
                  "message": "The destination cannot be found",
                  "details": {
                    "entity": "account",
                    "context": "body",
                    "property": "destination"
                  }
                }
              }
            }
          }
        },
        "headers": {
          "x-uphold-request-id": {
            "description": "A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "Request ID": {
                "value": "a4e390583b3ac581-MRS"
              }
            }
          }
        }
      },
      "create-trading-order-conflict-response": {
        "description": "Business logic error.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/error"
            },
            "examples": {
              "Quantity Below Minimum": {
                "value": {
                  "code": "transaction_amount_invalid",
                  "message": "The amount minimum limit was not met",
                  "details": {
                    "context": "body",
                    "property": "quantity",
                    "rule": "minimum-limit-not-met",
                    "limit": {
                      "minimumAmount": "0.0001"
                    }
                  }
                }
              },
              "Quantity Above Maximum": {
                "value": {
                  "code": "transaction_amount_invalid",
                  "message": "The amount maximum limit was exceeded",
                  "details": {
                    "context": "body",
                    "property": "quantity",
                    "rule": "maximum-limit-exceeded",
                    "limit": {
                      "maximumAmount": "10"
                    }
                  }
                }
              },
              "Quantity Increment Invalid": {
                "value": {
                  "code": "transaction_amount_invalid",
                  "message": "The amount is not a multiple of the allowed increment",
                  "details": {
                    "context": "body",
                    "property": "quantity",
                    "rule": "invalid-increment",
                    "limit": {
                      "increment": "0.00000001"
                    }
                  }
                }
              },
              "Price Increment Invalid": {
                "value": {
                  "code": "transaction_amount_invalid",
                  "message": "The amount is not a multiple of the allowed increment",
                  "details": {
                    "context": "body",
                    "property": "price",
                    "rule": "invalid-increment",
                    "limit": {
                      "increment": "0.01"
                    }
                  }
                }
              },
              "Insufficient Book Depth": {
                "value": {
                  "code": "transaction_amount_invalid",
                  "message": "The amount exceeds the available order book depth",
                  "details": {
                    "context": "body",
                    "property": "quantity",
                    "rule": "insufficient-book-depth",
                    "limit": {
                      "availableAmount": "7.84"
                    }
                  }
                }
              },
              "Asset Pair Not Supported": {
                "value": {
                  "code": "asset_pair_not_supported",
                  "message": "The asset pair is not supported for trading"
                }
              },
              "Order Type Not Available": {
                "value": {
                  "code": "operation_not_allowed",
                  "message": "The order type is not available for this asset pair",
                  "details": {
                    "reasons": [
                      "order-type-not-available"
                    ]
                  }
                }
              },
              "Price Out Of Bounds": {
                "value": {
                  "code": "operation_not_allowed",
                  "message": "The venue price deviates too much from the reference rate",
                  "details": {
                    "reasons": [
                      "price-out-of-bounds"
                    ]
                  }
                }
              },
              "Client Order Id Already Used": {
                "value": {
                  "code": "duplicate",
                  "message": "The client order id was already used with a different order",
                  "details": {
                    "context": "body",
                    "property": "clientOrderId"
                  }
                }
              },
              "Unspecified Error": {
                "value": {
                  "code": "operation_not_allowed",
                  "message": "Order not allowed due to an unspecified error",
                  "details": {
                    "reasons": [
                      "unspecified-error"
                    ]
                  }
                }
              }
            }
          }
        },
        "headers": {
          "x-uphold-request-id": {
            "description": "A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "Request ID": {
                "value": "a4e390583b3ac581-MRS"
              }
            }
          }
        }
      },
      "create-trading-order-service-unavailable-response": {
        "description": "The venue is unavailable, or the request timed out.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/error"
            },
            "examples": {
              "Service Unavailable": {
                "value": {
                  "code": "service_unavailable",
                  "message": "Service Unavailable"
                }
              }
            }
          }
        },
        "headers": {
          "x-uphold-request-id": {
            "description": "A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "Request ID": {
                "value": "a4e390583b3ac581-MRS"
              }
            }
          }
        }
      },
      "get-trading-order-response": {
        "description": "Order retrieved.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "order": {
                  "$ref": "#/components/schemas/trading-order"
                }
              },
              "required": [
                "order"
              ]
            },
            "examples": {
              "Order Completed": {
                "value": {
                  "order": {
                    "id": "0192f3a1-7c2e-7d4b-9a1f-3e5c8b2d4f60",
                    "clientOrderId": "8d5f1c0e-1b2a-4c3d-9e8f-77a0b1c2d3e4",
                    "side": "sell",
                    "type": "limit",
                    "origin": {
                      "type": "account",
                      "id": "651ffcd3-a706-4c91-82ce-5a5eb9c1da62"
                    },
                    "destination": {
                      "type": "account",
                      "id": "9a3d7e4b-2c1f-4e8d-b7a6-5f4e3d2c1b0a"
                    },
                    "quantity": "0.5",
                    "price": "61500.00",
                    "timeInForce": "fok",
                    "status": "closed",
                    "execution": {
                      "quantity": "0.5",
                      "notional": "30959.57",
                      "averagePrice": "61919.14"
                    },
                    "timeline": [
                      {
                        "event": "created",
                        "createdAt": "2026-10-12T10:31:04.512Z"
                      },
                      {
                        "event": "filled",
                        "createdAt": "2026-10-12T10:31:05.104Z"
                      }
                    ],
                    "createdAt": "2026-10-12T10:31:04.512Z",
                    "updatedAt": "2026-10-12T10:31:05.104Z"
                  }
                }
              },
              "Order Processing": {
                "value": {
                  "order": {
                    "id": "0192f3a6-2e9c-7b1d-8f4a-5c3e7a1b9d02",
                    "clientOrderId": "a4d7c2e9-3b6f-4e1a-9c8d-2f5b7e0a1c63",
                    "side": "sell",
                    "type": "market",
                    "origin": {
                      "type": "account",
                      "id": "651ffcd3-a706-4c91-82ce-5a5eb9c1da62"
                    },
                    "destination": {
                      "type": "account",
                      "id": "9a3d7e4b-2c1f-4e8d-b7a6-5f4e3d2c1b0a"
                    },
                    "quantity": "1",
                    "timeInForce": "fok",
                    "status": "pending",
                    "execution": {
                      "quantity": "0",
                      "notional": "0",
                      "averagePrice": null
                    },
                    "timeline": [
                      {
                        "event": "created",
                        "createdAt": "2026-10-12T10:52:40.220Z"
                      }
                    ],
                    "createdAt": "2026-10-12T10:52:40.220Z",
                    "updatedAt": "2026-10-12T10:52:40.220Z"
                  }
                }
              },
              "Order Not Filled": {
                "value": {
                  "order": {
                    "id": "0192f3a3-9c1d-7e4b-8a2f-3d6c9e1b7a58",
                    "clientOrderId": "7e2c9a4d-1f6b-4d8e-b3a5-9c1e7f2d4b06",
                    "side": "sell",
                    "type": "limit",
                    "origin": {
                      "type": "account",
                      "id": "651ffcd3-a706-4c91-82ce-5a5eb9c1da62"
                    },
                    "destination": {
                      "type": "account",
                      "id": "9a3d7e4b-2c1f-4e8d-b7a6-5f4e3d2c1b0a"
                    },
                    "quantity": "0.5",
                    "price": "62500.00",
                    "timeInForce": "fok",
                    "status": "closed",
                    "execution": {
                      "quantity": "0",
                      "notional": "0",
                      "averagePrice": null
                    },
                    "timeline": [
                      {
                        "event": "created",
                        "createdAt": "2026-10-12T10:36:41.330Z"
                      },
                      {
                        "event": "canceled",
                        "reason": "limit-price-not-met",
                        "createdAt": "2026-10-12T10:36:41.902Z"
                      }
                    ],
                    "createdAt": "2026-10-12T10:36:41.330Z",
                    "updatedAt": "2026-10-12T10:36:41.902Z"
                  }
                }
              }
            }
          }
        },
        "headers": {
          "x-uphold-request-id": {
            "description": "A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "Request ID": {
                "value": "a4e390583b3ac581-MRS"
              }
            }
          }
        }
      },
      "get-trading-order-not-found-response": {
        "description": "Resource not found.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/error"
            },
            "examples": {
              "Order Not Found": {
                "value": {
                  "code": "entity_not_found",
                  "message": "The order cannot be found",
                  "details": {
                    "entity": "order"
                  }
                }
              }
            }
          }
        },
        "headers": {
          "x-uphold-request-id": {
            "description": "A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "Request ID": {
                "value": "a4e390583b3ac581-MRS"
              }
            }
          }
        }
      },
      "list-trading-order-trades-response": {
        "description": "Trades retrieved.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "trades": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/trading-trade"
                  }
                },
                "pagination": {
                  "$ref": "#/components/schemas/pagination"
                }
              },
              "required": [
                "trades",
                "pagination"
              ]
            },
            "examples": {
              "Trades Retrieved": {
                "value": {
                  "trades": [
                    {
                      "transactionId": "3f6c2a9e-8b1d-4e7f-a2c5-9d0e1b4a7c36",
                      "quantity": "0.5",
                      "price": "61919.14",
                      "notional": "30959.57",
                      "createdAt": "2026-10-12T10:31:05.104Z"
                    }
                  ],
                  "pagination": {
                    "first": "https://api.enterprise.uphold.com/trading/orders/0192f3a1-7c2e-7d4b-9a1f-3e5c8b2d4f60/trades?page=1&perPage=10"
                  }
                }
              },
              "No Trades": {
                "value": {
                  "trades": [],
                  "pagination": {}
                }
              }
            }
          }
        },
        "headers": {
          "x-uphold-request-id": {
            "description": "A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "Request ID": {
                "value": "a4e390583b3ac581-MRS"
              }
            }
          }
        }
      },
      "list-trading-order-trades-not-found-response": {
        "description": "Resource not found.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/error"
            },
            "examples": {
              "Order Not Found": {
                "value": {
                  "code": "entity_not_found",
                  "message": "The order cannot be found",
                  "details": {
                    "entity": "order"
                  }
                }
              }
            }
          }
        },
        "headers": {
          "x-uphold-request-id": {
            "description": "A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "Request ID": {
                "value": "a4e390583b3ac581-MRS"
              }
            }
          }
        }
      }
    }
  }
}