{
"openapi": "3.0.0",
"paths": {
"/v1/order": {
"get": {
"operationId": "OrderController_listBySubaccountId",
"parameters": [
{
"name": "order",
"required": false,
"in": "query",
"description": "Direction to paginate through objects",
"schema": {
"type": "string",
"enum": [
"asc",
"desc"
]
}
},
{
"name": "limit",
"required": false,
"in": "query",
"description": "Limit the number of objects to return",
"schema": {
"type": "number"
}
},
{
"name": "cursor",
"required": false,
"in": "query",
"description": "Pointer to the current object in pagination dataset",
"schema": {
"type": "string"
}
},
{
"name": "subaccountId",
"required": true,
"in": "query",
"description": "Id of the subaccount to query for",
"schema": {
"format": "uuid",
"type": "string"
}
},
{
"name": "clientOrderId",
"required": false,
"in": "query",
"description": "Client-generated order id to query for (either a valid UUID or alphanumeric string up to 32 characters)",
"schema": {
"type": "string"
}
},
{
"name": "productIds",
"required": false,
"in": "query",
"description": "Array of product ids to filter for",
"schema": {
"minItems": 1,
"uniqueItems": true,
"type": "array",
"items": {
"type": "string",
"format": "uuid"
}
}
},
{
"name": "createdAfter",
"required": false,
"in": "query",
"description": "Filter by orders created after timestamp exclusive (ms since Unix epoch)",
"schema": {
"type": "number"
}
},
{
"name": "createdBefore",
"required": false,
"in": "query",
"description": "Filter by orders created before timestamp inclusive (ms since Unix epoch)",
"schema": {
"type": "number"
}
},
{
"name": "side",
"required": false,
"in": "query",
"description": "Side of the order to filter for",
"schema": {
"type": "number",
"enum": [
0,
1
]
}
},
{
"name": "close",
"required": false,
"in": "query",
"description": "Whether the order is a position close order",
"schema": {
"type": "boolean"
}
},
{
"name": "stopTypes",
"required": false,
"in": "query",
"description": "Array of StopTypes to filter by",
"deprecated": true,
"schema": {
"uniqueItems": true,
"example": 0,
"type": "array",
"items": {
"type": "number",
"enum": [
0,
1
]
}
}
},
{
"name": "isWorking",
"required": false,
"in": "query",
"description": "Filter by orders that are working: NEW, FILLED_PARTIAL",
"schema": {
"example": true,
"type": "boolean",
"enum": [
true
]
}
},
{
"name": "isPending",
"required": false,
"in": "query",
"description": "Filter by orders that are pending",
"schema": {
"example": true,
"type": "boolean",
"enum": [
true
]
}
},
{
"name": "orderBy",
"required": false,
"in": "query",
"description": "Order by field",
"schema": {
"example": "createdAt",
"type": "string",
"enum": [
"createdAt"
]
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PageOfOrderDtos"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForbiddenDto"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFoundDto"
}
}
}
},
"422": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnprocessableEntityDto"
}
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TooManyRequestsDto"
}
}
}
},
"500": {
"description": "Internal Server Error"
}
},
"summary": "Returns a filtered array of orders by the subaccount",
"tags": [
"Order"
]
},
"post": {
"operationId": "OrderController_submit",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SubmitOrderDto"
}
}
}
},
"responses": {
"201": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SubmitOrderCreatedDto"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForbiddenDto"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFoundDto"
}
}
}
},
"422": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SubmitOrderFailedDto"
}
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TooManyRequestsDto"
}
}
}
},
"500": {
"description": "Internal Server Error"
}
},
"summary": "Place an order for trading",
"tags": [
"Order"
]
}
},
"/v1/order/dry-run": {
"post": {
"operationId": "OrderController_dryRun",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SubmitDryOrderDto"
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DryRunOrderCreatedDto"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForbiddenDto"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFoundDto"
}
}
}
},
"422": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DryRunOrderFailedUnprocessableEntityDto"
}
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TooManyRequestsDto"
}
}
}
},
"500": {
"description": "Internal Server Error"
}
},
"summary": "Submits a dry-mode to simulate an order submission",
"tags": [
"Order"
]
}
},
"/v1/order/cancel": {
"post": {
"operationId": "OrderController_cancel",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CancelOrderDto"
}
}
}
},
"responses": {
"202": {
"description": "Orders cancelation accepted",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ListOfCancelOrderResultDtos"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForbiddenDto"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFoundDto"
}
}
}
},
"422": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnprocessableEntityDto"
}
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TooManyRequestsDto"
}
}
}
},
"500": {
"description": "Internal Server Error"
}
},
"summary": "Cancels one or more orders given an array of order ids",
"tags": [
"Order"
]
}
},
"/v1/order/fill": {
"get": {
"operationId": "OrderController_listFillsBySubaccountId",
"parameters": [
{
"name": "order",
"required": false,
"in": "query",
"description": "Direction to paginate through objects",
"schema": {
"type": "string",
"enum": [
"asc",
"desc"
]
}
},
{
"name": "limit",
"required": false,
"in": "query",
"description": "Limit the number of objects to return",
"schema": {
"type": "number"
}
},
{
"name": "cursor",
"required": false,
"in": "query",
"description": "Pointer to the current object in pagination dataset",
"schema": {
"type": "string"
}
},
{
"name": "subaccountId",
"required": true,
"in": "query",
"description": "Id of the subaccount to filter fills by",
"schema": {
"format": "uuid",
"type": "string"
}
},
{
"name": "productIds",
"required": false,
"in": "query",
"description": "Array of product ids to filter for",
"schema": {
"minItems": 1,
"uniqueItems": true,
"type": "array",
"items": {
"type": "string",
"format": "uuid"
}
}
},
{
"name": "createdAfter",
"required": false,
"in": "query",
"description": "Filter by order fills created before timestamp exclusive (ms since Unix epoch)",
"schema": {
"type": "number"
}
},
{
"name": "createdBefore",
"required": false,
"in": "query",
"description": "Filter by order fills created before timestamp inclusive (ms since Unix epoch)",
"schema": {
"type": "number"
}
},
{
"name": "side",
"required": false,
"in": "query",
"description": "Side as either BUY (0) or SELL (1)",
"x-enum-varnames": [
"BUY",
"SELL"
],
"schema": {
"example": 0,
"type": "number",
"enum": [
0,
1
]
}
},
{
"name": "orderBy",
"required": false,
"in": "query",
"description": "Order by field",
"schema": {
"example": "productId",
"type": "string",
"enum": [
"productId",
"filled",
"price",
"createdAt"
]
}
},
{
"name": "includeSelfTrades",
"required": false,
"in": "query",
"description": "Explicitly include self trades (excluded by default)",
"schema": {
"default": false,
"type": "boolean"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PageOfOrderFillDtos"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForbiddenDto"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFoundDto"
}
}
}
},
"422": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnprocessableEntityDto"
}
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TooManyRequestsDto"
}
}
}
},
"500": {
"description": "Internal Server Error"
}
},
"summary": "Returns a filtered array of order fills",
"tags": [
"Order"
]
}
},
"/v1/order/trade": {
"get": {
"operationId": "OrderController_listTrades",
"parameters": [
{
"name": "order",
"required": false,
"in": "query",
"description": "Direction to paginate through objects",
"schema": {
"type": "string",
"enum": [
"asc",
"desc"
]
}
},
{
"name": "limit",
"required": false,
"in": "query",
"description": "Limit the number of objects to return",
"schema": {
"type": "number"
}
},
{
"name": "cursor",
"required": false,
"in": "query",
"description": "Pointer to the current object in pagination dataset",
"schema": {
"type": "string"
}
},
{
"name": "productId",
"required": true,
"in": "query",
"description": "Id of the product to filter trades by",
"schema": {
"format": "uuid",
"example": "1b67d5b3-9dc7-4410-bc9c-7fd23ebd32ee",
"type": "string"
}
},
{
"name": "orderBy",
"required": false,
"in": "query",
"description": "Order by fields",
"schema": {
"example": "createdAt",
"type": "string",
"enum": [
"createdAt"
]
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PageOfTradeDtos"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForbiddenDto"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFoundDto"
}
}
}
},
"422": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnprocessableEntityDto"
}
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TooManyRequestsDto"
}
}
}
},
"500": {
"description": "Internal Server Error"
}
},
"summary": "Returns a filtered array of trades",
"tags": [
"Order"
]
}
},
"/v1/order/{id}": {
"get": {
"operationId": "OrderController_getById",
"parameters": [
{
"name": "id",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/OrderDto"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForbiddenDto"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFoundDto"
}
}
}
},
"422": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnprocessableEntityDto"
}
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TooManyRequestsDto"
}
}
}
},
"500": {
"description": "Internal Server Error"
}
},
"summary": "Returns an order by their id",
"tags": [
"Order"
]
}
},
"/v1/position": {
"get": {
"operationId": "PositionController_listBySubaccountId",
"parameters": [
{
"name": "order",
"required": false,
"in": "query",
"description": "Direction to paginate through objects",
"schema": {
"type": "string",
"enum": [
"asc",
"desc"
]
}
},
{
"name": "limit",
"required": false,
"in": "query",
"description": "Limit the number of objects to return",
"schema": {
"type": "number"
}
},
{
"name": "cursor",
"required": false,
"in": "query",
"description": "Pointer to the current object in pagination dataset",
"schema": {
"type": "string"
}
},
{
"name": "subaccountId",
"required": true,
"in": "query",
"description": "Id representing the registered subaccount",
"schema": {
"format": "uuid",
"type": "string"
}
},
{
"name": "productIds",
"required": false,
"in": "query",
"description": "Array of product ids to filter for",
"schema": {
"minItems": 1,
"uniqueItems": true,
"type": "array",
"items": {
"type": "string",
"format": "uuid"
}
}
},
{
"name": "open",
"required": false,
"in": "query",
"description": "Include or exclude open positions (i.e. non-zero size)",
"schema": {
"example": true,
"type": "boolean"
}
},
{
"name": "orderBy",
"required": false,
"in": "query",
"description": "Order by field",
"schema": {
"example": "size",
"type": "string",
"enum": [
"size",
"createdAt",
"updatedAt",
"realizedPnl"
]
}
},
{
"name": "createdAfter",
"required": false,
"in": "query",
"description": "Filter by order fills created before timestamp exclusive (ms since Unix epoch)",
"schema": {
"type": "number"
}
},
{
"name": "createdBefore",
"required": false,
"in": "query",
"description": "Filter by order fills created before timestamp inclusive (ms since Unix epoch)",
"schema": {
"type": "number"
}
},
{
"name": "side",
"required": false,
"in": "query",
"description": "Side as either BUY (0) or SELL (1)",
"x-enum-varnames": [
"BUY",
"SELL"
],
"schema": {
"example": 0,
"type": "number",
"enum": [
0,
1
]
}
},
{
"name": "isLiquidated",
"required": false,
"in": "query",
"description": "Filter by liquidated positions",
"schema": {
"example": false,
"type": "boolean"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PageOfPositionDtos"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForbiddenDto"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFoundDto"
}
}
}
},
"422": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnprocessableEntityDto"
}
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TooManyRequestsDto"
}
}
}
},
"500": {
"description": "Internal Server Error"
}
},
"summary": "Returns a filtered list of positions for a given subaccount",
"tags": [
"Position"
]
}
},
"/v1/position/active": {
"get": {
"operationId": "PositionController_getActive",
"parameters": [
{
"name": "subaccountId",
"required": true,
"in": "query",
"description": "Id representing the registered subaccount",
"schema": {
"format": "uuid",
"type": "string"
}
},
{
"name": "productId",
"required": true,
"in": "query",
"description": "Id of product to filter position by",
"schema": {
"format": "uuid",
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PositionDto"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForbiddenDto"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFoundDto"
}
}
}
},
"422": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnprocessableEntityDto"
}
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TooManyRequestsDto"
}
}
}
},
"500": {
"description": "Internal Server Error"
}
},
"summary": "Returns the active position for a subaccount and product",
"tags": [
"Position"
]
}
},
"/v1/position/{id}": {
"get": {
"operationId": "PositionController_getById",
"parameters": [
{
"name": "id",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PositionDto"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForbiddenDto"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFoundDto"
}
}
}
},
"422": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnprocessableEntityDto"
}
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TooManyRequestsDto"
}
}
}
},
"500": {
"description": "Internal Server Error"
}
},
"summary": "Returns position by id",
"tags": [
"Position"
]
}
},
"/v1/position/fill": {
"get": {
"operationId": "PositionController_listFillsByPositionId",
"parameters": [
{
"name": "order",
"required": false,
"in": "query",
"description": "Direction to paginate through objects",
"schema": {
"type": "string",
"enum": [
"asc",
"desc"
]
}
},
{
"name": "limit",
"required": false,
"in": "query",
"description": "Limit the number of objects to return",
"schema": {
"type": "number"
}
},
{
"name": "cursor",
"required": false,
"in": "query",
"description": "Pointer to the current object in pagination dataset",
"schema": {
"type": "string"
}
},
{
"name": "positionId",
"required": true,
"in": "query",
"description": "Id of the position to filter fills by",
"schema": {
"format": "uuid",
"example": "81215694-2d9f-4a87-af57-a710118938c0",
"type": "string"
}
},
{
"name": "orderBy",
"required": false,
"in": "query",
"description": "Order by field",
"schema": {
"example": "price",
"type": "string",
"enum": [
"price",
"filled",
"createdAt"
]
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PageOfPositionFillDtos"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForbiddenDto"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFoundDto"
}
}
}
},
"422": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnprocessableEntityDto"
}
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TooManyRequestsDto"
}
}
}
},
"500": {
"description": "Internal Server Error"
}
},
"summary": "Returns a filtered list of fills for a given position",
"tags": [
"Position"
]
}
},
"/v1/position/liquidation": {
"get": {
"operationId": "PositionController_listLiquidationsBySubaccountId",
"parameters": [
{
"name": "order",
"required": false,
"in": "query",
"description": "Direction to paginate through objects",
"schema": {
"type": "string",
"enum": [
"desc"
]
}
},
{
"name": "limit",
"required": false,
"in": "query",
"description": "Limit the number of objects to return",
"schema": {
"type": "number"
}
},
{
"name": "cursor",
"required": false,
"in": "query",
"description": "Pointer to the current object in pagination dataset",
"schema": {
"type": "string"
}
},
{
"name": "orderBy",
"required": false,
"in": "query",
"description": "Order by field",
"schema": {
"example": "createdAt",
"type": "string",
"enum": [
"createdAt"
]
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PageOfPositionLiquidationsDto"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForbiddenDto"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFoundDto"
}
}
}
},
"422": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnprocessableEntityDto"
}
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TooManyRequestsDto"
}
}
}
},
"500": {
"description": "Internal Server Error"
}
},
"summary": "Returns a list of liquidations",
"tags": [
"Position"
]
}
},
"/v1/product": {
"get": {
"operationId": "ProductController_list",
"parameters": [
{
"name": "order",
"required": false,
"in": "query",
"description": "Direction to paginate through objects",
"schema": {
"type": "string",
"enum": [
"asc",
"desc"
]
}
},
{
"name": "limit",
"required": false,
"in": "query",
"description": "Limit the number of objects to return",
"schema": {
"type": "number"
}
},
{
"name": "cursor",
"required": false,
"in": "query",
"description": "Pointer to the current object in pagination dataset",
"schema": {
"type": "string"
}
},
{
"name": "orderBy",
"required": false,
"in": "query",
"description": "Order by field",
"schema": {
"example": "createdAt",
"type": "string",
"enum": [
"createdAt",
"openInterest",
"baseTokenName",
"quoteTokenName"
]
}
},
{
"name": "ticker",
"required": false,
"in": "query",
"description": "Filter products by ticker (case insensitive)",
"schema": {
"minLength": 1,
"maxLength": 32,
"example": "ETHUSD",
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PageOfProductDtos"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForbiddenDto"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFoundDto"
}
}
}
},
"422": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnprocessableEntityDto"
}
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TooManyRequestsDto"
}
}
}
},
"500": {
"description": "Internal Server Error"
}
},
"summary": "Returns a list of all products and its configuration",
"tags": [
"Product"
]
}
},
"/v1/product/market-liquidity": {
"get": {
"operationId": "ProductController_getMarketLiquidity",
"parameters": [
{
"name": "productId",
"required": true,
"in": "query",
"description": "Id representing the registered product",
"schema": {
"format": "uuid",
"example": "9036443a-441a-4a66-87f2-bd5c44cdca7a",
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MarketLiquidityDto"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForbiddenDto"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFoundDto"
}
}
}
},
"422": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnprocessableEntityDto"
}
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TooManyRequestsDto"
}
}
}
},
"500": {
"description": "Internal Server Error"
}
},
"summary": "Returns the product market liquidity by id",
"tags": [
"Product"
]
}
},
"/v1/product/market-price": {
"get": {
"operationId": "ProductController_getMarketPrice",
"parameters": [
{
"name": "productIds",
"required": true,
"in": "query",
"description": "Array of product ids",
"schema": {
"minItems": 1,
"maxItems": 10,
"uniqueItems": true,
"type": "array",
"items": {
"type": "string",
"format": "uuid"
}
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ListOfMarketPriceDtos"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForbiddenDto"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFoundDto"
}
}
}
},
"422": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnprocessableEntityDto"
}
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TooManyRequestsDto"
}
}
}
},
"500": {
"description": "Internal Server Error"
}
},
"summary": "Returns the product prices for an array of product ids",
"tags": [
"Product"
]
}
},
"/v1/product/{id}": {
"get": {
"operationId": "ProductController_getById",
"parameters": [
{
"name": "id",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProductDto"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForbiddenDto"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFoundDto"
}
}
}
},
"422": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnprocessableEntityDto"
}
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TooManyRequestsDto"
}
}
}
},
"500": {
"description": "Internal Server Error"
}
},
"summary": "Returns product by id",
"tags": [
"Product"
]
}
},
"/v1/funding": {
"get": {
"operationId": "FundingController_listByProductId",
"parameters": [
{
"name": "order",
"required": false,
"in": "query",
"description": "Direction to paginate through objects",
"schema": {
"type": "string",
"enum": [
"asc",
"desc"
]
}
},
{
"name": "limit",
"required": false,
"in": "query",
"description": "Limit the number of objects to return",
"schema": {
"type": "number"
}
},
{
"name": "cursor",
"required": false,
"in": "query",
"description": "Pointer to the current object in pagination dataset",
"schema": {
"type": "string"
}
},
{
"name": "productId",
"required": true,
"in": "query",
"description": "Id representing the registered product",
"schema": {
"format": "uuid",
"type": "string"
}
},
{
"name": "range",
"required": true,
"in": "query",
"description": "The range of time of funding rates to retrieve",
"schema": {
"example": "DAY",
"type": "string",
"enum": [
"DAY",
"WEEK",
"MONTH"
]
}
},
{
"name": "orderBy",
"required": false,
"in": "query",
"description": "Order by field",
"schema": {
"example": "createdAt",
"type": "string",
"enum": [
"createdAt"
]
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PageOfFundingDtos"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForbiddenDto"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFoundDto"
}
}
}
},
"422": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnprocessableEntityDto"
}
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TooManyRequestsDto"
}
}
}
},
"500": {
"description": "Internal Server Error"
}
},
"summary": "Returns a list funding rates for a product over a time period",
"tags": [
"Funding"
]
}
},
"/v1/funding/projected": {
"get": {
"deprecated": true,
"operationId": "FundingController_getProjectedFundingRate",
"parameters": [
{
"name": "productId",
"required": true,
"in": "query",
"description": "Id representing the registered product",
"schema": {
"format": "uuid",
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProjectedFundingDto"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForbiddenDto"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFoundDto"
}
}
}
},
"422": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnprocessableEntityDto"
}
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TooManyRequestsDto"
}
}
}
},
"500": {
"description": "Internal Server Error"
}
},
"summary": "Returns the projected funding rate for a product. Deprecated, use `listProjectedRates` instead.",
"tags": [
"Funding"
]
}
},
"/v1/funding/projected-rate": {
"get": {
"operationId": "FundingController_listProjectedRates",
"parameters": [
{
"name": "productIds",
"required": true,
"in": "query",
"description": "Array of product ids",
"schema": {
"minItems": 1,
"maxItems": 10,
"uniqueItems": true,
"type": "array",
"items": {
"type": "string",
"format": "uuid"
}
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PageOfProjectedFundingDtos"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForbiddenDto"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFoundDto"
}
}
}
},
"422": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnprocessableEntityDto"
}
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TooManyRequestsDto"
}
}
}
},
"500": {
"description": "Internal Server Error"
}
},
"summary": "Returns a list of projected funding rates for the given products",
"tags": [
"Funding"
]
}
},
"/v1/rpc/config": {
"get": {
"operationId": "RpcController_getConfig",
"parameters": [],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RpcConfigDto"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForbiddenDto"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFoundDto"
}
}
}
},
"422": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnprocessableEntityDto"
}
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TooManyRequestsDto"
}
}
}
},
"500": {
"description": "Internal Server Error"
}
},
"summary": "Returns the EIP712 domain data necessary for message signing",
"tags": [
"Rpc"
]
}
},
"/v1/subaccount": {
"get": {
"operationId": "SubaccountController_listByAccount",
"parameters": [
{
"name": "order",
"required": false,
"in": "query",
"description": "Direction to paginate through objects",
"schema": {
"type": "string",
"enum": [
"asc",
"desc"
]
}
},
{
"name": "limit",
"required": false,
"in": "query",
"description": "Limit the number of objects to return",
"schema": {
"type": "number"
}
},
{
"name": "cursor",
"required": false,
"in": "query",
"description": "Pointer to the current object in pagination dataset",
"schema": {
"type": "string"
}
},
{
"name": "name",
"required": false,
"in": "query",
"description": "Bytes32 encoded subaccount name (0x prefix, zero padded)",
"schema": {
"format": "hex",
"type": "string"
}
},
{
"name": "sender",
"required": true,
"in": "query",
"description": "Address of the sender",
"schema": {
"format": "hex",
"type": "string"
}
},
{
"name": "orderBy",
"required": false,
"in": "query",
"description": "Order by field",
"schema": {
"example": "createdAt",
"type": "string",
"enum": [
"createdAt",
"name"
]
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PageOfSubaccountDtos"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForbiddenDto"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFoundDto"
}
}
}
},
"422": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnprocessableEntityDto"
}
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TooManyRequestsDto"
}
}
}
},
"500": {
"description": "Internal Server Error"
}
},
"summary": "Returns subaccounts for the given account",
"tags": [
"Subaccount"
]
}
},
"/v1/subaccount/balance": {
"get": {
"operationId": "SubaccountController_listSubaccountBalances",
"parameters": [
{
"name": "order",
"required": false,
"in": "query",
"description": "Direction to paginate through objects",
"schema": {
"type": "string",
"enum": [
"asc",
"desc"
]
}
},
{
"name": "limit",
"required": false,
"in": "query",
"description": "Limit the number of objects to return",
"schema": {
"type": "number"
}
},
{
"name": "cursor",
"required": false,
"in": "query",
"description": "Pointer to the current object in pagination dataset",
"schema": {
"type": "string"
}
},
{
"name": "subaccountId",
"required": true,
"in": "query",
"description": "Id representing the registered subaccount",
"schema": {
"format": "uuid",
"type": "string"
}
},
{
"name": "orderBy",
"required": false,
"in": "query",
"description": "Order by field",
"schema": {
"example": "tokenName",
"type": "string",
"enum": [
"tokenName",
"updatedAt",
"amount"
]
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PageOfSubaccountBalanceDtos"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForbiddenDto"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFoundDto"
}
}
}
},
"422": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnprocessableEntityDto"
}
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TooManyRequestsDto"
}
}
}
},
"500": {
"description": "Internal Server Error"
}
},
"summary": "Returns subaccount balances for given subaccount",
"tags": [
"Subaccount"
]
}
},
"/v1/subaccount/{id}": {
"get": {
"operationId": "SubaccountController_getBySubaccountId",
"parameters": [
{
"name": "id",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SubaccountDto"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForbiddenDto"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFoundDto"
}
}
}
},
"422": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnprocessableEntityDto"
}
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TooManyRequestsDto"
}
}
}
},
"500": {
"description": "Internal Server Error"
}
},
"summary": "Returns subaccount by id",
"tags": [
"Subaccount"
]
}
},
"/v1/linked-signer/link": {
"post": {
"operationId": "LinkedSignerController_linkSigner",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LinkSignerDto"
}
}
}
},
"responses": {
"201": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SignerDto"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForbiddenDto"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFoundDto"
}
}
}
},
"422": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnprocessableEntityDto"
}
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TooManyRequestsDto"
}
}
}
},
"500": {
"description": "Internal Server Error"
}
},
"summary": "Links a signer address with the sender address for order delegation",
"tags": [
"LinkedSigner"
]
}
},
"/v1/linked-signer/revoke": {
"delete": {
"operationId": "LinkedSignerController_revokeSigner",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RevokeLinkedSignerDto"
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SignerDto"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForbiddenDto"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFoundDto"
}
}
}
},
"422": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnprocessableEntityDto"
}
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TooManyRequestsDto"
}
}
}
},
"500": {
"description": "Internal Server Error"
}
},
"summary": "Revokes a signer address from a subaccount",
"tags": [
"LinkedSigner"
]
}
},
"/v1/linked-signer/refresh": {
"post": {
"operationId": "LinkedSignerController_refreshSigner",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RefreshLinkedSignerDto"
}
}
}
},
"responses": {
"201": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SignerDto"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForbiddenDto"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFoundDto"
}
}
}
},
"422": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnprocessableEntityDto"
}
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TooManyRequestsDto"
}
}
}
},
"500": {
"description": "Internal Server Error"
}
},
"summary": "Refreshes the expiry of a linked signer",
"tags": [
"LinkedSigner"
]
}
},
"/v1/linked-signer/quota": {
"get": {
"operationId": "LinkedSignerController_getAccountQuota",
"parameters": [
{
"name": "subaccountId",
"required": true,
"in": "query",
"description": "Id representing the registered subaccount",
"schema": {
"format": "uuid",
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AccountSignerQuotaDto"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForbiddenDto"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFoundDto"
}
}
}
},
"422": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnprocessableEntityDto"
}
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TooManyRequestsDto"
}
}
}
},
"500": {
"description": "Internal Server Error"
}
},
"summary": "Returns the current signer config for a subaccount",
"tags": [
"LinkedSigner"
]
}
},
"/v1/linked-signer/{id}": {
"get": {
"operationId": "LinkedSignerController_getSigner",
"parameters": [
{
"name": "id",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SignerDto"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForbiddenDto"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFoundDto"
}
}
}
},
"422": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnprocessableEntityDto"
}
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TooManyRequestsDto"
}
}
}
},
"500": {
"description": "Internal Server Error"
}
},
"summary": "Returns a signer by its id",
"tags": [
"LinkedSigner"
]
}
},
"/v1/linked-signer": {
"get": {
"operationId": "LinkedSignerController_listBySubaccountId",
"parameters": [
{
"name": "order",
"required": false,
"in": "query",
"description": "Direction to paginate through objects",
"schema": {
"type": "string",
"enum": [
"asc",
"desc"
]
}
},
{
"name": "limit",
"required": false,
"in": "query",
"description": "Limit the number of objects to return",
"schema": {
"type": "number"
}
},
{
"name": "cursor",
"required": false,
"in": "query",
"description": "Pointer to the current object in pagination dataset",
"schema": {
"type": "string"
}
},
{
"name": "subaccountId",
"required": true,
"in": "query",
"description": "Id representing the registered subaccount",
"schema": {
"format": "uuid",
"type": "string"
}
},
{
"name": "statuses",
"required": false,
"in": "query",
"description": "Filters signers by statuses",
"schema": {
"uniqueItems": true,
"example": [
"ACTIVE"
],
"type": "array",
"items": {
"type": "string",
"enum": [
"PENDING",
"ACTIVE",
"PENDING_REVOKE",
"REVOKED",
"REJECTED"
]
}
}
},
{
"name": "orderBy",
"required": false,
"in": "query",
"description": "Order by field",
"schema": {
"example": "createdAt",
"type": "string",
"enum": [
"createdAt",
"expiresAt"
]
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PageOfSignersDto"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForbiddenDto"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFoundDto"
}
}
}
},
"422": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnprocessableEntityDto"
}
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TooManyRequestsDto"
}
}
}
},
"500": {
"description": "Internal Server Error"
}
},
"summary": "List signers for a subaccount",
"tags": [
"LinkedSigner"
]
}
},
"/v1/token/withdraw": {
"get": {
"operationId": "TokenController_listWithdraws",
"parameters": [
{
"name": "order",
"required": false,
"in": "query",
"description": "Direction to paginate through objects",
"schema": {
"type": "string",
"enum": [
"asc",
"desc"
]
}
},
{
"name": "limit",
"required": false,
"in": "query",
"description": "Limit the number of objects to return",
"schema": {
"type": "number"
}
},
{
"name": "cursor",
"required": false,
"in": "query",
"description": "Pointer to the current object in pagination dataset",
"schema": {
"type": "string"
}
},
{
"name": "subaccountId",
"required": true,
"in": "query",
"description": "Id representing the registered subaccount",
"schema": {
"format": "uuid",
"type": "string"
}
},
{
"name": "isActive",
"required": false,
"in": "query",
"description": "Filters active withdraws",
"schema": {
"example": true,
"type": "boolean"
}
},
{
"name": "orderBy",
"required": false,
"in": "query",
"description": "Order by field",
"schema": {
"example": "createdAt",
"type": "string",
"enum": [
"createdAt"
]
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PageOfWithdrawDtos"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForbiddenDto"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFoundDto"
}
}
}
},
"422": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnprocessableEntityDto"
}
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TooManyRequestsDto"
}
}
}
},
"500": {
"description": "Internal Server Error"
}
},
"summary": "Returns initiated or pending finalize withdraws for the given subaccount",
"tags": [
"Token"
]
}
},
"/v1/token/transfer": {
"get": {
"operationId": "TokenController_listTransfers",
"parameters": [
{
"name": "order",
"required": false,
"in": "query",
"description": "Direction to paginate through objects",
"schema": {
"type": "string",
"enum": [
"asc",
"desc"
]
}
},
{
"name": "limit",
"required": false,
"in": "query",
"description": "Limit the number of objects to return",
"schema": {
"type": "number"
}
},
{
"name": "cursor",
"required": false,
"in": "query",
"description": "Pointer to the current object in pagination dataset",
"schema": {
"type": "string"
}
},
{
"name": "subaccountId",
"required": true,
"in": "query",
"description": "Id representing the registered subaccount",
"schema": {
"format": "uuid",
"type": "string"
}
},
{
"name": "statuses",
"required": false,
"in": "query",
"description": "Array of transfer statuses to filter by",
"schema": {
"uniqueItems": true,
"example": "COMPLETED",
"type": "array",
"items": {
"type": "string",
"enum": [
"SUBMITTED",
"PENDING",
"COMPLETED",
"REJECTED"
]
}
}
},
{
"name": "types",
"required": false,
"in": "query",
"description": "Array of transfer types to filter by",
"schema": {
"uniqueItems": true,
"example": "WITHDRAW",
"type": "array",
"items": {
"type": "string",
"enum": [
"DEPOSIT",
"WITHDRAW"
]
}
}
},
{
"name": "orderBy",
"required": false,
"in": "query",
"description": "Order by field",
"schema": {
"example": "createdAt",
"type": "string",
"enum": [
"createdAt"
]
}
},
{
"name": "createdAfter",
"required": false,
"in": "query",
"description": "Filter by transfers created after timestamp exclusive (ms since Unix epoch)",
"schema": {
"type": "number"
}
},
{
"name": "createdBefore",
"required": false,
"in": "query",
"description": "Filter by transfers created before timestamp inclusive (ms since Unix epoch)",
"schema": {
"type": "number"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PageOfTransfersDtos"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForbiddenDto"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFoundDto"
}
}
}
},
"422": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnprocessableEntityDto"
}
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TooManyRequestsDto"
}
}
}
},
"500": {
"description": "Internal Server Error"
}
},
"summary": "Returns a list of transfers for the given subaccount",
"tags": [
"Token"
]
}
},
"/v1/token/{id}/withdraw": {
"post": {
"operationId": "TokenController_initiateWithdraw",
"parameters": [
{
"name": "id",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InitiateWithdrawDto"
}
}
}
},
"responses": {
"201": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WithdrawDto"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForbiddenDto"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFoundDto"
}
}
}
},
"422": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WithdrawFailedDto"
}
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TooManyRequestsDto"
}
}
}
},
"500": {
"description": "Internal Server Error"
}
},
"summary": "Initiates a withdraw for a specific token in subaccount",
"tags": [
"Token"
]
}
},
"/v1/token/{id}": {
"get": {
"operationId": "TokenController_getById",
"parameters": [
{
"name": "id",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TokenDto"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForbiddenDto"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFoundDto"
}
}
}
},
"422": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnprocessableEntityDto"
}
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TooManyRequestsDto"
}
}
}
},
"500": {
"description": "Internal Server Error"
}
},
"summary": "Returns a token by its id",
"tags": [
"Token"
]
}
},
"/v1/token": {
"get": {
"operationId": "TokenController_list",
"parameters": [
{
"name": "order",
"required": false,
"in": "query",
"description": "Direction to paginate through objects",
"schema": {
"type": "string",
"enum": [
"asc",
"desc"
]
}
},
{
"name": "limit",
"required": false,
"in": "query",
"description": "Limit the number of objects to return",
"schema": {
"type": "number"
}
},
{
"name": "cursor",
"required": false,
"in": "query",
"description": "Pointer to the current object in pagination dataset",
"schema": {
"type": "string"
}
},
{
"name": "depositEnabled",
"required": false,
"in": "query",
"description": "Filters tokens by if its enabled for deposit",
"schema": {
"example": true,
"type": "boolean"
}
},
{
"name": "withdrawEnabled",
"required": false,
"in": "query",
"description": "Filters tokens by if its enabled for withdraw",
"schema": {
"example": true,
"type": "boolean"
}
},
{
"name": "orderBy",
"required": false,
"in": "query",
"description": "Order by field",
"schema": {
"example": "createdAt",
"type": "string",
"enum": [
"createdAt"
]
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PageOfTokensDtos"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForbiddenDto"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFoundDto"
}
}
}
},
"422": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnprocessableEntityDto"
}
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TooManyRequestsDto"
}
}
}
},
"500": {
"description": "Internal Server Error"
}
},
"summary": "Returns a list of all tokens",
"tags": [
"Token"
]
}
},
"/v1/time": {
"get": {
"operationId": "TimeController_getSystemTime",
"parameters": [],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SystemTimeDto"
}
}
}
}
},
"summary": "Returns current system time in milliseconds via GET",
"tags": [
"Time"
]
},
"post": {
"operationId": "TimeController_postSystemTime",
"parameters": [],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SystemTimeDto"
}
}
}
}
},
"summary": "Returns current system time in milliseconds via POST",
"tags": [
"Time"
]
}
},
"/v1/whitelist": {
"get": {
"operationId": "WhitelistController_isWhitelisted",
"parameters": [
{
"name": "address",
"required": true,
"in": "query",
"description": "Address of account",
"schema": {
"format": "hex",
"example": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WhitelistDto"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForbiddenDto"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFoundDto"
}
}
}
},
"422": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnprocessableEntityDto"
}
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TooManyRequestsDto"
}
}
}
},
"500": {
"description": "Internal Server Error"
}
},
"summary": "Checks if an address is whitelisted",
"tags": [
"Whitelist"
]
}
},
"/v1/points": {
"get": {
"operationId": "PointsController_listPointsPeriods",
"parameters": [
{
"name": "address",
"required": true,
"in": "query",
"description": "Address of account",
"schema": {
"format": "hex",
"example": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"type": "string"
}
},
{
"name": "season",
"required": true,
"in": "query",
"description": "Season number",
"schema": {
"minimum": 0,
"maximum": 10,
"example": 1,
"type": "number"
}
},
{
"name": "epoch",
"required": true,
"in": "query",
"description": "Epoch number within the season",
"schema": {
"minimum": 1,
"maximum": 256,
"example": 1,
"type": "number"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ListOfPointsPeriodDtos"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForbiddenDto"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFoundDto"
}
}
}
},
"422": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnprocessableEntityDto"
}
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TooManyRequestsDto"
}
}
}
},
"500": {
"description": "Internal Server Error"
}
},
"summary": "Returns a list of points periods for a given address and season",
"tags": [
"Points"
]
}
},
"/v1/points/summary": {
"get": {
"operationId": "PointsController_listPointsSeasonSummaries",
"parameters": [
{
"name": "address",
"required": true,
"in": "query",
"description": "Address of account",
"schema": {
"format": "hex",
"example": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ListOfPointsSeasonSummariesDtos"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForbiddenDto"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFoundDto"
}
}
}
},
"422": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnprocessableEntityDto"
}
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TooManyRequestsDto"
}
}
}
},
"500": {
"description": "Internal Server Error"
}
},
"summary": "Returns a list of points season summaries for a given address",
"tags": [
"Points"
]
}
},
"/v1/referral/code/{code}": {
"get": {
"operationId": "ReferralController_getCodeUsage",
"parameters": [
{
"name": "code",
"required": true,
"in": "path",
"description": "Referral code (3-12 alphanumeric uppercase characters)",
"schema": {
"minLength": 12,
"maxLength": 12,
"pattern": "/^[A-Z0-9]+$/",
"example": "XYZ123456789",
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ReferralCodeUsageDto"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForbiddenDto"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFoundDto"
}
}
}
},
"422": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnprocessableEntityDto"
}
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TooManyRequestsDto"
}
}
}
},
"500": {
"description": "Internal Server Error"
}
},
"summary": "Returns referral code usage details",
"tags": [
"Referral"
]
}
},
"/v1/referral/summary": {
"get": {
"operationId": "ReferralController_getSummary",
"parameters": [
{
"name": "subaccount",
"required": false,
"in": "query",
"description": "Bytes32 encoded subaccount name (0x prefix, zero padded, set when using linked signer)",
"schema": {
"format": "hex",
"example": "0x7072696d61727900000000000000000000000000000000000000000000000000",
"type": "string"
}
},
{
"name": "X-Ethereal-Auth",
"in": "header",
"description": "Must be: EIP712Auth",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "X-Ethereal-Sender",
"in": "header",
"description": "Address that signed this message (hex)",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "X-Ethereal-Signature",
"in": "header",
"description": "The signature from signTypedData(...) signed by the sender",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "X-Ethereal-Intent",
"in": "header",
"description": "Intent of the message (action to be taken)",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "X-Ethereal-SignedAt",
"in": "header",
"description": "Message signedAt current timestamp (seconds since Unix Epoch)",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ReferralDto"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForbiddenDto"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFoundDto"
}
}
}
},
"422": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnprocessableEntityDto"
}
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TooManyRequestsDto"
}
}
}
},
"500": {
"description": "Internal Server Error"
}
},
"summary": "Returns summary of your referral activity",
"tags": [
"Referral"
]
}
},
"/v1/referral": {
"get": {
"operationId": "ReferralController_listReferrals",
"parameters": [
{
"name": "order",
"required": false,
"in": "query",
"description": "Direction to paginate through objects",
"schema": {
"type": "string",
"enum": [
"desc"
]
}
},
{
"name": "limit",
"required": false,
"in": "query",
"description": "Limit the number of objects to return",
"schema": {
"type": "number"
}
},
{
"name": "cursor",
"required": false,
"in": "query",
"description": "Pointer to the current object in pagination dataset",
"schema": {
"type": "string"
}
},
{
"name": "subaccount",
"required": false,
"in": "query",
"description": "Bytes32 encoded subaccount name (0x prefix, zero padded, set when using linked signer)",
"schema": {
"format": "hex",
"example": "0x7072696d61727900000000000000000000000000000000000000000000000000",
"type": "string"
}
},
{
"name": "orderBy",
"required": false,
"in": "query",
"description": "Order by field",
"schema": {
"example": "createdAt",
"type": "string",
"enum": [
"createdAt"
]
}
},
{
"name": "X-Ethereal-Auth",
"in": "header",
"description": "Must be: EIP712Auth",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "X-Ethereal-Sender",
"in": "header",
"description": "Address that signed this message (hex)",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "X-Ethereal-Signature",
"in": "header",
"description": "The signature from signTypedData(...) signed by the sender",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "X-Ethereal-Intent",
"in": "header",
"description": "Intent of the message (action to be taken)",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "X-Ethereal-SignedAt",
"in": "header",
"description": "Message signedAt current timestamp (seconds since Unix Epoch)",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PageOfReferralDtos"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForbiddenDto"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFoundDto"
}
}
}
},
"422": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnprocessableEntityDto"
}
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TooManyRequestsDto"
}
}
}
},
"500": {
"description": "Internal Server Error"
}
},
"summary": "Returns paginated list of referrals for the sender",
"tags": [
"Referral"
]
}
},
"/v1/referral/claim": {
"post": {
"operationId": "ReferralController_claimCode",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ClaimReferralCodeDto"
}
}
}
},
"responses": {
"201": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ReferralDto"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForbiddenDto"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFoundDto"
}
}
}
},
"422": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnprocessableEntityDto"
}
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TooManyRequestsDto"
}
}
}
},
"500": {
"description": "Internal Server Error"
}
},
"summary": "Claim a referral code",
"tags": [
"Referral"
]
}
},
"/v1/referral/activate": {
"post": {
"operationId": "ReferralController_activate",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ActivateReferralDto"
}
}
}
},
"responses": {
"201": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ReferralDto"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForbiddenDto"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFoundDto"
}
}
}
},
"422": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnprocessableEntityDto"
}
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TooManyRequestsDto"
}
}
}
},
"500": {
"description": "Internal Server Error"
}
},
"summary": "Activates the sender to acquire a referral code",
"tags": [
"Referral"
]
}
},
"/v1/maintenance": {
"get": {
"operationId": "MaintenanceController_isMaintenance",
"parameters": [],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MaintenanceDto"
}
}
}
}
},
"tags": [
"Maintenance"
]
}
}
},
"info": {
"title": "Ethereal Exchange API",
"description": "Ethereal HTTP API for real-time trading, order management, and market data access.",
"version": "0.1.0",
"contact": {}
},
"tags": [],
"servers": [
{
"url": "https://api.ethereal.trade/",
"description": "Mainnet"
}
],
"components": {
"schemas": {
"OrderDto": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "9036443a-441a-4a66-87f2-bd5c44cdca7a",
"description": "Id representing the order",
"format": "uuid"
},
"clientOrderId": {
"type": "string",
"example": "28850555-0968-44ca-bdee-b51e286656d9",
"description": "A subaccount scoped unique client-generated order id (either a UUID or alphanumeric string up to 32 characters)"
},
"type": {
"type": "string",
"example": "LIMIT",
"description": "Trade order type e.g. MARKET or LIMIT",
"enum": [
"MARKET",
"LIMIT"
]
},
"availableQuantity": {
"type": "string",
"example": "10.5",
"description": "Remaining quantity (if modified or reduced) in native units expressed as a decimal (precision: 9)"
},
"quantity": {
"type": "string",
"example": "10.5",
"description": "Original quantity (as per order submission) in native units expressed as a decimal (precision: 9)"
},
"side": {
"$ref": "#/components/schemas/OrderSide"
},
"productId": {
"type": "string",
"example": "9c6bf870-a8ce-4de3-820b-542fd5c049ba",
"description": "Id of product this order was placed against",
"format": "uuid"
},
"subaccountId": {
"type": "string",
"example": "c25c39d9-ce2b-4753-960c-c5ad558aace8",
"description": "Id of the subaccount associated to order",
"format": "uuid"
},
"status": {
"$ref": "#/components/schemas/OrderStatus"
},
"reduceOnly": {
"type": "boolean",
"example": true,
"description": "Indicates if the order is reduce only"
},
"close": {
"type": "boolean",
"description": "Order closes the entire current position"
},
"updatedAt": {
"type": "number",
"example": 1712019600000,
"description": "Order last updated timestamp (ms since Unix Epoch)"
},
"createdAt": {
"type": "number",
"example": 1712019600000,
"description": "Order creation timestamp (ms since Unix Epoch)"
},
"sender": {
"type": "string",
"example": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"description": "Account or linked signer address that placed this order",
"format": "hex"
},
"price": {
"type": "string",
"example": "4200.5",
"description": "Limit price in native units expressed as a decimal, zero if market order (precision: 9)"
},
"filled": {
"type": "string",
"example": "0.5",
"description": "Filled amount in native units expressed as a decimal (precision: 9)"
},
"stopPrice": {
"type": "string",
"example": "4200.5",
"description": "Stop price expressed as a decimal (zero if not a stop order, precision: 9)"
},
"stopType": {
"enum": [
0,
1
],
"type": "number",
"example": 1,
"description": "Side as either BUY (0) or SELL (1)",
"x-enum-varnames": [
"GAIN",
"LOSS"
]
},
"stopPriceType": {
"enum": [
0,
1
],
"type": "number",
"example": 1,
"description": "Type of stop price (stop orders only)",
"x-enum-varnames": [
"LAST_PRICE",
"MARK_PRICE"
]
},
"timeInForce": {
"type": "string",
"example": "GTD",
"description": "How long an order will remain until executed/expired (required if limit)",
"enum": [
"GTD",
"IOC",
"FOK"
]
},
"expiresAt": {
"type": "number",
"example": 1712019600,
"description": "Order expiry timestamp (seconds since Unix Epoch)"
},
"postOnly": {
"type": "boolean",
"example": true,
"description": "Only add order if it does not immediately fill (limit only)"
},
"groupContingencyType": {
"enum": [
0,
1
],
"type": "number",
"description": "Type of OTOCO relationship (OTO or OCO)",
"example": 0,
"x-enum-varnames": [
"OTO",
"OCO"
]
},
"groupId": {
"type": "string",
"description": "Id of the group this order belongs to",
"example": "9036443a-441a-4a66-87f2-bd5c44cdca7a",
"format": "uuid"
}
},
"required": [
"id",
"type",
"availableQuantity",
"quantity",
"side",
"productId",
"subaccountId",
"status",
"reduceOnly",
"close",
"updatedAt",
"createdAt",
"sender",
"price",
"filled",
"stopPrice",
"expiresAt"
]
},
"PageOfOrderDtos": {
"type": "object",
"properties": {
"hasNext": {
"type": "boolean",
"example": true,
"description": "Whether there are more objects to paginate through"
},
"nextCursor": {
"type": "string",
"description": "Pointer to the next page in pagination dataset"
},
"data": {
"description": "Array of order objects",
"type": "array",
"items": {
"$ref": "#/components/schemas/OrderDto"
}
}
},
"required": [
"data"
]
},
"BadRequestDto": {
"type": "object",
"properties": {
"statusCode": {
"type": "number",
"default": 400,
"enum": [
400
]
},
"message": {
"description": "Validation error message(s). Can be a single string or an array of strings.",
"oneOf": [
{
"type": "string",
"example": "property must be a string"
},
{
"type": "array",
"items": {
"type": "string"
},
"example": [
"property must be a string",
"nestedProperty.field must be an integer"
]
}
]
},
"error": {
"type": "string",
"default": "Bad Request",
"enum": [
"Bad Request"
]
}
},
"required": [
"statusCode",
"message",
"error"
]
},
"UnauthorizedDto": {
"type": "object",
"properties": {
"statusCode": {
"type": "number",
"default": 401,
"enum": [
401
]
},
"message": {
"type": "string"
},
"error": {
"type": "string",
"default": "Unauthorized",
"enum": [
"Unauthorized"
]
}
},
"required": [
"statusCode",
"message",
"error"
]
},
"ForbiddenDto": {
"type": "object",
"properties": {
"statusCode": {
"type": "number",
"default": 403,
"enum": [
403
]
},
"message": {
"type": "string"
},
"error": {
"type": "string",
"default": "Forbidden",
"enum": [
"Forbidden"
]
}
},
"required": [
"statusCode",
"message",
"error"
]
},
"NotFoundDto": {
"type": "object",
"properties": {
"statusCode": {
"type": "number",
"default": 404,
"enum": [
404
]
},
"message": {
"type": "string"
},
"error": {
"type": "string",
"default": "Not Found",
"enum": [
"Not Found"
]
}
},
"required": [
"statusCode",
"message",
"error"
]
},
"UnprocessableEntityDto": {
"type": "object",
"properties": {
"statusCode": {
"type": "number",
"default": 422,
"enum": [
422
]
},
"message": {
"type": "string"
},
"error": {
"type": "string",
"default": "Unprocessable Entity",
"enum": [
"Unprocessable Entity"
]
}
},
"required": [
"statusCode",
"message",
"error"
]
},
"TooManyRequestsDto": {
"type": "object",
"properties": {
"statusCode": {
"type": "number",
"default": 429,
"enum": [
429
]
},
"message": {
"type": "string"
},
"error": {
"type": "string",
"default": "Too Many Requests",
"enum": [
"Too Many Requests"
]
},
"type": {
"enum": [
"RATE_LIMIT_IP",
"RATE_LIMIT_ACCOUNT",
"RATE_LIMIT_WITHDRAW",
"RATE_LIMIT_LINKED_SIGNER"
],
"type": "string",
"description": "Specific rate limit type that was exceeded"
}
},
"required": [
"statusCode",
"message",
"error",
"type"
]
},
"SubmitOrderMarketDtoData": {
"type": "object",
"properties": {
"subaccount": {
"type": "string",
"example": "0x7072696d61727900000000000000000000000000000000000000000000000000",
"description": "Bytes32 encoded subaccount name (0x prefix, zero padded)",
"format": "hex"
},
"sender": {
"type": "string",
"example": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"description": "Address of account",
"format": "hex"
},
"nonce": {
"type": "string",
"example": "2687929537462333",
"description": "Message nonce timestamp (nanoseconds since Unix Epoch)"
},
"type": {
"enum": [
"MARKET"
],
"type": "string",
"example": "MARKET",
"description": "Market order type"
},
"quantity": {
"type": "string",
"example": "5.5",
"description": "Non-directional quantity of product in native units expressed as a decimal (precision: 9)",
"format": "decimal"
},
"side": {
"$ref": "#/components/schemas/OrderSide"
},
"onchainId": {
"type": "integer",
"minimum": 1,
"example": 1,
"description": "Onchain generated productId from prior product registration"
},
"engineType": {
"$ref": "#/components/schemas/EngineType"
},
"clientOrderId": {
"type": "string",
"example": "16e2da4d-58ab-4453-bdb4-8e4a865c12c1",
"description": "A subaccount scoped unique client-generated order id (either a UUID or alphanumeric string up to 32 characters)"
},
"reduceOnly": {
"type": "boolean",
"default": false,
"description": "Whether this should be a reduce-only order, required for close"
},
"close": {
"type": "boolean",
"default": false,
"description": "Order closes the entire current position, requires zero quantity and reduceOnly"
},
"stopPrice": {
"type": "string",
"default": "0",
"description": "Stop price expressed as a decimal (precision: 9), requires stopType",
"example": "4200.5",
"format": "decimal"
},
"stopType": {
"enum": [
0,
1
],
"type": "number",
"example": 1,
"description": "Stop type, either 0 (take-profit) or 1 (stop-loss), requires non-zero stopPrice",
"x-enum-varnames": [
"GAIN",
"LOSS"
]
},
"signedAt": {
"type": "integer",
"example": 1712019600,
"description": "Message signedAt current timestamp (seconds since Unix Epoch)",
"format": "int64"
},
"expiresAt": {
"type": "integer",
"description": "Order expiry timestamp (seconds since Unix Epoch), defaults to the maximum allowed value: signedAt + 6652800",
"format": "int64"
},
"groupId": {
"type": "string",
"format": "uuid",
"description": "Group Id (UUID) for linking orders together in OCO/OTO relationships"
},
"groupContingencyType": {
"enum": [
0,
1
],
"type": "number",
"description": "Contingency type for order groups: OTO (Order-Triggers-Order) or OCO (One-Cancels-Other)",
"x-enum-varnames": [
"OTO",
"OCO"
]
}
},
"required": [
"subaccount",
"sender",
"nonce",
"type",
"quantity",
"side",
"onchainId",
"engineType",
"signedAt"
]
},
"SubmitOrderLimitDtoData": {
"type": "object",
"properties": {
"subaccount": {
"type": "string",
"example": "0x7072696d61727900000000000000000000000000000000000000000000000000",
"description": "Bytes32 encoded subaccount name (0x prefix, zero padded)",
"format": "hex"
},
"sender": {
"type": "string",
"example": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"description": "Address of account",
"format": "hex"
},
"nonce": {
"type": "string",
"example": "2687929537462333",
"description": "Message nonce timestamp (nanoseconds since Unix Epoch)"
},
"type": {
"$ref": "#/components/schemas/OrderType"
},
"quantity": {
"type": "string",
"example": "5.5",
"description": "Non-directional quantity of product in native units expressed as a decimal (precision: 9)",
"format": "decimal"
},
"side": {
"$ref": "#/components/schemas/OrderSide"
},
"onchainId": {
"type": "integer",
"minimum": 1,
"example": 1,
"description": "Onchain generated productId from prior product registration"
},
"engineType": {
"$ref": "#/components/schemas/EngineType"
},
"clientOrderId": {
"type": "string",
"example": "16e2da4d-58ab-4453-bdb4-8e4a865c12c1",
"description": "A subaccount scoped unique client-generated order id (either a UUID or alphanumeric string up to 32 characters)"
},
"reduceOnly": {
"type": "boolean",
"default": false,
"description": "Whether this should be a reduce-only order, required for close"
},
"close": {
"type": "boolean",
"default": false,
"description": "Order closes the entire current position, requires zero quantity and reduceOnly"
},
"stopPrice": {
"type": "string",
"default": "0",
"description": "Stop price expressed as a decimal (precision: 9), requires stopType",
"example": "4200.5",
"format": "decimal"
},
"stopType": {
"enum": [
0,
1
],
"type": "number",
"example": 1,
"description": "Stop type, either 0 (take-profit) or 1 (stop-loss), requires non-zero stopPrice",
"x-enum-varnames": [
"GAIN",
"LOSS"
]
},
"signedAt": {
"type": "integer",
"example": 1712019600,
"description": "Message signedAt current timestamp (seconds since Unix Epoch)",
"format": "int64"
},
"expiresAt": {
"type": "integer",
"description": "Order expiry timestamp (seconds since Unix Epoch), defaults to the maximum allowed value: signedAt + 6652800",
"format": "int64"
},
"groupId": {
"type": "string",
"format": "uuid",
"description": "Group Id (UUID) for linking orders together in OCO/OTO relationships"
},
"groupContingencyType": {
"enum": [
0,
1
],
"type": "number",
"description": "Contingency type for order groups: OTO (Order-Triggers-Order) or OCO (One-Cancels-Other)",
"x-enum-varnames": [
"OTO",
"OCO"
]
},
"price": {
"type": "string",
"example": "4200.5",
"description": "Limit price expressed as a decimal (precision: 9)",
"format": "decimal"
},
"timeInForce": {
"default": "GTD",
"enum": [
"GTD",
"IOC",
"FOK"
],
"type": "string",
"example": "IOC",
"description": "How long an order will remain until executed/expired"
},
"postOnly": {
"type": "boolean",
"default": false,
"example": true,
"description": "Only add order if it does not immediately fill"
}
},
"required": [
"subaccount",
"sender",
"nonce",
"type",
"quantity",
"side",
"onchainId",
"engineType",
"signedAt",
"price",
"timeInForce",
"postOnly"
]
},
"SubmitOrderDto": {
"type": "object",
"properties": {
"data": {
"oneOf": [
{
"$ref": "#/components/schemas/SubmitOrderMarketDtoData"
},
{
"$ref": "#/components/schemas/SubmitOrderLimitDtoData"
}
]
},
"signature": {
"type": "string",
"description": "The signature from signTypedData(...) signed by the sender",
"format": "hex"
}
},
"required": [
"data",
"signature"
]
},
"SubmitOrderCreatedDto": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "9036443a-441a-4a66-87f2-bd5c44cdca7a",
"description": "Id representing the created order",
"format": "uuid"
},
"clientOrderId": {
"type": "string",
"description": "A subaccount scoped unique client-generated order id (either a UUID or alphanumeric string up to 32 characters)"
},
"filled": {
"type": "string",
"example": "0.5",
"description": "Filled amount in native units expressed as a decimal (precision: 9)"
},
"result": {
"enum": [
"AccountSuspended",
"CausesImmediateLiquidation",
"DuplicateSameSideOco",
"ImmediateMatchPostOnly",
"InsufficientBalance",
"LiquidationError",
"MarketOrderReachedMaxSlippage",
"OcoFilled",
"Ok",
"OpenValueCapExceeded",
"OrderIncreasesPosition",
"RiskLimitExceeded",
"SignerRevoked",
"TriggerCanceledError",
"UnfilledFillOrKill",
"UnfilledImmediateOrCancel",
"UnfilledMarketOrder"
],
"type": "string",
"example": "Ok",
"description": "Code indicating the result of the submission"
}
},
"required": [
"id",
"filled",
"result"
]
},
"SubmitOrderFailedDto": {
"type": "object",
"properties": {
"statusCode": {
"type": "number",
"default": 422,
"enum": [
422
]
},
"message": {
"type": "string",
"enum": [
"AccountSuspended",
"DuplicateClientOrderId",
"ExchangeSuspended",
"InsufficientBalance",
"InvalidBinaryData",
"InvalidExpireTime",
"InvalidGroupContingencyType",
"InvalidNonceForSigner",
"InvalidSigner",
"InvalidSignerAddress",
"InvalidTimeInForce",
"LiquidationError",
"MarginAccountBalanceZero",
"NonceAlreadyUsed",
"PriceAboveMaximum",
"PriceBelowMinimum",
"RiskLimitExceeded",
"TooManyOpenOrders",
"TooManyPositions",
"TooManyStopOrders",
"InsuranceFundCannotOpenPositions",
"InstrumentOpenValueCapExceeded"
],
"example": "TooManyOpenOrders",
"description": "Code indicating the reason for failure"
},
"error": {
"type": "string",
"default": "Unprocessable Entity",
"enum": [
"Unprocessable Entity"
]
}
},
"required": [
"statusCode",
"message",
"error"
]
},
"SubmitDryOrderDto": {
"type": "object",
"properties": {
"data": {
"oneOf": [
{
"$ref": "#/components/schemas/SubmitOrderMarketDtoData"
},
{
"$ref": "#/components/schemas/SubmitOrderLimitDtoData"
}
]
}
},
"required": [
"data"
]
},
"DryRunOrderCreatedDto": {
"type": "object",
"properties": {
"marginRequired": {
"type": "string",
"example": "1000.5",
"description": "Margin required for order in USD expressed as a decimal (precision: 9)"
},
"marginAvailable": {
"type": "string",
"example": "5000.75",
"description": "Margin available excluding this order in USD expressed as a decimal (precision: 9)"
},
"totalUsedMargin": {
"type": "string",
"example": "3000.25",
"description": "Total used margin including this order in USD expressed as a decimal (precision: 9)"
},
"riskUsed": {
"type": "string",
"example": "3000.25",
"description": "Risk used including position and open orders in USD expressed as a decimal (precision: 9)"
},
"riskAvailable": {
"type": "string",
"example": "100000000",
"description": "Risk available for the product in USD expressed as a decimal (precision: 9)"
},
"code": {
"enum": [
"AccountSuspended",
"CausesImmediateLiquidation",
"DuplicateSameSideOco",
"ImmediateMatchPostOnly",
"InsufficientBalance",
"LiquidationError",
"MarketOrderReachedMaxSlippage",
"OcoFilled",
"Ok",
"OpenValueCapExceeded",
"OrderIncreasesPosition",
"RiskLimitExceeded",
"SignerRevoked",
"TriggerCanceledError",
"UnfilledFillOrKill",
"UnfilledImmediateOrCancel",
"UnfilledMarketOrder"
],
"type": "string",
"example": "Ok",
"description": "Code indicating a result of the dry run"
}
},
"required": [
"marginRequired",
"marginAvailable",
"totalUsedMargin",
"riskUsed",
"riskAvailable",
"code"
]
},
"DryRunOrderFailedDto": {
"type": "object",
"properties": {
"marginRequired": {
"type": "string",
"example": "1000.5",
"description": "Margin required for order in USD expressed as a decimal (precision: 9)"
},
"marginAvailable": {
"type": "string",
"example": "5000.75",
"description": "Margin available excluding this order in USD expressed as a decimal (precision: 9)"
},
"totalUsedMargin": {
"type": "string",
"example": "3000.25",
"description": "Total used margin including this order in USD expressed as a decimal (precision: 9)"
},
"riskUsed": {
"type": "string",
"example": "3000.25",
"description": "Risk used including position and open orders in USD expressed as a decimal (precision: 9)"
},
"riskAvailable": {
"type": "string",
"example": "100000000",
"description": "Risk available for the product in USD expressed as a decimal (precision: 9)"
},
"code": {
"enum": [
"AccountSuspended",
"DuplicateClientOrderId",
"ExchangeSuspended",
"InsufficientBalance",
"InvalidBinaryData",
"InvalidExpireTime",
"InvalidGroupContingencyType",
"InvalidNonceForSigner",
"InvalidSigner",
"InvalidSignerAddress",
"InvalidTimeInForce",
"LiquidationError",
"MarginAccountBalanceZero",
"NonceAlreadyUsed",
"PriceAboveMaximum",
"PriceBelowMinimum",
"RiskLimitExceeded",
"TooManyOpenOrders",
"TooManyPositions",
"TooManyStopOrders",
"InsuranceFundCannotOpenPositions",
"InstrumentOpenValueCapExceeded"
],
"type": "string",
"example": "TooManyOpenOrders",
"description": "Code indicating the reason for failure"
}
},
"required": [
"marginRequired",
"marginAvailable",
"totalUsedMargin",
"riskUsed",
"riskAvailable",
"code"
]
},
"DryRunOrderFailedUnprocessableEntityDto": {
"type": "object",
"properties": {
"statusCode": {
"type": "number",
"default": 422,
"enum": [
422
]
},
"message": {
"type": "string",
"enum": [
"AccountSuspended",
"DuplicateClientOrderId",
"ExchangeSuspended",
"InsufficientBalance",
"InvalidBinaryData",
"InvalidExpireTime",
"InvalidGroupContingencyType",
"InvalidNonceForSigner",
"InvalidSigner",
"InvalidSignerAddress",
"InvalidTimeInForce",
"LiquidationError",
"MarginAccountBalanceZero",
"NonceAlreadyUsed",
"PriceAboveMaximum",
"PriceBelowMinimum",
"RiskLimitExceeded",
"TooManyOpenOrders",
"TooManyPositions",
"TooManyStopOrders",
"InsuranceFundCannotOpenPositions",
"InstrumentOpenValueCapExceeded"
],
"example": "TooManyOpenOrders",
"description": "Code indicating the reason for failure"
},
"error": {
"type": "string",
"default": "Unprocessable Entity",
"enum": [
"Unprocessable Entity"
]
},
"data": {
"description": "Details of the failed dry run",
"allOf": [
{
"$ref": "#/components/schemas/DryRunOrderFailedDto"
}
]
}
},
"required": [
"statusCode",
"message",
"error",
"data"
]
},
"CancelOrderDtoData": {
"type": "object",
"properties": {
"subaccount": {
"type": "string",
"example": "0x7072696d61727900000000000000000000000000000000000000000000000000",
"description": "Bytes32 encoded subaccount name (0x prefix, zero padded)",
"format": "hex"
},
"sender": {
"type": "string",
"example": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"description": "Account or linked signer address that canceled this order",
"format": "hex"
},
"nonce": {
"type": "string",
"example": "2687929537462333",
"description": "Message nonce timestamp (nanoseconds since Unix Epoch)"
},
"orderIds": {
"uniqueItems": true,
"description": "Ids of the orders to be canceled (clientOrderIds combined length cannot exceed maximum)",
"example": [
"80569be0-afba-43f8-ac20-767d0974c6a3"
],
"maxItems": 200,
"type": "array",
"items": {
"type": "string",
"format": "uuid"
}
},
"clientOrderIds": {
"uniqueItems": true,
"description": "Client-generated order ids to be canceled (orderIds combined length cannot exceed maximum)",
"example": [
"80569be0-afba-43f8-ac20-767d0974c6a3"
],
"maxItems": 200,
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"subaccount",
"sender",
"nonce"
]
},
"CancelOrderDto": {
"type": "object",
"properties": {
"signature": {
"type": "string",
"description": "The signature from signTypedData(...) signed by the sender",
"format": "hex"
},
"data": {
"$ref": "#/components/schemas/CancelOrderDtoData"
}
},
"required": [
"signature",
"data"
]
},
"CancelOrderResultDto": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "9036443a-441a-4a66-87f2-bd5c44cdca7a",
"description": "Id representing the order"
},
"clientOrderId": {
"type": "string",
"example": "80569be0-afba-43f8-ac20-767d0974c6a3",
"description": "A subaccount scoped unique client-generated order id (either a UUID or alphanumeric string up to 32 characters)"
},
"result": {
"enum": [
"AlreadyCanceled",
"AlreadyExpired",
"AlreadyFilled",
"NotFound",
"Ok",
"NonceAlreadyUsed",
"Unknown"
],
"type": "string",
"example": "Ok",
"description": "Code indicating the result of the submission"
}
},
"required": [
"id",
"result"
]
},
"ListOfCancelOrderResultDtos": {
"type": "object",
"properties": {
"data": {
"description": "Array of order cancelation results",
"type": "array",
"items": {
"$ref": "#/components/schemas/CancelOrderResultDto"
}
}
},
"required": [
"data"
]
},
"OrderFillDto": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "b1234567-89ab-cdef-0123-456789abcdef",
"description": "Id of the fill",
"format": "uuid"
},
"orderId": {
"type": "string",
"example": "b1234567-89ab-cdef-0123-456789abcdef",
"description": "Id of the order (from the context of the specified subaccount)",
"format": "uuid"
},
"clientOrderId": {
"type": "string",
"example": "b1234567-89ab-cdef-0123-456789abcdef",
"description": "A subaccount scoped unique client-generated order id (either a UUID or alphanumeric string up to 32 characters)"
},
"price": {
"type": "string",
"example": "4200.5",
"description": "Fill price in expressed as a decimal (precision: 9)"
},
"filled": {
"type": "string",
"example": "2.420",
"description": "Quantity filled in native units expressed as a decimal (precision: 9)"
},
"type": {
"type": "string",
"example": "LIMIT",
"description": "The provided order's type e.g. MARKET or LIMIT",
"enum": [
"MARKET",
"LIMIT"
]
},
"side": {
"$ref": "#/components/schemas/OrderSide"
},
"reduceOnly": {
"type": "boolean",
"example": true,
"description": "Indicates if the fill is reduce only"
},
"feeUsd": {
"type": "string",
"example": "3.049563",
"description": "The provided subaccount's charged fee in USD expressed as a decimal (precision: 9)"
},
"isMaker": {
"type": "boolean",
"example": true,
"description": "Indicates if the fill was a maker or taker"
},
"productId": {
"type": "string",
"example": "9c6bf870-a8ce-4de3-820b-542fd5c049ba",
"description": "Id of product the order fill was made against",
"format": "uuid"
},
"subaccountId": {
"type": "string",
"example": "aa301f94-f5b7-4e54-8b16-01052fccb2f9",
"description": "Id of the subaccount associated to order fill"
},
"createdAt": {
"type": "number",
"example": 1712019600000,
"description": "Fill creation timestamp (ms since Unix Epoch)"
}
},
"required": [
"id",
"orderId",
"price",
"filled",
"type",
"side",
"reduceOnly",
"feeUsd",
"isMaker",
"productId",
"subaccountId",
"createdAt"
]
},
"PageOfOrderFillDtos": {
"type": "object",
"properties": {
"hasNext": {
"type": "boolean",
"example": true,
"description": "Whether there are more objects to paginate through"
},
"nextCursor": {
"type": "string",
"description": "Pointer to the next page in pagination dataset"
},
"data": {
"description": "Array of order fill objects",
"type": "array",
"items": {
"$ref": "#/components/schemas/OrderFillDto"
}
}
},
"required": [
"data"
]
},
"TradeDto": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "9036443a-441a-4a66-87f2-bd5c44cdca7a",
"description": "Id representing the trade",
"format": "uuid"
},
"takerOrderId": {
"type": "string",
"example": "b1234567-89ab-cdef-0123-456789abcdef",
"description": "Id of the taker order",
"format": "uuid"
},
"makerOrderId": {
"type": "string",
"example": "e3f0a8b7-6daa-498a-bf53-c16dc5e779de",
"description": "Id of the maker order",
"format": "uuid"
},
"takerClientOrderId": {
"type": "string",
"example": "b1234567-89ab-cdef-0123-456789abcdef",
"description": "Client-generated order id of the taker order"
},
"makerClientOrderId": {
"type": "string",
"example": "e3f0a8b7-6daa-498a-bf53-c16dc5e779de",
"description": "Client-generated order id of the maker order"
},
"makerFeeUsd": {
"type": "string",
"example": "3.049563",
"description": "Maker fee in USD expressed as a decimal (precision: 9)"
},
"takerFeeUsd": {
"type": "string",
"example": "4.5743445",
"description": "Taker fee in USD expressed as a decimal (precision: 9)"
},
"price": {
"type": "string",
"example": "4200.5",
"description": "Price expressed as a decimal (precision: 9)"
},
"filled": {
"type": "string",
"example": "2.420",
"description": "Quantity filled in native units expressed as a decimal (precision: 9)"
},
"makerSide": {
"$ref": "#/components/schemas/OrderSide"
},
"takerSide": {
"$ref": "#/components/schemas/OrderSide"
},
"productId": {
"type": "string",
"example": "9c6bf870-a8ce-4de3-820b-542fd5c049ba",
"description": "Id of product the trade was made against",
"format": "uuid"
},
"createdAt": {
"type": "number",
"example": 1712019600000,
"description": "Trade creation timestamp (ms since Unix Epoch)"
}
},
"required": [
"id",
"takerOrderId",
"makerOrderId",
"makerFeeUsd",
"takerFeeUsd",
"price",
"filled",
"makerSide",
"takerSide",
"productId",
"createdAt"
]
},
"PageOfTradeDtos": {
"type": "object",
"properties": {
"hasNext": {
"type": "boolean",
"example": true,
"description": "Whether there are more objects to paginate through"
},
"nextCursor": {
"type": "string",
"description": "Pointer to the next page in pagination dataset"
},
"data": {
"description": "Array of trade objects",
"type": "array",
"items": {
"$ref": "#/components/schemas/TradeDto"
}
}
},
"required": [
"hasNext",
"data"
]
},
"PositionDto": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "9036443a-441a-4a66-87f2-bd5c44cdca7a",
"description": "Id representing the position",
"format": "uuid"
},
"cost": {
"type": "string",
"example": "9.3",
"description": "Current cost of the position in USD expressed as a decimal (precision: 9)"
},
"size": {
"type": "string",
"example": "1.5",
"description": "Position size in native units expressed as a decimal (precision: 9)"
},
"fundingUsd": {
"type": "string",
"example": "1.35",
"description": "Charged but unapplied funding on position, negative if paid, expressed as a decimal (precision: 9)"
},
"fundingAccruedUsd": {
"type": "string",
"example": "10.5",
"description": "Charged and applied funding on position, negative if paid, expressed as a decimal (precision: 9)"
},
"feesAccruedUsd": {
"type": "string",
"example": "0.5",
"description": "Fees accrued in USD expressed as a decimal (precision: 9)"
},
"realizedPnl": {
"type": "string",
"example": "-12.5",
"description": "Realized PnL in USD expressed as a decimal (precision: 9)"
},
"totalIncreaseNotional": {
"type": "string",
"example": "1000.0",
"description": "Cumulative USD value of all position increases expressed as a decimal (precision: 9)"
},
"totalIncreaseQuantity": {
"type": "string",
"example": "2.5",
"description": "Cumulative quantity of all position increases expressed as a decimal (precision: 9)"
},
"totalDecreaseNotional": {
"type": "string",
"example": "1050.0",
"description": "Cumulative USD value of all position decreases expressed as a decimal (precision: 9)"
},
"totalDecreaseQuantity": {
"type": "string",
"example": "2.5",
"description": "Cumulative quantity of all position decreases expressed as a decimal (precision: 9)"
},
"side": {
"$ref": "#/components/schemas/PositionSide"
},
"productId": {
"type": "string",
"example": "9c6bf870-a8ce-4de3-820b-542fd5c049ba",
"description": "Id of product to this position belongs to",
"format": "uuid"
},
"updatedAt": {
"type": "number",
"example": 1712019600000,
"description": "Position last updated timestamp (ms since Unix Epoch)"
},
"createdAt": {
"type": "number",
"example": 1712019600000,
"description": "Position creation timestamp (ms since Unix Epoch)"
},
"isLiquidated": {
"type": "boolean",
"example": true,
"description": "Whether the position was liquidated"
},
"liquidationPrice": {
"type": "string",
"example": "1200.5",
"description": "Product price at the time of liquidation (undefined if not liquidated, precision: 9)"
}
},
"required": [
"id",
"cost",
"size",
"fundingUsd",
"fundingAccruedUsd",
"feesAccruedUsd",
"realizedPnl",
"totalIncreaseNotional",
"totalIncreaseQuantity",
"totalDecreaseNotional",
"totalDecreaseQuantity",
"side",
"productId",
"updatedAt",
"createdAt",
"isLiquidated"
]
},
"PageOfPositionDtos": {
"type": "object",
"properties": {
"hasNext": {
"type": "boolean",
"example": true,
"description": "Whether there are more objects to paginate through"
},
"nextCursor": {
"type": "string",
"description": "Pointer to the next page in pagination dataset"
},
"data": {
"description": "Array of position objects",
"type": "array",
"items": {
"$ref": "#/components/schemas/PositionDto"
}
}
},
"required": [
"hasNext",
"data"
]
},
"PositionFillDto": {
"type": "object",
"properties": {
"price": {
"type": "string",
"example": "4200.5",
"description": "Fill price expressed as a decimal (precision: 9)"
},
"filled": {
"type": "string",
"example": "2.420",
"description": "Quantity filled in native units expressed as a decimal (precision: 9)"
},
"realizedPnl": {
"type": "string",
"example": "3.049563",
"description": "Realized PnL from the fill in USD expressed as a decimal (precision: 9)"
},
"type": {
"type": "string",
"example": "LIMIT",
"description": "Corresponding order type that led to the position fill, LIQUIDATED if takeover",
"enum": [
"MARKET",
"LIMIT",
"REALIZED_PNL",
"LIQUIDATION",
"REALIZED_FUNDING"
]
},
"side": {
"$ref": "#/components/schemas/PositionSide"
},
"reduceOnly": {
"type": "boolean",
"example": false,
"description": "Indicates if the fill is reduce only"
},
"feeUsd": {
"type": "string",
"example": "3.049563",
"description": "The charged fee in USD expressed as a decimal (precision: 9)"
},
"createdAt": {
"type": "number",
"example": 1712019600000,
"description": "Fill creation timestamp (ms since Unix Epoch)"
}
},
"required": [
"price",
"filled",
"realizedPnl",
"type",
"side",
"reduceOnly",
"feeUsd",
"createdAt"
]
},
"PageOfPositionFillDtos": {
"type": "object",
"properties": {
"hasNext": {
"type": "boolean",
"example": true,
"description": "Whether there are more objects to paginate through"
},
"nextCursor": {
"type": "string",
"description": "Pointer to the next page in pagination dataset"
},
"data": {
"description": "Array of position fill objects",
"type": "array",
"items": {
"$ref": "#/components/schemas/PositionFillDto"
}
}
},
"required": [
"hasNext",
"data"
]
},
"PositionLiquidationDto": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "9036443a-441a-4a66-87f2-bd5c44cdca7a",
"description": "Id representing the position liquidation",
"format": "uuid"
},
"subaccountId": {
"type": "string",
"example": "9036443a-441a-4a66-87f2-bd5c44cdca7a",
"description": "Id representing the subaccount that was liquidated",
"format": "uuid"
},
"productId": {
"type": "string",
"example": "9036443a-441a-4a66-87f2-bd5c44cdca7a",
"description": "Id representing the product that was liquidated",
"format": "uuid"
},
"positionId": {
"type": "string",
"example": "9036443a-441a-4a66-87f2-bd5c44cdca7a",
"description": "Id representing the position that was liquidated",
"format": "uuid"
},
"liquidationPrice": {
"type": "string",
"example": "1200.5",
"description": "Liquidation mark price in USD expressed as a decimal (precision: 9)"
},
"cause": {
"$ref": "#/components/schemas/PositionLiquidationCause"
},
"cost": {
"type": "string",
"example": "1000.5",
"description": "Position cost at the time of liquidation in USD expressed as a decimal (precision: 9)"
},
"fundingChargeUsd": {
"type": "string",
"example": "1200.5",
"description": "Funding charged in USD expressed as a decimal (precision: 9), undefined if not liquidated due to funding"
},
"positionSide": {
"$ref": "#/components/schemas/PositionSide"
},
"createdAt": {
"type": "number",
"example": 1712019600000,
"description": "Position liquidation timestamp (ms since Unix Epoch)"
}
},
"required": [
"id",
"subaccountId",
"productId",
"positionId",
"liquidationPrice",
"cause",
"cost",
"positionSide",
"createdAt"
]
},
"PageOfPositionLiquidationsDto": {
"type": "object",
"properties": {
"hasNext": {
"type": "boolean",
"example": true,
"description": "Whether there are more objects to paginate through"
},
"nextCursor": {
"type": "string",
"description": "Pointer to the next page in pagination dataset"
},
"data": {
"description": "Array of position liquidation objects",
"type": "array",
"items": {
"$ref": "#/components/schemas/PositionLiquidationDto"
}
}
},
"required": [
"hasNext",
"data"
]
},
"ProductDto": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "9036443a-441a-4a66-87f2-bd5c44cdca7a",
"description": "Id representing the registered product",
"format": "uuid"
},
"ticker": {
"type": "string",
"example": "ETHUSD",
"description": "Product ticker based on the base quote token"
},
"displayTicker": {
"type": "string",
"example": "ETH-USD",
"description": "Product display ticker based on the base quote token"
},
"baseTokenAddress": {
"type": "string",
"example": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"description": "Address of the base token (non-checksummed; zero address if virtual)",
"format": "hex"
},
"quoteTokenAddress": {
"type": "string",
"example": "0x4c9EDD5852cd905f086C759E8383e09bff1E68B3",
"description": "Address of quote token (non-checksummed)",
"format": "hex"
},
"baseTokenName": {
"type": "string",
"example": "ETH",
"description": "Name of the base token (e.g. BTC in BTCUSD)"
},
"quoteTokenName": {
"type": "string",
"example": "USDe",
"description": "Name of the quote token (e.g. USD in BTCUSD)"
},
"engineType": {
"$ref": "#/components/schemas/EngineType"
},
"onchainId": {
"type": "integer",
"example": 1,
"description": "The productId generated onchain after registering for the first time"
},
"blockNumber": {
"type": "string",
"example": "123062737",
"description": "Block number this product was registered on"
},
"cumulativeFundingUsd": {
"type": "string",
"example": "1.001",
"description": "Cumulative funding in USD of the product (precision: 9)"
},
"createdAt": {
"type": "number",
"example": 1712019600000,
"description": "Product creation timestamp (ms since Unix Epoch)"
},
"fundingUpdatedAt": {
"type": "number",
"example": 1721724269,
"description": "Unix timestamp when funding was last updated"
},
"minQuantity": {
"type": "string",
"example": "0.05",
"description": "The minimum order quantity in native units expressed as a decimal (precision: 9)"
},
"lotSize": {
"type": "string",
"example": "0.01",
"description": "Quantity must be divisible by the lotSize in expressed as a decimal (precision: 9)"
},
"tickSize": {
"type": "string",
"example": "0.0001",
"description": "Minimum price increment (tickSize) expressed as a decimal (precision: 9)"
},
"makerFee": {
"type": "string",
"example": "0.001",
"description": "Fee charged to the maker on order trades expressed as a decimal (precision: 9)"
},
"takerFee": {
"type": "string",
"example": "0.004",
"description": "Fee charged to the taker on order trades expressed as a decimal (precision: 9)"
},
"maxQuantity": {
"type": "string",
"example": "100000",
"description": "Max quantity per order in native units expressed as a decimal (precision: 9)"
},
"minPrice": {
"type": "string",
"example": "0",
"description": "Min price in USD expressed as a decimal (precision: 9)"
},
"maxPrice": {
"type": "string",
"example": "100000",
"description": "Max price in USD expressed as a decimal (precision: 9)"
},
"volume24h": {
"type": "string",
"example": "500000000.42",
"description": "24h volume in base token native units expressed as a decimal (precision: 9)"
},
"maxLeverage": {
"type": "number",
"example": 20,
"description": "Maximum leverage allowed for the product"
},
"pythFeedId": {
"type": "number",
"example": 2,
"description": "Pyth price feed id"
},
"fundingRate1h": {
"type": "string",
"example": "0.01",
"description": "Last computed hourly funding rate expressed as a decimal (precision: 9)"
},
"openInterest": {
"type": "string",
"example": "3300.17",
"description": "OI of both sides in native units expressed as a decimal (precision: 9)"
},
"maxOpenInterestUsd": {
"type": "string",
"example": "200000000.0",
"description": "Max OI of one side in USD expressed as a decimal (precision: 9)"
},
"maxPositionNotionalUsd": {
"type": "string",
"example": "50000000.0",
"description": "Max position notional value, in USD expressed as a decimal (precision: 9)"
}
},
"required": [
"id",
"ticker",
"displayTicker",
"baseTokenAddress",
"quoteTokenAddress",
"baseTokenName",
"quoteTokenName",
"engineType",
"onchainId",
"blockNumber",
"cumulativeFundingUsd",
"createdAt",
"minQuantity",
"lotSize",
"tickSize",
"makerFee",
"takerFee",
"maxQuantity",
"minPrice",
"maxPrice",
"volume24h",
"maxLeverage",
"pythFeedId",
"fundingRate1h",
"openInterest",
"maxOpenInterestUsd",
"maxPositionNotionalUsd"
]
},
"PageOfProductDtos": {
"type": "object",
"properties": {
"hasNext": {
"type": "boolean",
"example": true,
"description": "Whether there are more objects to paginate through"
},
"nextCursor": {
"type": "string",
"description": "Pointer to the next page in pagination dataset"
},
"data": {
"description": "Array of product objects",
"type": "array",
"items": {
"$ref": "#/components/schemas/ProductDto"
}
}
},
"required": [
"hasNext",
"data"
]
},
"MarketLiquidityDto": {
"type": "object",
"properties": {
"timestamp": {
"type": "number",
"example": 1731664105881,
"description": "Most recent book update, created timestamp if never updated (ms since Unix Epoch)"
},
"previousTimestamp": {
"type": "number",
"example": 1731664105881,
"description": "Previous book update, undefined if never updated (ms since Unix Epoch)"
},
"productId": {
"type": "string",
"example": "9036443a-441a-4a66-87f2-bd5c44cdca7a",
"description": "Id representing the product",
"format": "uuid"
},
"asks": {
"type": "array",
"items": {
"type": "array",
"minItems": 2,
"maxItems": 2,
"items": {
"type": "string",
"additionalProperties": false
}
},
"example": [
[
"4200.69",
"1337.420"
]
],
"description": "An array of ask tuple pairs (price, quantity) ordered in asc"
},
"bids": {
"type": "array",
"items": {
"type": "array",
"minItems": 2,
"maxItems": 2,
"items": {
"type": "string",
"additionalProperties": false
}
},
"example": [
[
"4199.42",
"420.55"
]
],
"description": "An array of bid tuple pairs (price, quantity) ordered in desc"
}
},
"required": [
"timestamp",
"productId",
"asks",
"bids"
]
},
"MarketPriceDto": {
"type": "object",
"properties": {
"productId": {
"type": "string",
"example": "9036443a-441a-4a66-87f2-bd5c44cdca7a",
"description": "Id representing the registered product",
"format": "uuid"
},
"bestBidPrice": {
"type": "string",
"example": "104399.65",
"description": "Best bid price in USD expressed as a decimal (precision: 9)"
},
"bestAskPrice": {
"type": "string",
"example": "104400.1",
"description": "Best ask price in USD expressed as a decimal (precision: 9)"
},
"oraclePrice": {
"type": "string",
"example": "104399.7",
"description": "Oracle price in USD expressed as a decimal (precision: 9)"
},
"price24hAgo": {
"type": "string",
"example": "101228.38",
"description": "Price of product 24hrs ago in USD expressed as a decimal (precision: 9)"
}
},
"required": [
"productId"
]
},
"ListOfMarketPriceDtos": {
"type": "object",
"properties": {
"data": {
"description": "Array of market price objects",
"type": "array",
"items": {
"$ref": "#/components/schemas/MarketPriceDto"
}
}
},
"required": [
"data"
]
},
"FundingDto": {
"type": "object",
"properties": {
"createdAt": {
"type": "number",
"example": 1712019600000,
"description": "Funding charge timestamp (ms since Unix Epoch)"
},
"fundingRate1h": {
"type": "string",
"description": "Hourly funding rate",
"example": "0.013876480"
}
},
"required": [
"createdAt",
"fundingRate1h"
]
},
"PageOfFundingDtos": {
"type": "object",
"properties": {
"hasNext": {
"type": "boolean",
"example": true,
"description": "Whether there are more objects to paginate through"
},
"nextCursor": {
"type": "string",
"description": "Pointer to the next page in pagination dataset"
},
"data": {
"description": "Array of funding rate history objects",
"type": "array",
"items": {
"$ref": "#/components/schemas/FundingDto"
}
}
},
"required": [
"hasNext",
"data"
]
},
"ProjectedFundingDto": {
"type": "object",
"properties": {
"productId": {
"type": "string",
"description": "Id representing the registered product",
"format": "uuid"
},
"fundingRateProjected1h": {
"type": "string",
"description": "Projected funding rate expressed as a decimal (precision: 9)",
"example": "0.000078771"
},
"fundingRate1h": {
"type": "string",
"description": "Funding rate expressed as a decimal (precision: 9)",
"example": "0.013876480"
}
},
"required": [
"productId",
"fundingRateProjected1h",
"fundingRate1h"
]
},
"PageOfProjectedFundingDtos": {
"type": "object",
"properties": {
"hasNext": {
"type": "boolean",
"example": true,
"description": "Whether there are more objects to paginate through"
},
"nextCursor": {
"type": "string",
"description": "Pointer to the next page in pagination dataset"
},
"data": {
"description": "Array of projected funding rate objects",
"type": "array",
"items": {
"$ref": "#/components/schemas/ProjectedFundingDto"
}
}
},
"required": [
"hasNext",
"data"
]
},
"DomainTypeDto": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name of signing domain"
},
"version": {
"type": "string",
"description": "Current major version of the signing domain"
},
"chainId": {
"type": "number",
"description": "The EIP-155 chain id"
},
"verifyingContract": {
"type": "string",
"description": "Address of the contract that will verify the signature",
"format": "hex"
}
},
"required": [
"name",
"version",
"chainId",
"verifyingContract"
]
},
"SignatureTypesDto": {
"type": "object",
"properties": {
"LinkSigner": {
"type": "string",
"description": "LinkSigner signature type"
},
"TradeOrder": {
"type": "string",
"description": "TradeOrder signature type"
},
"InitiateWithdraw": {
"type": "string",
"description": "InitiateWithdraw signature type"
},
"RevokeLinkedSigner": {
"type": "string",
"description": "RevokeLinkedSigner signature type"
},
"CancelOrder": {
"type": "string",
"description": "CancelOrder signature type"
},
"RefreshLinkedSigner": {
"type": "string",
"description": "RefreshLinkedSigner signature type"
},
"EIP712Auth": {
"type": "string",
"description": "EIP712Auth signature type"
}
},
"required": [
"LinkSigner",
"TradeOrder",
"InitiateWithdraw",
"RevokeLinkedSigner",
"CancelOrder",
"RefreshLinkedSigner",
"EIP712Auth"
]
},
"RpcConfigDto": {
"type": "object",
"properties": {
"domain": {
"description": "Domain type",
"allOf": [
{
"$ref": "#/components/schemas/DomainTypeDto"
}
]
},
"signatureTypes": {
"description": "Signature types",
"allOf": [
{
"$ref": "#/components/schemas/SignatureTypesDto"
}
]
}
},
"required": [
"domain",
"signatureTypes"
]
},
"SubaccountDto": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "9036443a-441a-4a66-87f2-bd5c44cdca7a",
"description": "Id representing the registered subaccount",
"format": "uuid"
},
"name": {
"type": "string",
"example": "0x7072696d61727900000000000000000000000000000000000000000000000000",
"description": "Bytes32 encoded subaccount name (0x prefix, zero padded)",
"format": "hex"
},
"account": {
"type": "string",
"example": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"description": "Address of the account which registered the subaccount (non-checksummed)",
"format": "hex"
},
"createdBlockNumber": {
"type": "string",
"example": "123062737",
"description": "Block number this subaccount was created on"
},
"registeredBlockNumber": {
"type": "string",
"example": "123062737",
"description": "Block number this subaccount was registered on"
},
"createdAt": {
"type": "number",
"example": 1712019600000,
"description": "Subaccount creation timestamp (ms since Unix Epoch)"
}
},
"required": [
"id",
"name",
"account",
"createdBlockNumber",
"createdAt"
]
},
"PageOfSubaccountDtos": {
"type": "object",
"properties": {
"hasNext": {
"type": "boolean",
"example": true,
"description": "Whether there are more objects to paginate through"
},
"nextCursor": {
"type": "string",
"description": "Pointer to the next page in pagination dataset"
},
"data": {
"description": "Array of subaccount objects",
"type": "array",
"items": {
"$ref": "#/components/schemas/SubaccountDto"
}
}
},
"required": [
"hasNext",
"data"
]
},
"SubaccountBalanceDto": {
"type": "object",
"properties": {
"subaccountId": {
"type": "string",
"example": "9036443a-441a-4a66-87f2-bd5c44cdca7a",
"description": "Id representing the subaccount",
"format": "uuid"
},
"tokenId": {
"type": "string",
"example": "9036443a-441a-4a66-87f2-bd5c44cdca7a",
"description": "Id representing the token",
"format": "uuid"
},
"tokenAddress": {
"type": "string",
"example": "0x4c9EDD5852cd905f086C759E8383e09bff1E68B3",
"description": "ERC20 deposited token address (non-checksummed, zero address if virtual)",
"format": "hex"
},
"tokenName": {
"type": "string",
"example": "ETH",
"description": "The unique exchange defined token name driven by addToken onchain"
},
"amount": {
"type": "string",
"example": "1.5",
"description": "Token balance in native units expressed as a decimal (precision: 9)",
"format": "decimal"
},
"available": {
"type": "string",
"example": "0.1337",
"description": "Portion of balance transferrable in native units expressed as a decimal (precision: 9)",
"format": "decimal"
},
"totalUsed": {
"type": "string",
"example": "1.3663",
"description": "Portion of balance non-transferrable in native units expressed as a decimal (precision: 9)",
"format": "decimal"
},
"updatedAt": {
"type": "number",
"example": 1712019600000,
"description": "Token balance last updated timestamp (ms since Unix Epoch)"
}
},
"required": [
"subaccountId",
"tokenId",
"tokenAddress",
"tokenName",
"amount",
"available",
"totalUsed",
"updatedAt"
]
},
"PageOfSubaccountBalanceDtos": {
"type": "object",
"properties": {
"hasNext": {
"type": "boolean",
"example": true,
"description": "Whether there are more objects to paginate through"
},
"nextCursor": {
"type": "string",
"description": "Pointer to the next page in pagination dataset"
},
"data": {
"description": "Array of order subaccount balances",
"type": "array",
"items": {
"$ref": "#/components/schemas/SubaccountBalanceDto"
}
}
},
"required": [
"hasNext",
"data"
]
},
"LinkSignerDtoData": {
"type": "object",
"properties": {
"subaccountId": {
"type": "string",
"format": "uuid",
"example": "9036443a-441a-4a66-87f2-bd5c44cdca7a",
"description": "Id representing the registered subaccount"
},
"sender": {
"type": "string",
"example": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"description": "Account address that created the signature in this message",
"format": "hex"
},
"subaccount": {
"type": "string",
"example": "0x7072696d61727900000000000000000000000000000000000000000000000000",
"description": "Bytes32 encoded subaccount name (0x prefix, zero padded)",
"format": "hex"
},
"signer": {
"type": "string",
"example": "0x1Db3439a222C519ab44bb1144fC28167b4Fa6EE6",
"description": "Address of signer to allowed for delegated signing",
"format": "hex"
},
"nonce": {
"type": "string",
"example": "2687929537462333",
"description": "Message nonce timestamp (nanoseconds since Unix Epoch)"
},
"signedAt": {
"type": "integer",
"example": 1712019600,
"description": "Message signedAt current timestamp (seconds since Unix Epoch)"
}
},
"required": [
"subaccountId",
"sender",
"subaccount",
"signer",
"nonce",
"signedAt"
]
},
"LinkSignerDto": {
"type": "object",
"properties": {
"signature": {
"type": "string",
"description": "The signature from signTypedData(...) signed by the sender",
"format": "hex"
},
"signerSignature": {
"type": "string",
"description": "The signature from signTypedData(...) signed by the signer",
"format": "hex"
},
"data": {
"$ref": "#/components/schemas/LinkSignerDtoData"
}
},
"required": [
"signature",
"signerSignature",
"data"
]
},
"SignerDto": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "9036443a-441a-4a66-87f2-bd5c44cdca7a",
"description": "Id representing the linked signer"
},
"signer": {
"type": "string",
"example": "0x1Db3439a222C519ab44bb1144fC28167b4Fa6EE6",
"description": "Address of the signer linked with the subaccount (non-checksummed)",
"format": "hex"
},
"status": {
"type": "string",
"example": "PENDING",
"description": "Status of the signer",
"enum": [
"PENDING",
"ACTIVE",
"PENDING_REVOKE",
"REVOKED",
"REJECTED"
]
},
"blockNumber": {
"type": "string",
"example": "123062737",
"description": "Block number the signer has been linked on. Undefined means it has not be processed"
},
"linkedAt": {
"type": "number",
"example": 1712019615000,
"description": "Onchain linkage timestamp (ms since Unix Epoch)"
},
"revokedBlockNumber": {
"type": "string",
"example": "123062737",
"description": "Block number the signer has been revoked on. Undefined means it has not be processed"
},
"revokedAt": {
"type": "number",
"example": 1712019600000,
"description": "Onchain revocation timestamp (ms since Unix Epoch)"
},
"expiresAt": {
"type": "number",
"example": 1713229200000,
"description": "Signer expiry timestamp (ms since Unix Epoch)"
},
"createdAt": {
"type": "number",
"example": 1712019600000,
"description": "Link signer submission timestamp (ms since Unix Epoch)"
}
},
"required": [
"id",
"signer",
"status",
"expiresAt",
"createdAt"
]
},
"RevokeLinkedSignerDtoData": {
"type": "object",
"properties": {
"subaccountId": {
"type": "string",
"format": "uuid",
"example": "9036443a-441a-4a66-87f2-bd5c44cdca7a",
"description": "Id representing the registered subaccount"
},
"sender": {
"type": "string",
"example": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"description": "Address of account that created the signature in this message",
"format": "hex"
},
"subaccount": {
"type": "string",
"example": "0x7072696d61727900000000000000000000000000000000000000000000000000",
"description": "Bytes32 encoded subaccount name (0x prefix, zero padded)",
"format": "hex"
},
"signer": {
"type": "string",
"example": "0x1Db3439a222C519ab44bb1144fC28167b4Fa6EE6",
"description": "Address of signer to revoke",
"format": "hex"
},
"nonce": {
"type": "string",
"example": "2687929537462333",
"description": "Message nonce timestamp (nanoseconds since Unix Epoch)"
},
"signedAt": {
"type": "integer",
"example": 1712019600,
"description": "Message signedAt current timestamp (seconds since Unix Epoch)"
}
},
"required": [
"subaccountId",
"sender",
"subaccount",
"signer",
"nonce",
"signedAt"
]
},
"RevokeLinkedSignerDto": {
"type": "object",
"properties": {
"signature": {
"type": "string",
"description": "The signature from signTypedData(...) signed by the sender",
"format": "hex"
},
"data": {
"$ref": "#/components/schemas/RevokeLinkedSignerDtoData"
}
},
"required": [
"signature",
"data"
]
},
"RefreshLinkedSignerDtoData": {
"type": "object",
"properties": {
"subaccountId": {
"type": "string",
"format": "uuid",
"example": "9036443a-441a-4a66-87f2-bd5c44cdca7a",
"description": "Id representing the registered subaccount"
},
"sender": {
"type": "string",
"example": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"description": "Address of account that created the signature in this message",
"format": "hex"
},
"subaccount": {
"type": "string",
"example": "0x7072696d61727900000000000000000000000000000000000000000000000000",
"description": "Bytes32 encoded subaccount name (0x prefix, zero padded)",
"format": "hex"
},
"signer": {
"type": "string",
"example": "0x1Db3439a222C519ab44bb1144fC28167b4Fa6EE6",
"description": "Address of signer to refresh",
"format": "hex"
},
"nonce": {
"type": "string",
"example": "2687929537462333",
"description": "Message nonce timestamp (nanoseconds since Unix Epoch)"
},
"signedAt": {
"type": "integer",
"example": 1712019600,
"description": "Message signedAt current timestamp (seconds since Unix Epoch)"
}
},
"required": [
"subaccountId",
"sender",
"subaccount",
"signer",
"nonce",
"signedAt"
]
},
"RefreshLinkedSignerDto": {
"type": "object",
"properties": {
"signature": {
"type": "string",
"description": "The signature from signTypedData(...) signed by the sender",
"format": "hex"
},
"data": {
"$ref": "#/components/schemas/RefreshLinkedSignerDtoData"
}
},
"required": [
"signature",
"data"
]
},
"AccountSignerQuotaDto": {
"type": "object",
"properties": {
"maxLinkedSignersPeriodDays": {
"type": "number",
"example": 7,
"description": "Ratelimit period in days for linking signers per account"
},
"maxLinkedSignersInPeriod": {
"type": "number",
"example": 10,
"description": "Max number of signer that can be linked within ratelimit period"
},
"linkedSignersUsedInPeriod": {
"type": "number",
"example": 2,
"description": "Number of signers linked within current ratelimit period"
},
"linkedSignerRefreshHoursBeforeExpiry": {
"type": "number",
"example": 48,
"description": "Hours before expiry when a signer can be refreshed"
}
},
"required": [
"maxLinkedSignersPeriodDays",
"maxLinkedSignersInPeriod",
"linkedSignersUsedInPeriod",
"linkedSignerRefreshHoursBeforeExpiry"
]
},
"PageOfSignersDto": {
"type": "object",
"properties": {
"hasNext": {
"type": "boolean",
"example": true,
"description": "Whether there are more objects to paginate through"
},
"nextCursor": {
"type": "string",
"description": "Pointer to the next page in pagination dataset"
},
"data": {
"description": "Array of signer objects",
"type": "array",
"items": {
"$ref": "#/components/schemas/SignerDto"
}
}
},
"required": [
"hasNext",
"data"
]
},
"WithdrawDto": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "9036443a-441a-4a66-87f2-bd5c44cdca7a",
"description": "Id representing the withdraw",
"format": "uuid"
},
"initiatedBlockNumber": {
"type": "string",
"example": "123062000",
"description": "Block number the withdraw was initiated on"
},
"finalizedBlockNumber": {
"type": "string",
"example": "123062992",
"description": "Block number the withdraw was completed on"
},
"status": {
"type": "string",
"example": "PENDING",
"description": "Current status of the withdraw",
"enum": [
"SUBMITTED",
"PENDING",
"COMPLETED",
"REJECTED"
]
},
"subaccount": {
"type": "string",
"example": "0x7072696d61727900000000000000000000000000000000000000000000000000",
"description": "Bytes32 encoded subaccount name (0x prefix, zero padded)",
"format": "hex"
},
"token": {
"type": "string",
"example": "0x4c9EDD5852cd905f086C759E8383e09bff1E68B3",
"description": "Address of asset to withdraw (non-checksummed)",
"format": "hex"
},
"lzDestinationAddress": {
"type": "string",
"description": "LayerZero destination address (leading 0x bytes32 encoded) for the transfer (if withdraw)",
"format": "hex"
},
"lzDestinationEid": {
"type": "number",
"example": 30391,
"description": "LayerZero destination endpoint ID for the transfer (if withdraw)"
},
"amount": {
"type": "string",
"example": "1.5",
"description": "Amount of asset transferred expressed as a decimal"
},
"createdAt": {
"type": "number",
"example": 1712019600000,
"description": "Withdraw creation timestamp (ms since Unix Epoch)"
},
"withdrawDigest": {
"type": "string",
"description": "Bytes32 hash of the withdraw data (with 0x prefix)",
"format": "hex"
}
},
"required": [
"id",
"status",
"subaccount",
"token",
"amount",
"createdAt",
"withdrawDigest"
]
},
"PageOfWithdrawDtos": {
"type": "object",
"properties": {
"hasNext": {
"type": "boolean",
"example": true,
"description": "Whether there are more objects to paginate through"
},
"nextCursor": {
"type": "string",
"description": "Pointer to the next page in pagination dataset"
},
"data": {
"description": "Array of subaccount withdraw objects",
"type": "array",
"items": {
"$ref": "#/components/schemas/WithdrawDto"
}
}
},
"required": [
"hasNext",
"data"
]
},
"TransferDto": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "9036443a-441a-4a66-87f2-bd5c44cdca7a",
"description": "Id representing the transfer",
"format": "uuid"
},
"initiatedBlockNumber": {
"type": "string",
"example": "123062000",
"description": "Block number the transfer was initiated on"
},
"finalizedBlockNumber": {
"type": "string",
"example": "123062992",
"description": "Block number the transfer was completed on"
},
"status": {
"type": "string",
"example": "PENDING",
"description": "Current status of the transfer",
"enum": [
"SUBMITTED",
"PENDING",
"COMPLETED",
"REJECTED"
]
},
"subaccountId": {
"type": "string",
"example": "9036443a-441a-4a66-87f2-bd5c44cdca7a",
"description": "Id representing the registered subaccount",
"format": "uuid"
},
"tokenName": {
"type": "string",
"example": "ETH",
"description": "The unique exchange defined token name driven by addToken onchain"
},
"tokenAddress": {
"type": "string",
"example": "0x4c9EDD5852cd905f086C759E8383e09bff1E68B3",
"description": "Address of token transferred (non-checksummed)",
"format": "hex"
},
"type": {
"type": "string",
"example": "WITHDRAW",
"description": "Type of transfer (WITHDRAW or DEPOSIT)",
"enum": [
"DEPOSIT",
"WITHDRAW"
]
},
"amount": {
"type": "string",
"example": "0.42",
"description": "Amount of tokens transferred in native units expressed as a decimal (precision: 9)"
},
"lzDestinationAddress": {
"type": "string",
"description": "LayerZero destination address (leading 0x bytes32 encoded) for the transfer (if withdraw)",
"format": "hex"
},
"lzDestinationEid": {
"type": "number",
"example": 40422,
"description": "LayerZero destination endpoint ID for the transfer (if withdraw)"
},
"fee": {
"type": "string",
"example": "0.42",
"description": "Fee paid for the transfer in native units expressed as a decimal (precision: 9)"
},
"createdAt": {
"type": "number",
"example": 1712019600000,
"description": "Transfer creation timestamp (ms since Unix Epoch)"
},
"initiatedTransactionHash": {
"type": "string",
"example": "0x8ffa427c4079a78a64811e80fe4dbefa8bd8e2f4cc572cda9717297d220d4f8e",
"description": "Transaction hash for the initiation of the transfer",
"format": "hex"
},
"finalizedTransactionHash": {
"type": "string",
"example": "0x42aa378d58b92c639dda64d528a6123f14e59e071c4b56e058d3a54b819e2b79",
"description": "Transaction hash for the finalization of the transfer",
"format": "hex"
}
},
"required": [
"id",
"status",
"subaccountId",
"tokenName",
"tokenAddress",
"type",
"amount",
"fee",
"createdAt"
]
},
"PageOfTransfersDtos": {
"type": "object",
"properties": {
"hasNext": {
"type": "boolean",
"example": true,
"description": "Whether there are more objects to paginate through"
},
"nextCursor": {
"type": "string",
"description": "Pointer to the next page in pagination dataset"
},
"data": {
"description": "Array of transfer objects",
"type": "array",
"items": {
"$ref": "#/components/schemas/TransferDto"
}
}
},
"required": [
"hasNext",
"data"
]
},
"InitiateWithdrawDtoData": {
"type": "object",
"properties": {
"account": {
"type": "string",
"example": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"description": "Account address to withdraw from",
"format": "hex"
},
"subaccount": {
"type": "string",
"example": "0x7072696d61727900000000000000000000000000000000000000000000000000",
"description": "Bytes32 encoded subaccount name (0x prefix, zero padded)",
"format": "hex"
},
"token": {
"type": "string",
"example": "0x4c9EDD5852cd905f086C759E8383e09bff1E68B3",
"description": "Address of token to be withdrawn",
"format": "hex"
},
"amount": {
"type": "string",
"example": "1337.42",
"description": "Amount to withdraw in native units expressed as a decimal (precision: 9)",
"format": "decimal"
},
"lzDestinationAddress": {
"type": "string",
"example": "0x000000000000000000000000d8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"description": "Bytes32 encoded LayerZero destination address (with 0x prefix, left zero padded)",
"format": "hex"
},
"lzDestinationEid": {
"enum": [
0,
40422,
40231,
40161,
30391,
30110,
30101
],
"type": "number",
"example": 40231,
"description": "LayerZero destination endpoint ID for the transfer (zero if not bridging)",
"x-enum-varnames": [
"NONE",
"ETHEREAL_TESTNET",
"ARBITRUM_SEPOLIA",
"ETHEREUM_SEPOLIA",
"ETHEREAL_MAINNET",
"ARBITRUM_MAINNET",
"ETHEREUM_MAINNET"
]
},
"nonce": {
"type": "string",
"example": "2687929537462333",
"description": "Message nonce timestamp (nanoseconds since Unix Epoch)"
},
"signedAt": {
"type": "integer",
"format": "int64",
"example": 1712019600,
"description": "Message signedAt current timestamp (seconds since Unix Epoch)"
}
},
"required": [
"account",
"subaccount",
"token",
"amount",
"lzDestinationAddress",
"lzDestinationEid",
"nonce",
"signedAt"
]
},
"InitiateWithdrawDto": {
"type": "object",
"properties": {
"signature": {
"type": "string",
"description": "The signature from signTypedData(...) signed by the sender",
"format": "hex"
},
"data": {
"$ref": "#/components/schemas/InitiateWithdrawDtoData"
}
},
"required": [
"signature",
"data"
]
},
"WithdrawFailedDto": {
"type": "object",
"properties": {
"statusCode": {
"type": "number",
"default": 422,
"enum": [
422
]
},
"message": {
"type": "string",
"enum": [
"AccountSuspended",
"EngineSuspended",
"InsufficientBalance",
"InsuranceFundCannotWithdraw"
],
"example": "InsufficientBalance",
"description": "Error code indicating the reason for failure"
},
"error": {
"type": "string",
"default": "Unprocessable Entity",
"enum": [
"Unprocessable Entity"
]
}
},
"required": [
"statusCode",
"message",
"error"
]
},
"TokenDto": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "9036443a-441a-4a66-87f2-bd5c44cdca7a",
"description": "Id representing the token",
"format": "uuid"
},
"address": {
"type": "string",
"example": "0x4c9EDD5852cd905f086C759E8383e09bff1E68B3",
"description": "Address of the token (non-checksummed; zero address if virtual)",
"format": "hex"
},
"lzOftAddress": {
"type": "string",
"example": "0x41e038d9c9aF27369EcBCe72A69a96695A1fD0D3",
"description": "LayerZero OFT address of the token (non-checksummed; if has LZ OFT or adapter, zero address if not)",
"format": "hex"
},
"name": {
"type": "string",
"example": "USD",
"description": "The unique exchange defined token name driven by addToken onchain"
},
"erc20Name": {
"type": "string",
"example": "Wrapped USDe",
"description": "ERC20 token name (available if not virtual)"
},
"erc20Symbol": {
"type": "string",
"example": "WUSDe",
"description": "ERC20 token symbol (available if not virtual)"
},
"erc20Decimals": {
"type": "number",
"example": 18,
"description": "ERC20 token decimals (available if not virtual)"
},
"depositEnabled": {
"type": "boolean",
"example": true,
"description": "Whether the token is enabled for deposit"
},
"withdrawEnabled": {
"type": "boolean",
"example": true,
"description": "Whether the token is enabled for withdraw"
},
"depositFee": {
"type": "string",
"example": "0",
"description": "Amount of native units charged on deposit expressed as a decimal (precision: 9)"
},
"withdrawFee": {
"type": "string",
"example": "1",
"description": "Amount of native units charged on withdraw expressed as a decimal (precision: 9)"
},
"minDeposit": {
"type": "string",
"example": "10.123456",
"description": "Min deposit amount as native units expressed as a decimal (precision: 9)"
},
"createdAt": {
"type": "number",
"example": 1712019600000,
"description": "Token creation timestamp (ms since Unix Epoch)"
}
},
"required": [
"id",
"address",
"lzOftAddress",
"name",
"depositEnabled",
"withdrawEnabled",
"depositFee",
"withdrawFee",
"minDeposit",
"createdAt"
]
},
"PageOfTokensDtos": {
"type": "object",
"properties": {
"hasNext": {
"type": "boolean",
"example": true,
"description": "Whether there are more objects to paginate through"
},
"nextCursor": {
"type": "string",
"description": "Pointer to the next page in pagination dataset"
},
"data": {
"description": "Array of token objects",
"type": "array",
"items": {
"$ref": "#/components/schemas/TokenDto"
}
}
},
"required": [
"hasNext",
"data"
]
},
"SystemTimeDto": {
"type": "object",
"properties": {
"time": {
"type": "number",
"example": 1712019600000,
"description": "Current system timestamp (ms since Unix Epoch)"
}
},
"required": [
"time"
]
},
"WhitelistDto": {
"type": "object",
"properties": {
"isWhitelisted": {
"type": "boolean",
"example": true,
"description": "Whether the address is whitelisted"
}
},
"required": [
"isWhitelisted"
]
},
"PointsPeriodDto": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "9036443a-441a-4a66-87f2-bd5c44cdca7a",
"description": "Id representing the points period entry",
"format": "uuid"
},
"address": {
"type": "string",
"example": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"description": "Address of the account (non-checksummed)",
"format": "hex"
},
"season": {
"type": "number",
"example": 1,
"description": "Season number"
},
"epoch": {
"type": "number",
"example": 1,
"description": "Epoch number within the season"
},
"points": {
"type": "string",
"example": "13.256",
"description": "Points earned in this epoch expressed as a decimal (precision: 9)"
},
"referralPoints": {
"type": "string",
"example": "1.95",
"description": "Referral points earned in this epoch expressed as a decimal (precision: 9)"
},
"startedAt": {
"type": "number",
"example": 1712019600000,
"description": "Beginning of points period (ms since Unix Epoch)"
},
"endedAt": {
"type": "number",
"example": 1712019600000,
"description": "End of points period (ms since Unix Epoch)"
},
"createdAt": {
"type": "number",
"example": 1712019600000,
"description": "Points period creation timestamp (ms since Unix Epoch)"
},
"updatedAt": {
"type": "number",
"example": 1712019600000,
"description": "Points period last update timestamp (ms since Unix Epoch)"
}
},
"required": [
"id",
"address",
"season",
"epoch",
"points",
"referralPoints",
"startedAt",
"endedAt",
"createdAt",
"updatedAt"
]
},
"ListOfPointsPeriodDtos": {
"type": "object",
"properties": {
"data": {
"description": "Array of points period objects",
"type": "array",
"items": {
"$ref": "#/components/schemas/PointsPeriodDto"
}
}
},
"required": [
"data"
]
},
"PointsSeasonSummaryDto": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "9036443a-441a-4a66-87f2-bd5c44cdca7a",
"description": "Id representing the summary of points in this season",
"format": "uuid"
},
"address": {
"type": "string",
"example": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"description": "Address of the account (non-checksummed)",
"format": "hex"
},
"season": {
"type": "number",
"example": 1,
"description": "Season number"
},
"totalPoints": {
"type": "string",
"example": "13.256",
"description": "Total points earned including referral points in this season expressed as a decimal (precision: 9)"
},
"previousTotalPoints": {
"type": "string",
"example": "13.256",
"description": "Total points earned before most recent distribution expressed as a decimal (precision: 9)"
},
"referralPoints": {
"type": "string",
"example": "1.95",
"description": "Referral points earned expressed as a decimal (precision: 9)"
},
"previousReferralPoints": {
"type": "string",
"example": "1.95",
"description": "Referral points earned before most recent distribution expressed as a decimal (precision: 9)"
},
"rank": {
"type": "number",
"example": 1,
"description": "Current rank in this season"
},
"previousRank": {
"type": "number",
"example": 2,
"description": "Rank before most recent distribution"
},
"tier": {
"enum": [
0,
1,
2,
3,
4,
5
],
"type": "number",
"example": 0,
"description": "Account tier derived based on activity this season",
"x-enum-varnames": [
"TIER_0",
"TIER_1",
"TIER_2",
"TIER_3",
"TIER_4",
"TIER_5"
]
},
"createdAt": {
"type": "number",
"example": 1712019600000,
"description": "Points season summary creation timestamp (ms since Unix Epoch)"
},
"updatedAt": {
"type": "number",
"example": 1712019600000,
"description": "Points season summary last update timestamp (ms since Unix Epoch)"
}
},
"required": [
"id",
"address",
"season",
"totalPoints",
"previousTotalPoints",
"referralPoints",
"previousReferralPoints",
"rank",
"previousRank",
"tier",
"createdAt",
"updatedAt"
]
},
"ListOfPointsSeasonSummariesDtos": {
"type": "object",
"properties": {
"data": {
"description": "Array of points season summary objects",
"type": "array",
"items": {
"$ref": "#/components/schemas/PointsSeasonSummaryDto"
}
}
},
"required": [
"data"
]
},
"ReferralCodeUsageDto": {
"type": "object",
"properties": {
"code": {
"type": "string",
"example": "XYZ123456789",
"description": "The referral code"
},
"remainingUsage": {
"type": "number",
"example": 5,
"description": "Number of remaining times the code can be claimed"
}
},
"required": [
"code",
"remainingUsage"
]
},
"ReferralDto": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "9036443a-441a-4a66-87f2-bd5c44cdca7a",
"description": "Id representing the referral",
"format": "uuid"
},
"referee": {
"type": "string",
"example": "0x4c9EDD5852cd905f086C759E8383e09bff1E68B3",
"description": "Address of the referee (non-checksummed)",
"format": "hex"
},
"referrer": {
"type": "string",
"example": "0x41e038d9c9aF27369EcBCe72A69a96695A1fD0D3",
"description": "Address of the referrer (non-checksummed; undefined if not set)",
"format": "hex"
},
"code": {
"type": "string",
"example": "XYZ123456789",
"description": "The referee's referral code to be shared and claimed by others (undefined if not activated)"
},
"codeUsageRemaining": {
"type": "number",
"example": 5,
"description": "Number of remaining times the referral code can be claimed"
},
"refereeTotalPoints": {
"type": "string",
"example": "1234567.890000000",
"description": "Total points (excl. referral points) earned by the referee since referee claimed the code"
},
"createdAt": {
"type": "number",
"example": 1712019600000,
"description": "Timestamp of when this referral was activated (ms since Unix Epoch)"
}
},
"required": [
"id",
"referee",
"codeUsageRemaining",
"refereeTotalPoints",
"createdAt"
]
},
"PageOfReferralDtos": {
"type": "object",
"properties": {
"hasNext": {
"type": "boolean",
"example": true,
"description": "Whether there are more objects to paginate through"
},
"nextCursor": {
"type": "string",
"description": "Pointer to the next page in pagination dataset"
},
"data": {
"description": "Array of referral objects",
"type": "array",
"items": {
"$ref": "#/components/schemas/ReferralDto"
}
}
},
"required": [
"hasNext",
"data"
]
},
"ClaimReferralCodeDtoData": {
"type": "object",
"properties": {
"sender": {
"type": "string",
"example": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"description": "Address that signed this message",
"format": "hex"
},
"intent": {
"enum": [
0,
1,
2
],
"type": "number",
"example": 0,
"description": "Intent of the message (action to be taken)",
"x-enum-varnames": [
"REFERRAL_ACTIVATION",
"REFERRAL_CLAIM",
"REFERRAL_READ"
]
},
"signedAt": {
"type": "integer",
"example": 1712019600,
"description": "Message signedAt current timestamp (seconds since Unix Epoch)",
"format": "int64"
},
"code": {
"type": "string",
"minLength": 12,
"maxLength": 12,
"pattern": "/^[A-Z0-9]+$/",
"example": "XYZ123456789",
"description": "The referral code to claim"
}
},
"required": [
"sender",
"intent",
"signedAt",
"code"
]
},
"ClaimReferralCodeDto": {
"type": "object",
"properties": {
"signature": {
"type": "string",
"description": "The signature from signTypedData(...) signed by the sender",
"format": "hex"
},
"data": {
"$ref": "#/components/schemas/ClaimReferralCodeDtoData"
}
},
"required": [
"signature",
"data"
]
},
"ActivateReferralDtoData": {
"type": "object",
"properties": {
"sender": {
"type": "string",
"example": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"description": "Address that signed this message",
"format": "hex"
},
"intent": {
"enum": [
0,
1,
2
],
"type": "number",
"example": 0,
"description": "Intent of the message (action to be taken)",
"x-enum-varnames": [
"REFERRAL_ACTIVATION",
"REFERRAL_CLAIM",
"REFERRAL_READ"
]
},
"signedAt": {
"type": "integer",
"example": 1712019600,
"description": "Message signedAt current timestamp (seconds since Unix Epoch)"
},
"subaccount": {
"type": "string",
"example": "0x7072696d61727900000000000000000000000000000000000000000000000000",
"description": "Bytes32 encoded subaccount name (0x prefix, zero padded)",
"format": "hex"
}
},
"required": [
"sender",
"intent",
"signedAt",
"subaccount"
]
},
"ActivateReferralDto": {
"type": "object",
"properties": {
"signature": {
"type": "string",
"description": "The signature from signTypedData(...) signed by the sender",
"format": "hex"
},
"data": {
"$ref": "#/components/schemas/ActivateReferralDtoData"
}
},
"required": [
"signature",
"data"
]
},
"MaintenanceDto": {
"type": "object",
"properties": {
"isEnabled": {
"type": "boolean",
"example": true,
"description": "Whether the maintenance mode is enabled"
}
},
"required": [
"isEnabled"
]
},
"EngineType": {
"type": "integer",
"format": "int32",
"enum": [
0,
1
],
"x-enum-varnames": [
"PERP",
"SPOT"
],
"description": "Type of trading engine",
"example": 1
},
"BookDepthMessage": {
"type": "object",
"description": "Server-to-client BookDepth event message. First message is the full book (up to 100 levels per side). Subsequent messages are price-level diffs with absolute quantities. A zero quantity removes that level.",
"properties": {
"timestamp": {
"type": "integer",
"format": "int64",
"description": "System timestamp in milliseconds when this BookDepth was emitted."
},
"previousTimestamp": {
"type": "integer",
"format": "int64",
"description": "Timestamp in ms of the previous BookDepth event for this product."
},
"productId": {
"type": "string",
"format": "uuid",
"description": "Identifier of the product."
},
"asks": {
"type": "array",
"description": "Array of ask levels as [price, quantity] string tuples.",
"minItems": 0,
"maxItems": 100,
"items": {
"type": "array",
"description": "Single ask level as [price, quantity].",
"minItems": 2,
"maxItems": 2,
"items": {
"type": "string",
"description": "Price or quantity as decimal string."
}
}
},
"bids": {
"type": "array",
"description": "Array of bid levels as [price, quantity] string tuples.",
"minItems": 0,
"maxItems": 100,
"items": {
"type": "array",
"description": "Single bid level as [price, quantity].",
"minItems": 2,
"maxItems": 2,
"items": {
"type": "string",
"description": "Price or quantity as decimal string."
}
}
}
},
"required": [
"timestamp",
"previousTimestamp",
"productId",
"asks",
"bids"
]
},
"TradeStreamMessage": {
"type": "object",
"description": "Server-to-client TradeStreams event message containing recent trades for a product.",
"properties": {
"data": {
"type": "array",
"description": "Array of trade objects.",
"items": {
"type": "object",
"description": "Single trade object.",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Unique identifier of the trade."
},
"price": {
"type": "string",
"description": "Trade price as a decimal string."
},
"filled": {
"type": "string",
"description": "Filled quantity as a decimal string."
},
"takerSide": {
"$ref": "#/components/schemas/TakerSide"
},
"createdAt": {
"type": "number",
"description": "Timestamp of when the trade was created (ms since Unix Epoch)."
}
},
"required": [
"id",
"price",
"filled",
"takerSide",
"createdAt"
]
}
},
"productId": {
"type": "string",
"format": "uuid",
"description": "Identifier of the product."
}
},
"required": [
"data",
"productId"
]
},
"TakerSide": {
"type": "integer",
"format": "int32",
"enum": [
0,
1
],
"x-enum-varnames": [
"BUY",
"SELL"
],
"description": "Side of the trade",
"example": 0
},
"OrderSide": {
"type": "integer",
"format": "int32",
"enum": [
0,
1
],
"x-enum-varnames": [
"BUY",
"SELL"
],
"description": "Side of the order",
"example": 0
},
"SubaccountLiquidation": {
"type": "object",
"properties": {
"subaccountId": {
"type": "string",
"example": "9036443a-441a-4a66-87f2-bd5c44cdca7a",
"description": "Id representing the registered subaccount",
"format": "uuid"
},
"liquidatedAt": {
"type": "number",
"example": 1712019600000,
"description": "Timestamp of when the subaccount was liquidated (ms since Unix Epoch)"
}
},
"required": [
"subaccountId",
"liquidatedAt"
]
},
"PositionSide": {
"type": "integer",
"format": "int32",
"enum": [
0,
1
],
"x-enum-varnames": [
"BUY",
"SELL"
],
"description": "Side of the position",
"example": 0
},
"PositionLiquidationCause": {
"enum": [
"MarkChanged",
"Funding"
],
"type": "string",
"example": "MarkUpdate",
"description": "Cause of liquidation (either MarkChanged or Funding)"
},
"OrderType": {
"type": "enum",
"enum": [
"LIMIT",
"MARKET"
]
},
"OrderStatus": {
"type": "string",
"example": "FILLED",
"description": "Status of the order",
"enum": [
"NEW",
"PENDING",
"FILLED_PARTIAL",
"FILLED",
"REJECTED",
"CANCELED",
"EXPIRED"
]
}
}
}
}