{
  "openapi": "3.0.3",
  "info": {
    "title": "Aquanow CAMS REST API",
    "version": "1.0",
    "description": "Aquanow CAMS REST API documentation"
  },
  "servers": [
    {
      "description": "Staging",
      "url": "https://camsapi-staging.aquanow.io"
    }
  ],
  "components": {
    "securitySchemes": {
      "Bearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "Authorization token generated by the OAuth2 server"
      }
    },
    "responses": {
      "400": {
        "description": "Validation Error"
      },
      "401": {
        "description": "Unauthorized"
      },
      "403": {
        "description": "Insufficient Priveleges"
      },
      "4XX": {
        "description": "Client error"
      },
      "5XX": {
        "description": "Server error"
      }
    },
    "schemas": {
      "AddressType": {
        "type": "string",
        "enum": ["RESIDENTIAL", "BUSINESS", "GEOGRAPHIC"]
      },
      "AccountType": {
        "type": "string",
        "enum": ["CREDIT", "CASH"]
      },
      "Address": {
        "type": "object",
        "properties": {
          "streetNumber": {
            "type": "string",
            "example": "1234"
          },
          "streetName": {
            "type": "string",
            "example": "Main St"
          },
          "unit": {
            "type": "string",
            "example": "Apt 101"
          },
          "poBox": {
            "type": "string",
            "nullable": true,
            "example": null
          },
          "postalCode": {
            "type": "string",
            "example": "M5V 1A1"
          },
          "city": {
            "type": "string",
            "example": "Toronto"
          },
          "state": {
            "type": "string",
            "example": "ON"
          },
          "country": {
            "type": "string",
            "example": "Canada"
          },
          "addressType": {
            "$ref": "#/components/schemas/AddressType"
          }
        }
      },
      "SortDirection": {
        "type": "string",
        "enum": ["ASC", "DESC"]
      },
      "CustomerStatus": {
        "type": "string",
        "enum": ["ONBOARDING", "ACTIVE", "INACTIVE"]
      },
      "AccountStatus": {
        "type": "string",
        "enum": ["CREATING", "ACTIVE", "INACTIVE"]
      },
      "DocumentStatus": {
        "type": "string",
        "enum": ["PENDING_RECEIPT", "PROCESSING", "UNREADABLE", "EXPIRED", "VERIFIED"],
        "example": "PROCESSING"
      },
      "Deposit": {
        "type": "object",
        "properties": {
          "depositId": {
            "type": "string",
            "format": "uuid"
          },
          "transactionType": {
            "$ref": "#/components/schemas/TransactionType"
          },
          "transactionStatus": {
            "$ref": "#/components/schemas/TransactionStatus"
          },
          "customerId": {
            "type": "string",
            "format": "uuid"
          },
          "accountId": {
            "type": "string",
            "format": "uuid"
          },
          "quantity": {
            "type": "string",
            "format": "number",
            "example": "2.345123"
          },
          "currency": {
            "type": "string",
            "example": "ETH"
          },
          "confirmations": {
            "type": "string",
            "format": "integer",
            "example": "6"
          },
          "txHash": {
            "type": "string",
            "example": "0x7a4650d8f57438312e4c473f3a3e82d0505aa0b77c875b220bed1a31a8c2e6d4"
          },
          "network": {
            "type": "string",
            "example": "ERC20"
          },
          "sourceAddresses": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "address": {
                  "type": "string",
                  "example": "0x6BD140405426464d83ed0286217cc9B578Fe5555"
                }
              }
            }
          },
          "receivedAt": {
            "type": "string",
            "format": "date-time"
          },
          "completedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "OnboardingStatus": {
        "type": "string",
        "enum": ["PENDING_DOCUMENTATION_RECEIPT", "PROCESSING", "PASS", "FAIL"]
      },
      "OrderStatus": {
        "type": "string",
        "enum": ["AWAITING_RESPONSE", "COMPLETED", "CANCELED", "EXPIRED"]
      },
      "ExecutionStatus": {
        "type": "string",
        "enum": ["TRADE_EXECUTED", "TRADE_CONFIRMED", "TRADE_SETTLED"]
      },
      "CustomerPreTradeRiskGroup": {
        "type": "string",
        "enum": ["Low", "High"]
      },
      "CustomerCommissionCategory": {
        "type": "string",
        "enum": ["Silver", "Gold", "Platinum"]
      },
      "Transfer": {
        "type": "object",
        "properties": {
          "transferId": {
            "type": "string",
            "format": "uuid"
          },
          "sourceAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "destinationAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "quantity": {
            "type": "string",
            "format": "number",
            "example": "100.00"
          },
          "currency": {
            "type": "string",
            "example": "USD"
          },
          "transactionStatus": {
            "$ref": "#/components/schemas/TransactionStatus",
            "example": "PENDING_APPROVAL"
          },
          "transactionType": {
            "$ref": "#/components/schemas/TransactionType",
            "example": "TRANSFER"
          },
          "requestedBy": {
            "type": "string",
            "format": "uuid"
          },
          "requestedAt": {
            "type": "string",
            "format": "date-time"
          },
          "approvedBy": {
            "type": "string",
            "format": "uuid"
          },
          "approvedAt": {
            "type": "string",
            "format": "date-time"
          },
          "completedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "TransactionType": {
        "type": "string",
        "enum": ["DEPOSIT", "WITHDRAWAL", "TRANSFER"]
      },
      "TransactionStatus": {
        "type": "string",
        "enum": ["PENDING_APPROVAL", "PROCESSING", "COMPLETED", "CONFIRMING", "SUSPENDED", "PENDING_GATING_APPROVAL"]
      },
      "Withdrawal": {
        "type": "object",
        "properties": {
          "withdrawalId": {
            "type": "string",
            "format": "uuid"
          },
          "transactionType": {
            "$ref": "#/components/schemas/TransactionType",
            "example": "WITHDRAWAL"
          },
          "accountId": {
            "type": "string",
            "format": "uuid"
          },
          "currency": {
            "type": "string",
            "example": "USD"
          },
          "requestQuantity": {
            "type": "string",
            "format": "number",
            "example": "100.00"
          },
          "transactionStatus": {
            "$ref": "#/components/schemas/TransactionStatus",
            "example": "PENDING_APPROVAL"
          },
          "feeType": {
            "type": "string",
            "enum": ["VARIABLE", "FIXED", "LIVE"],
            "example": "VARIABLE"
          },
          "feeRate": {
            "type": "string",
            "format": "integer",
            "example": "10"
          },
          "feeQuantity": {
            "type": "string",
            "format": "number",
            "example": "0.10"
          },
          "networkFee": {
            "type": "string",
            "format": "number",
            "nullable": true,
            "example": null
          },
          "confirmations": {
            "type": "string",
            "format": "integer",
            "nullable": true,
            "example": null
          },
          "txHash": {
            "type": "string",
            "example": null,
            "nullable": true
          },
          "destination": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "whitelistedBankId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "bankName": {
                    "type": "string",
                    "example": "TD Bank"
                  },
                  "bankAddress": {
                    "type": "string",
                    "example": "1234 Main St, Toronto, ON, Canada"
                  },
                  "routingCode": {
                    "type": "string",
                    "example": "123456789"
                  },
                  "swiftCode": {
                    "type": "string",
                    "example": "TD123"
                  },
                  "accountNumber": {
                    "type": "string",
                    "example": "1234567890"
                  },
                  "IBAN": {
                    "type": "string",
                    "example": "CA1234567890"
                  }
                }
              },
              {
                "type": "object",
                "properties": {
                  "whitelistedCryptoWalletId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "address": {
                    "type": "string",
                    "example": "0x6BD140405426464d83ed0286217cc9B578Fe5555"
                  },
                  "network": {
                    "type": "string",
                    "example": "ERC20"
                  }
                }
              }
            ]
          },
          "netQuantity": {
            "type": "string",
            "format": "number",
            "example": "1.10"
          },
          "requestedBy": {
            "type": "string",
            "format": "uuid"
          },
          "requestedAt": {
            "type": "string",
            "format": "date-time"
          },
          "approvedBy": {
            "type": "string",
            "format": "uuid"
          },
          "approvedAt": {
            "type": "string",
            "format": "date-time"
          },
          "completedAt": {
            "type": "string",
            "format": "date-time"
          },
          "originator": {
            "type": "string",
            "enum": ["ADMIN", "CUSTOMER", "SETTLEMENT"]
          }
        }
      }
    },
    "parameters": {
      "after": {
        "name": "after",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "When provided, specifies the last item returned in previous page, used to fetch the next page. Fetches the first page when omitted."
      },
      "limit": {
        "name": "limit",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "format": "integer"
        },
        "description": "When provided, specifies the number of items to return in the page. Uses default page size of 10 when omitted."
      }
    }
  },
  "security": [
    {
      "Bearer": []
    }
  ],
  "paths": {
    "/v1/customers/{referenceId}": {
      "get": {
        "summary": "Get Customer",
        "description": "Retrieve a customer by reference ID.",
        "parameters": [
          {
            "name": "referenceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The reference ID of the customer"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "customerId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "referenceId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "customerName": {
                      "type": "string"
                    },
                    "customerStatus": {
                      "$ref": "#/components/schemas/CustomerStatus"
                    },
                    "customerType": {
                      "type": "string",
                      "enum": ["RETAIL", "ENTERPRISE", "WEALTH"]
                    },
                    "onboardingStatus": {
                      "$ref": "#/components/schemas/OnboardingStatus"
                    },
                    "createDate": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "kycStatus": {
                      "$ref": "#/components/schemas/OnboardingStatus"
                    },
                    "amlStatus": {
                      "$ref": "#/components/schemas/OnboardingStatus"
                    },
                    "customerPreTradeRiskGroup": {
                      "$ref": "#/components/schemas/CustomerPreTradeRiskGroup"
                    },
                    "accounts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "acountName": {
                            "type": "string"
                          },
                          "accountId": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "accountStatus": {
                            "$ref": "#/components/schemas/AccountStatus"
                          },
                          "accountType": {
                            "$ref": "#/components/schemas/AccountType"
                          }
                        }
                      }
                    },
                    "documents": {
                      "type": "object",
                      "properties": {
                        "passport": {
                          "type": "object",
                          "properties": {
                            "documentStatus": {
                              "$ref": "#/components/schemas/DocumentStatus"
                            },
                            "expirationDate": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "submissionDate": {
                              "type": "string",
                              "format": "date-time"
                            }
                          }
                        },
                        "nationalId": {
                          "type": "object",
                          "properties": {
                            "documentStatus": {
                              "$ref": "#/components/schemas/DocumentStatus"
                            },
                            "expirationDate": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "submissionDate": {
                              "type": "string",
                              "format": "date-time"
                            }
                          }
                        },
                        "proofOfAddress": {
                          "type": "object",
                          "properties": {
                            "documentStatus": {
                              "$ref": "#/components/schemas/DocumentStatus"
                            },
                            "submissionDate": {
                              "type": "string",
                              "format": "date-time"
                            }
                          }
                        },
                        "proofOfEmployment": {
                          "type": "object",
                          "properties": {
                            "documentStatus": {
                              "$ref": "#/components/schemas/DocumentStatus"
                            },
                            "submissionDate": {
                              "type": "string",
                              "format": "date-time"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/customers/{customerId}": {
      "get": {
        "summary": "Get Customer",
        "description": "Retrieve a customer by customer ID.",
        "parameters": [
          {
            "name": "customerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The customer ID of the customer"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "customerId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "referenceId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "customerName": {
                      "type": "string"
                    },
                    "customerStatus": {
                      "$ref": "#/components/schemas/CustomerStatus"
                    },
                    "customerType": {
                      "type": "string",
                      "enum": ["RETAIL", "ENTERPRISE", "WEALTH"]
                    },
                    "onboardingStatus": {
                      "$ref": "#/components/schemas/OnboardingStatus"
                    },
                    "createDate": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "kycStatus": {
                      "$ref": "#/components/schemas/OnboardingStatus"
                    },
                    "amlStatus": {
                      "$ref": "#/components/schemas/OnboardingStatus"
                    },
                    "customerPreTradeRiskGroup": {
                      "$ref": "#/components/schemas/CustomerPreTradeRiskGroup"
                    },
                    "accounts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "acountName": {
                            "type": "string"
                          },
                          "accountId": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "accountStatus": {
                            "$ref": "#/components/schemas/AccountStatus"
                          },
                          "accountType": {
                            "$ref": "#/components/schemas/AccountType"
                          }
                        }
                      }
                    },
                    "documents": {
                      "type": "object",
                      "properties": {
                        "passport": {
                          "type": "object",
                          "properties": {
                            "documentStatus": {
                              "$ref": "#/components/schemas/DocumentStatus"
                            },
                            "expirationDate": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "submissionDate": {
                              "type": "string",
                              "format": "date-time"
                            }
                          }
                        },
                        "nationalId": {
                          "type": "object",
                          "properties": {
                            "documentStatus": {
                              "$ref": "#/components/schemas/DocumentStatus"
                            },
                            "expirationDate": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "submissionDate": {
                              "type": "string",
                              "format": "date-time"
                            }
                          }
                        },
                        "proofOfAddress": {
                          "type": "object",
                          "properties": {
                            "documentStatus": {
                              "$ref": "#/components/schemas/DocumentStatus"
                            },
                            "submissionDate": {
                              "type": "string",
                              "format": "date-time"
                            }
                          }
                        },
                        "proofOfEmployment": {
                          "type": "object",
                          "properties": {
                            "documentStatus": {
                              "$ref": "#/components/schemas/DocumentStatus"
                            },
                            "submissionDate": {
                              "type": "string",
                              "format": "date-time"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update Customer",
        "description": "Submit a request to update the “Customer Category” to define customer/service level categorization and/or “Customer Pre-Trade Risk Group“ based on the outcomes of appropriateness/suitability tests during onboarding and periodic reviews, to set limits on order sizes and monthly trade volumes for risk mitigation; may require broker approval.",
        "parameters": [
          {
            "name": "customerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The customer ID of the customer"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "customerId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "customerPreTradeRiskGroup": {
                      "$ref": "#/components/schemas/CustomerPreTradeRiskGroup"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        }
      }
    },
    "/v1/customers/{customerId}/docs": {
      "post": {
        "summary": "Submit documentation to onboard a Customer",
        "description": "Submit documentation to onboard a Customer",
        "parameters": [
          {
            "name": "customerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The customer ID of the customer"
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "documentType": {
                    "type": "string",
                    "enum": ["Passport", "National ID", "Proof of Address", "Proof of Employment"]
                  },
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "The document file to be uploaded, maximum size of 2MB"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "customerId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "submissionDate": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "documentType": {
                      "type": "string",
                      "enum": ["Passport", "National ID", "Proof of Address", "Proof of Employment"]
                    },
                    "documentStatus": {
                      "$ref": "#/components/schemas/DocumentStatus"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "413": {
            "description": "Payload too large"
          },
          "422": {
            "description": "Unprocessable Entity"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        }
      },
      "patch": {
        "summary": "Resubmit documentation to onboard a Customer",
        "description": "Resubmit documentation to onboard a Customer",
        "parameters": [
          {
            "name": "customerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The customer ID of the customer"
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "documentType": {
                    "type": "string",
                    "enum": ["Passport", "National ID", "Proof of Address", "Proof of Employment"]
                  },
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "The document file to be uploaded, maximum size of 2MB"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "customerId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "submissionDate": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "documentType": {
                      "type": "string",
                      "enum": ["Passport", "National ID", "Proof of Address", "Proof of Employment"]
                    },
                    "documentStatus": {
                      "$ref": "#/components/schemas/DocumentStatus"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "413": {
            "description": "Payload too large"
          },
          "422": {
            "description": "Unprocessable Entity"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        }
      }
    },
    "/v1/customers/{customerId}/configuration": {
      "get": {
        "summary": "Get Customer Configuration",
        "description": "Retrieve configuration details for a customer by customer ID.",
        "parameters": [
          {
            "name": "customerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The customer ID of the customer"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "customerId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "referenceId": {
                      "type": "string"
                    },
                    "customerPreTradeRiskGroup": {
                      "$ref": "#/components/schemas/CustomerPreTradeRiskGroup"
                    },
                    "tradeCommissionSchedule": {
                      "type": "object",
                      "properties": {
                        "tiers": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "tierThreshold": {
                                "type": "string",
                                "format": "integer",
                                "example": "0",
                                "description": "The threshold for the tier."
                              },
                              "tierFeeRate": {
                                "type": "string",
                                "format": "integer",
                                "example": "35",
                                "description": "The fee rate in basis points."
                              },
                              "pair": {
                                "type": "string",
                                "example": "DEFAULT",
                                "description": "The pair this tier applies to."
                              }
                            }
                          }
                        }
                      }
                    },
                    "previousMonthTradeVolume": {
                      "type": "object",
                      "properties": {
                        "tradeVolume": {
                          "type": "string",
                          "format": "number",
                          "example": "129098.14"
                        },
                        "tradeVolumeCurrency": {
                          "type": "string",
                          "example": "USD"
                        }
                      }
                    },
                    "withdrawalFees": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "asset": {
                            "type": "string",
                            "example": "BTC"
                          },
                          "networkType": {
                            "type": "string",
                            "example": "Native"
                          },
                          "feeType": {
                            "type": "string",
                            "enum": ["VARIABLE", "FIXED", "LIVE"]
                          },
                          "feeRate": {
                            "type": "string",
                            "format": "number",
                            "example": "10"
                          }
                        }
                      }
                    },
                    "enabledTradePairs": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "example": ["BTC-USD", "ETH-USD"]
                    },
                    "enabledStrategies": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": ["RFQ"]
                      }
                    },
                    "withdrawalBank": {
                      "type": "object",
                      "properties": {
                        "bankName": {
                          "type": "string"
                        },
                        "bankAccount": {
                          "type": "string"
                        }
                      }
                    },
                    "withdrawalAddresses": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "asset": {
                            "type": "string",
                            "example": "ETH"
                          },
                          "network": {
                            "type": "string",
                            "example": "ERC20"
                          },
                          "address": {
                            "type": "string",
                            "example": "0x6BD140405426464d83ed0286217cc9B578Fe5555"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        }
      }
    },
    "/v1/customers": {
      "get": {
        "summary": "Get Customers",
        "description": "Retrieve a list of customers with optional filtering and pagination.",
        "parameters": [
          {
            "name": "customerStatus",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/CustomerStatus"
            },
            "description": "Filter customers by status"
          },
          {
            "name": "createDateStart",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Filter customers by creation date lower bound, exclusive"
          },
          {
            "name": "createDateEnd",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Filter customers by creation date upper bound, inclusive"
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "When provided, specifies the last item returned in previous page, used to fetch the next page. Fetches the first page when omitted."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "integer"
            },
            "description": "When provided, specifies the number of items to return in the page. Uses default page size of 10 when omitted."
          },
          {
            "name": "sortField",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Will sort the returned data using the specified field."
          },
          {
            "name": "sortDirection",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/SortDirection"
            },
            "description": "Specifies the sort direction for the sortField."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "after": {
                      "type": "string",
                      "description": "The token of the last item in the response"
                    },
                    "totalCount": {
                      "type": "string",
                      "format": "integer",
                      "description": "The total number of items in the entire filtered data set",
                      "example": "1"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "customerId": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "referenceId": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "customerName": {
                            "type": "string"
                          },
                          "customerStatus": {
                            "$ref": "#/components/schemas/CustomerStatus"
                          },
                          "customerType": {
                            "type": "string",
                            "enum": ["RETAIL", "ENTERPRISE", "WEALTH"]
                          },
                          "onboardingStatus": {
                            "$ref": "#/components/schemas/OnboardingStatus"
                          },
                          "createDate": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "kycStatus": {
                            "$ref": "#/components/schemas/OnboardingStatus"
                          },
                          "amlStatus": {
                            "$ref": "#/components/schemas/OnboardingStatus"
                          },
                          "customerPreTradeRiskGroup": {
                            "$ref": "#/components/schemas/CustomerPreTradeRiskGroup"
                          },
                          "accounts": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "acountNumber": {
                                  "type": "string",
                                  "example": "1002301C"
                                },
                                "accountId": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "accountStatus": {
                                  "$ref": "#/components/schemas/AccountStatus"
                                },
                                "accountType": {
                                  "$ref": "#/components/schemas/AccountType"
                                }
                              }
                            }
                          },
                          "documents": {
                            "type": "object",
                            "properties": {
                              "passport": {
                                "type": "object",
                                "properties": {
                                  "documentStatus": {
                                    "$ref": "#/components/schemas/DocumentStatus"
                                  },
                                  "expirationDate": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "submissionDate": {
                                    "type": "string",
                                    "format": "date-time"
                                  }
                                }
                              },
                              "nationalId": {
                                "type": "object",
                                "properties": {
                                  "documentStatus": {
                                    "$ref": "#/components/schemas/DocumentStatus"
                                  },
                                  "expirationDate": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "submissionDate": {
                                    "type": "string",
                                    "format": "date-time"
                                  }
                                }
                              },
                              "proofOfAddress": {
                                "type": "object",
                                "properties": {
                                  "documentStatus": {
                                    "$ref": "#/components/schemas/DocumentStatus"
                                  },
                                  "submissionDate": {
                                    "type": "string",
                                    "format": "date-time"
                                  }
                                }
                              },
                              "proofOfEmployment": {
                                "type": "object",
                                "properties": {
                                  "documentStatus": {
                                    "$ref": "#/components/schemas/DocumentStatus"
                                  },
                                  "submissionDate": {
                                    "type": "string",
                                    "format": "date-time"
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Not Found"
          }
        }
      },
      "post": {
        "summary": "Add a new customer",
        "description": "Will add a customer and create a permanent reference to that customer",

        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "referenceId": {
                    "type": "string",
                    "description": "Use this field to correlate a customer in CAMS to the customer in another system"
                  },
                  "fullName": {
                    "type": "string",
                    "example": "John Doe"
                  },
                  "nationality": {
                    "type": "string",
                    "example": "Canadian"
                  },
                  "address": {
                    "$ref": "#/components/schemas/Address"
                  },
                  "placeOfBirth": {
                    "type": "string",
                    "example": "Toronto, Canada"
                  },
                  "employerName": {
                    "type": "string",
                    "example": "Aquanow"
                  },
                  "employerAddress": {
                    "type": "string",
                    "example": "1234 Main St, Toronto, ON, Canada"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "New Customer",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "customerId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "referenceId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "customerName": {
                      "type": "string",
                      "example": "John Doe"
                    },
                    "customerStatus": {
                      "$ref": "#/components/schemas/CustomerStatus"
                    },
                    "customerType": {
                      "type": "string",
                      "enum": ["RETAIL", "ENTERPRISE", "WEALTH"]
                    },
                    "onboardingStatus": {
                      "$ref": "#/components/schemas/OnboardingStatus"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "kycStatus": {
                      "$ref": "#/components/schemas/OnboardingStatus"
                    },
                    "amlStatus": {
                      "$ref": "#/components/schemas/OnboardingStatus"
                    },
                    "customerPreTradeRiskGroup": {
                      "$ref": "#/components/schemas/CustomerPreTradeRiskGroup"
                    },
                    "documents": {
                      "type": "object",
                      "properties": {
                        "passport": {
                          "type": "object",
                          "properties": {
                            "documentStatus": {
                              "$ref": "#/components/schemas/DocumentStatus"
                            },
                            "expirationDate": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "submissionDate": {
                              "type": "string",
                              "format": "date-time"
                            }
                          }
                        },
                        "nationalId": {
                          "type": "object",
                          "properties": {
                            "documentStatus": {
                              "$ref": "#/components/schemas/DocumentStatus"
                            },
                            "expirationDate": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "submissionDate": {
                              "type": "string",
                              "format": "date-time"
                            }
                          }
                        },
                        "proofOfAddress": {
                          "type": "object",
                          "properties": {
                            "documentStatus": {
                              "$ref": "#/components/schemas/DocumentStatus"
                            },
                            "submissionDate": {
                              "type": "string",
                              "format": "date-time"
                            }
                          }
                        },
                        "proofOfEmployment": {
                          "type": "object",
                          "properties": {
                            "documentStatus": {
                              "$ref": "#/components/schemas/DocumentStatus"
                            },
                            "submissionDate": {
                              "type": "string",
                              "format": "date-time"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        }
      }
    },
    "/v1/accounts/{accountId}/buying-power": {
      "patch": {
        "summary": "Adjusts the buying power of an account",
        "description": "Applies an incremental increase or decrease in buying power to a given account.",
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The account ID"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "direction": {
                    "type": "string",
                    "enum": ["INCREASE", "DECREASE"],
                    "example": "INCREASE"
                  },
                  "amount": {
                    "type": "string",
                    "format": "number",
                    "example": "10000"
                  },
                  "currency": {
                    "type": "string",
                    "example": "USD"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "accountId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "newBuyingPower": {
                      "type": "string",
                      "format": "number",
                      "example": "10000"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        }
      }
    },
    "/v1/accounts/{accountId}/balances": {
      "get": {
        "summary": "Get Account Balances",
        "description": "Retrieve account balances by accountId.",
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The account ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "accountId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "mtm": {
                      "type": "string",
                      "format": "number",
                      "example": "-39592.01"
                    },
                    "mtmcurrency": {
                      "type": "string",
                      "example": "USD"
                    },
                    "lastUpdatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "credit": {
                      "type": "object",
                      "properties": {
                        "creditCurrency": {
                          "type": "string",
                          "example": "USD"
                        },
                        "creditLimit": {
                          "type": "string",
                          "format": "integer",
                          "example": "40000"
                        },
                        "utilizedCredit": {
                          "type": "string",
                          "format": "number",
                          "example": "39592.01"
                        },
                        "unutilizedCredit": {
                          "type": "string",
                          "format": "number",
                          "example": "407.99"
                        }
                      }
                    },
                    "assets": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "asset": {
                            "type": "string",
                            "example": "BTC"
                          },
                          "availableBalance": {
                            "type": "string",
                            "format": "number",
                            "example": "-1.003567"
                          },
                          "pendingBalance": {
                            "type": "string",
                            "format": "number",
                            "example": "0.000000"
                          },
                          "totalBalance": {
                            "type": "string",
                            "format": "number",
                            "example": "-1.003567"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        }
      }
    },
    "/v1/accounts/{accountId}/configuration": {
      "get": {
        "summary": "Get Account Configuration",
        "description": "Retrieve account configuration details.",
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The account ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "accountId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "accountStatus": {
                      "$ref": "#/components/schemas/AccountStatus"
                    },
                    "creditLimit": {
                      "type": "string",
                      "format": "integer",
                      "example": "40000"
                    },
                    "accountType": {
                      "$ref": "#/components/schemas/AccountType"
                    },
                    "tradeStrategyEnablement": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": ["RFQ"]
                      }
                    },
                    "pairEnablement": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": ["BTC-USD", "ETH-USD"]
                      }
                    },
                    "depositBankAddress": {
                      "type": "object",
                      "properties": {
                        "bankName": {
                          "type": "string"
                        },
                        "bankAddress": {
                          "type": "string"
                        },
                        "routingCode": {
                          "type": "string"
                        },
                        "swiftCode": {
                          "type": "string"
                        },
                        "accountNumber": {
                          "type": "string"
                        },
                        "IBAN": {
                          "type": "string"
                        },
                        "currency": {
                          "type": "string"
                        },
                        "beneficiaryName": {
                          "type": "string"
                        },
                        "referenceCode": {
                          "type": "string"
                        }
                      }
                    },
                    "depositWallets": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "asset": {
                            "type": "string",
                            "example": "ETH"
                          },
                          "network": {
                            "type": "string",
                            "example": "ERC20"
                          },
                          "address": {
                            "type": "string",
                            "example": "0x6BD140405426464d83ed0286217cc9B578Fe5555"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        }
      }
    },
    "/v1/accounts/{accountId}/performance": {
      "get": {
        "summary": "Get Account Performance",
        "description": "Retrieve account performance details.",
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The account ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "accountId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "reportingCurrency": {
                      "type": "string",
                      "example": "USD"
                    },
                    "mtm": {
                      "type": "string",
                      "format": "number",
                      "example": "13554107.22"
                    },
                    "lastUpdatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "assets": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "asset": {
                            "type": "string",
                            "example": "BTC"
                          },
                          "quantity": {
                            "type": "string",
                            "format": "number",
                            "example": "211"
                          },
                          "averagePrice": {
                            "type": "string",
                            "format": "number",
                            "example": "44589.17"
                          },
                          "currentPrice": {
                            "type": "string",
                            "format": "number",
                            "example": "64237.47"
                          },
                          "marketValue": {
                            "type": "string",
                            "format": "number",
                            "example": "13554107.22"
                          },
                          "valueChange": {
                            "type": "string",
                            "format": "number",
                            "example": "4145791.73"
                          },
                          "pctValueChange": {
                            "type": "string",
                            "format": "number",
                            "example": "0.440625"
                          },
                          "pctOfAccountPortfolio": {
                            "type": "string",
                            "format": "number",
                            "example": "0.950889"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        }
      }
    },
    "/v1/instruments/pairs": {
      "get": {
        "summary": "Get Available Trade Pairs",
        "description": "Retrieve a list of supported trade pairs with precision details.",

        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "pair": {
                        "type": "string",
                        "example": "BTC-USD"
                      },
                      "status": {
                        "type": "string",
                        "enum": ["ACTIVE", "INACTIVE"]
                      },
                      "baseSymbol": {
                        "type": "string",
                        "example": "BTC"
                      },
                      "quoteSymbol": {
                        "type": "string",
                        "example": "USD"
                      },
                      "minBaseOrderSize": {
                        "type": "string",
                        "format": "number",
                        "example": "0.000016"
                      },
                      "minQuoteOrderSize": {
                        "type": "string",
                        "format": "number",
                        "example": "1.00"
                      },
                      "baseQtyPrecision": {
                        "type": "string",
                        "format": "integer",
                        "example": "6"
                      },
                      "quoteQtyPrecision": {
                        "type": "string",
                        "format": "integer",
                        "example": "2"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        }
      }
    },
    "/v1/instruments/assets": {
      "get": {
        "summary": "Get Available Instruments",
        "description": "Retrieve a list of available assets with minimum withdrawal sizes.",

        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "asset": {
                        "type": "string",
                        "example": "BTC"
                      },
                      "minWithdrawSize": {
                        "type": "string",
                        "format": "number",
                        "example": "0.0001"
                      },
                      "networks": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "example": "Native"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/quotes": {
      "post": {
        "summary": "Request Quote (RFQ)",
        "description": "Request a quote for a currency conversion.",

        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "accountId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "pair": {
                    "type": "string",
                    "example": "BTC-USD"
                  },
                  "side": {
                    "type": "string",
                    "enum": ["BUY", "SELL"],
                    "example": "BUY"
                  },
                  "deliverQuantity": {
                    "type": "string",
                    "nullable": true,
                    "description": "One of 'deliverQuantity' or 'receiveQuantity' must be a positive value. The other must be null.",
                    "example": "103.06"
                  },
                  "receiveQuantity": {
                    "type": "string",
                    "nullable": true,
                    "description": "One of 'deliverQuantity' or 'receiveQuantity' must be a positive value. The other must be null.",
                    "example": null
                  },
                  "clientFeeRate": {
                    "type": "string",
                    "format": "integer",
                    "example": "30",
                    "description": "The client fee rate in bps."
                  },
                  "clientReference": {
                    "type": "string",
                    "description": "An optional free use reference field, typically used to correlate to the client's internal order."
                  }
                },
                "required": ["accounId", "pair", "side", "receiveQuantity", "deliverQuantity", "clientFeeQuantity"]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "quoteId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "requestedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "expiresAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "accountId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "pair": {
                      "type": "string",
                      "example": "BTC-USD"
                    },
                    "side": {
                      "type": "string",
                      "enum": ["BUY", "SELL"],
                      "example": "BUY"
                    },
                    "deliverQuantity": {
                      "type": "string",
                      "format": "number",
                      "example": "103.06"
                    },
                    "deliverCurrency": {
                      "type": "string",
                      "example": "USD"
                    },
                    "receiveQuantity": {
                      "type": "string",
                      "format": "number",
                      "example": "0.0016"
                    },
                    "receiveCurrency": {
                      "type": "string",
                      "example": "BTC"
                    },
                    "price": {
                      "type": "string",
                      "format": "number",
                      "example": "64237.47"
                    },
                    "feeCurrency": {
                      "type": "string",
                      "example": "USD"
                    },
                    "clientFeeRate": {
                      "type": "string",
                      "format": "integer",
                      "example": "30",
                      "description": "The client fee rate in bps."
                    },
                    "clientFeeQuantity": {
                      "type": "string",
                      "format": "float",
                      "example": "0.10"
                    },
                    "providerFeeRate": {
                      "type": "string",
                      "format": "integer",
                      "example": "30",
                      "description": "The provider fee rate in bps."
                    },
                    "providerFeeQuantity": {
                      "type": "string",
                      "format": "number",
                      "example": "0.08"
                    },
                    "orderStatus": {
                      "type": "string",
                      "example": "AWAITING_RESPONSE"
                    },
                    "clientReference": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        }
      }
    },
    "/v1/quotes/{quoteId}": {
      "delete": {
        "summary": "Cancel Quote (RFQ)",
        "description": "Cancel a previously requested quote.",
        "parameters": [
          {
            "name": "quoteId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The quoteId returned by the Request Quote"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "orderId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "orderStatus": {
                      "type": "string",
                      "example": "CANCELED"
                    },
                    "canceledAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        }
      }
    },

    "/v1/orders": {
      "post": {
        "summary": "Execute a Quote (RFQ)",
        "description": "Execute a previously requested quote.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "quoteId": {
                    "type": "string",
                    "format": "uuid",
                    "description": "The quoteId returned by Request Quote"
                  },
                  "clientReference": {
                    "type": "string"
                  }
                },
                "required": ["quoteId"]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "orderId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "executionId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "accountId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "valueDate": {
                      "type": "string",
                      "format": "date"
                    },
                    "orderStatus": {
                      "type": "string",
                      "example": "COMPLETED"
                    },
                    "executionStatus": {
                      "type": "string",
                      "example": "TRADE_EXECUTED"
                    },
                    "clientFeeQuantity": {
                      "type": "string",
                      "format": "float",
                      "example": "0.10"
                    },
                    "providerFeeQuantity": {
                      "type": "string",
                      "format": "number",
                      "example": "0.08"
                    },
                    "tradeDate": {
                      "type": "string",
                      "example": "2024-10-01"
                    },
                    "executedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        }
      },
      "get": {
        "summary": "GET Orders",
        "description": "Retrieve a list of orders with optional filtering and pagination.",
        "parameters": [
          {
            "name": "orderId",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filter executions by order ID"
          },
          {
            "name": "executionId",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filter executions by execution ID"
          },
          {
            "name": "clientReference",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filter executions by client provided reference parameter"
          },
          {
            "name": "orderStatus",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/OrderStatus"
            },
            "description": "Filter orders by order status"
          },
          {
            "name": "createdAtStart",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Filter orders by creation date lower bound, exclusive"
          },
          {
            "name": "createdAtEnd",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Filter orders by creation date upperbound, inclusive"
          },
          {
            "name": "accountId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Filter executions by account ID"
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "When provided, specifies the last item returned in previous page, used to fetch the next page. Fetches the first page when omitted."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "integer"
            },
            "description": "When provided, specifies the number of items to return in the page. Uses default page size of 10 when omitted."
          },
          {
            "name": "sortField",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Will sort the returned data using the specified field."
          },
          {
            "name": "sortDirection",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/SortDirection"
            },
            "description": "Specifies the sort direction for the sortField."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "after": {
                      "type": "string",
                      "description": "The token of the last item in the response"
                    },
                    "totalCount": {
                      "type": "string",
                      "format": "integer",
                      "description": "The total number of items in the entire filtered data set",
                      "example": "1"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "orderId": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "orderedAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "accountId": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "pair": {
                            "type": "string",
                            "example": "BTC-USD"
                          },
                          "side": {
                            "type": "string",
                            "enum": ["BUY", "SELL"],
                            "example": "BUY"
                          },
                          "deliverQuantity": {
                            "type": "string",
                            "format": "number",
                            "example": "103.06"
                          },
                          "deliverCurrency": {
                            "type": "string",
                            "example": "USD"
                          },
                          "receiveQuantity": {
                            "type": "string",
                            "format": "number",
                            "example": "0.0016"
                          },
                          "receiveCurrency": {
                            "type": "string",
                            "example": "BTC"
                          },
                          "price": {
                            "type": "string",
                            "format": "number",
                            "example": "64415.00"
                          },
                          "fee": {
                            "type": "string",
                            "format": "number",
                            "example": "0.10"
                          },
                          "feeCurrency": {
                            "type": "string",
                            "example": "USD"
                          },
                          "clientReference": {
                            "type": "string"
                          },
                          "orderStatus": {
                            "$ref": "#/components/schemas/OrderStatus"
                          },
                          "strategy": {
                            "type": "string",
                            "enum": ["RFQ"]
                          },
                          "tradeDate": {
                            "type": "string",
                            "format": "date"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        }
      }
    },
    "/v1/orders/{orderId}": {
      "get": {
        "summary": "GET Order",
        "description": "Retrieve an order by its order ID.",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The settlementId of the settlement"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "orderId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "orderedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "accountId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "pair": {
                      "type": "string",
                      "example": "BTC-USD"
                    },
                    "side": {
                      "type": "string",
                      "enum": ["BUY", "SELL"],
                      "example": "BUY"
                    },
                    "deliverQuantity": {
                      "type": "string",
                      "format": "number",
                      "example": "103.06"
                    },
                    "deliverCurrency": {
                      "type": "string",
                      "example": "USD"
                    },
                    "receiveQuantity": {
                      "type": "string",
                      "format": "number",
                      "example": "0.0016"
                    },
                    "receiveCurrency": {
                      "type": "string",
                      "example": "BTC"
                    },
                    "price": {
                      "type": "string",
                      "format": "number",
                      "example": "64415.00"
                    },
                    "fee": {
                      "type": "string",
                      "format": "number",
                      "example": "0.10"
                    },
                    "feeCurrency": {
                      "type": "string",
                      "example": "USD"
                    },
                    "clientReference": {
                      "type": "string"
                    },
                    "orderStatus": {
                      "$ref": "#/components/schemas/OrderStatus"
                    },
                    "strategy": {
                      "type": "string",
                      "enum": ["RFQ"]
                    },
                    "tradeDate": {
                      "type": "string",
                      "format": "date"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        }
      }
    },
    "/v1/executions/{executionId}": {
      "get": {
        "summary": "GET Execution",
        "description": "Retrieve specific fill by execution ID.",
        "parameters": [
          {
            "name": "executionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The execution ID returned by the executeQuote endpoint"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "executionId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "orderId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "executionStatus": {
                      "$ref": "#/components/schemas/ExecutionStatus"
                    },
                    "executedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "accountId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "pair": {
                      "type": "string",
                      "example": "BTC-USD"
                    },
                    "side": {
                      "type": "string",
                      "enum": ["BUY", "SELL"],
                      "example": "BUY"
                    },
                    "deliverQuantity": {
                      "type": "string",
                      "format": "number",
                      "example": "103.06"
                    },
                    "deliverCurrency": {
                      "type": "string",
                      "example": "USD"
                    },
                    "receiveQuantity": {
                      "type": "string",
                      "format": "number",
                      "example": "0.0016"
                    },
                    "receiveCurrency": {
                      "type": "string",
                      "example": "BTC"
                    },
                    "price": {
                      "type": "string",
                      "format": "number",
                      "example": "64415.00"
                    },
                    "fee": {
                      "type": "string",
                      "format": "number",
                      "example": "0.10"
                    },
                    "feeCurrency": {
                      "type": "string",
                      "example": "USD"
                    },
                    "clientReference": {
                      "type": "string"
                    },
                    "strategy": {
                      "type": "string",
                      "enum": ["RFQ"]
                    },
                    "tradeDate": {
                      "type": "string",
                      "format": "date"
                    },
                    "valueDate": {
                      "type": "string",
                      "format": "date"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        }
      }
    },
    "/v1/executions": {
      "get": {
        "summary": "GET Executions",
        "description": "Retrieve fills with optional filtering and pagination.",
        "parameters": [
          {
            "name": "executionStatus",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/ExecutionStatus"
            },
            "description": "Filter executions by execution status"
          },
          {
            "name": "orderId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Filter executions by order ID."
          },
          {
            "name": "clientReference",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filter executions by client provided reference parameter"
          },
          {
            "name": "accountId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Filter executions by account ID"
          },
          {
            "name": "tradeDateStart",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Filter executions by trade date lower bound, exclusive"
          },
          {
            "name": "tradeDateEnd",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Filter executions by trade date upper bound, inclusive"
          },
          {
            "name": "valueDateStart",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Filter executions by value date lower bound, exclusive"
          },
          {
            "name": "valueDateEnd",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Filter executions by value date upper bound, inclusive"
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "When provided, specifies the last item returned in previous page, used to fetch the next page. Fetches the first page when omitted."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "integer"
            },
            "description": "When provided, specifies the number of items to return in the page. Uses default page size of 10 when omitted."
          },
          {
            "name": "sortField",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Will sort the returned data using the specified field."
          },
          {
            "name": "sortDirection",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/SortDirection"
            },
            "description": "Specifies the sort direction for the sortField."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "after": {
                      "type": "string",
                      "description": "The token of the last item in the response"
                    },
                    "totalCount": {
                      "type": "string",
                      "format": "integer",
                      "description": "The total number of items in the entire filtered data set",
                      "example": "1"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "executionId": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "orderId": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "executionStatus": {
                            "$ref": "#/components/schemas/ExecutionStatus"
                          },
                          "executedAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "accountId": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "pair": {
                            "type": "string",
                            "example": "BTC-USD"
                          },
                          "side": {
                            "type": "string",
                            "enum": ["BUY", "SELL"],
                            "example": "BUY"
                          },
                          "deliverQuantity": {
                            "type": "string",
                            "format": "number",
                            "example": "103.06"
                          },
                          "deliverCurrency": {
                            "type": "string",
                            "example": "USD"
                          },
                          "receiveQuantity": {
                            "type": "string",
                            "format": "number",
                            "example": "0.0016"
                          },
                          "receiveCurrency": {
                            "type": "string",
                            "example": "BTC"
                          },
                          "price": {
                            "type": "string",
                            "format": "number",
                            "example": "64415.00"
                          },
                          "fee": {
                            "type": "string",
                            "format": "number",
                            "example": "0.10"
                          },
                          "feeCurrency": {
                            "type": "string",
                            "example": "USD"
                          },
                          "clientReference": {
                            "type": "string"
                          },
                          "strategy": {
                            "type": "string",
                            "enum": ["RFQ"]
                          },
                          "tradeDate": {
                            "type": "string",
                            "format": "date"
                          },
                          "valueDate": {
                            "type": "string",
                            "format": "date"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        }
      }
    },
    "/v1/settlements/{settlementId}": {
      "get": {
        "summary": "GET Settlements",
        "description": "Retrieve a settlement by its settlementId.",
        "parameters": [
          {
            "name": "settlementId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The settlementId of the settlement"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "settlementId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "settlementStatus": {
                      "type": "string",
                      "enum": ["PENDING"]
                    },
                    "tradeCount": {
                      "type": "string",
                      "format": "integer",
                      "example": "3"
                    },
                    "quantityBuys": {
                      "type": "string",
                      "format": "integer",
                      "example": "2"
                    },
                    "quantitySells": {
                      "type": "string",
                      "format": "integer",
                      "example": "1"
                    },
                    "clientSends": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "asset": {
                            "type": "string",
                            "example": "USD"
                          },
                          "quantity": {
                            "type": "string",
                            "format": "number",
                            "example": "150000"
                          }
                        }
                      }
                    },
                    "clientReceives": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "asset": {
                            "type": "string",
                            "example": "BTC"
                          },
                          "quantity": {
                            "type": "string",
                            "format": "number",
                            "example": "2"
                          }
                        }
                      }
                    },
                    "valueDate": {
                      "type": "string",
                      "format": "date"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        }
      }
    },
    "/v1/settlements": {
      "get": {
        "summary": "GET Settlements",
        "description": "Retrieve a list of settlements with optional filtering and pagination.",
        "parameters": [
          {
            "name": "settlementStatus",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": ["PENDING"]
            },
            "description": "Filter settlements by status"
          },
          {
            "name": "valueDateStart",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Filter settlements by settlement value date lower bound, exclusive"
          },
          {
            "name": "valueDateEnd",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Filter settlements by settlement value date upper bound, inclusive"
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "When provided, specifies the last item returned in previous page, used to fetch the next page. Fetches the first page when omitted."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "integer"
            },
            "description": "When provided, specifies the number of items to return in the page. Uses default page size of 10 when omitted."
          },
          {
            "name": "sortField",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Will sort the returned data using the specified field."
          },
          {
            "name": "sortDirection",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/SortDirection"
            },
            "description": "Specifies the sort direction for the sortField."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "after": {
                      "type": "string",
                      "description": "The token of the last item in the response"
                    },
                    "totalCount": {
                      "type": "string",
                      "format": "integer",
                      "description": "The total number of items in the entire filtered data set",
                      "example": "1"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "settlementId": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "settlementStatus": {
                            "type": "string",
                            "enum": ["PENDING"]
                          },
                          "tradeCount": {
                            "type": "string",
                            "format": "integer",
                            "example": "3"
                          },
                          "quantityBuys": {
                            "type": "string",
                            "format": "integer",
                            "example": "2"
                          },
                          "quantitySells": {
                            "type": "string",
                            "format": "integer",
                            "example": "1"
                          },
                          "clientSends": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "asset": {
                                  "type": "string",
                                  "example": "USD"
                                },
                                "quantity": {
                                  "type": "string",
                                  "format": "number",
                                  "example": "150000"
                                }
                              }
                            }
                          },
                          "clientReceives": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "asset": {
                                  "type": "string",
                                  "example": "BTC"
                                },
                                "quantity": {
                                  "type": "string",
                                  "format": "number",
                                  "example": "2"
                                }
                              }
                            }
                          },
                          "valueDate": {
                            "type": "string",
                            "format": "date"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        }
      }
    },
    "/v1/transactions/{transactionId}": {
      "get": {
        "summary": "GET Transaction",
        "description": "Retrieve deposit, withdrawal or transfer by transaction ID.",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The transactionId of the transaction"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Deposit"
                    },
                    {
                      "$ref": "#/components/schemas/Withdrawal"
                    },
                    {
                      "$ref": "#/components/schemas/Transfer"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        }
      }
    },
    "/v1/transactions": {
      "get": {
        "summary": "GET Transactions",
        "description": "Retrieve deposits, withdrawals and transfers with optional filtering and pagination.",
        "parameters": [
          {
            "name": "transactionType",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/TransactionType"
            },
            "description": "Filter transactions by type (deposit, withdrawal, transfer)"
          },
          {
            "name": "transactionStatus",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/TransactionStatus"
            },
            "description": "Filter transactions by status"
          },
          {
            "name": "createdAtStart",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Filter transactions by creation date lower bound, exclusive"
          },
          {
            "name": "createdAtEnd",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Filter transactions by creation date upper bound, inclusive"
          },
          {
            "name": "accountId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Filter executions by account ID"
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "When provided, specifies the last item returned in previous page, used to fetch the next page. Fetches the first page when omitted."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "integer"
            },
            "description": "When provided, specifies the number of items to return in the page. Uses default page size of 10 when omitted."
          },
          {
            "name": "sortField",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Will sort the returned data using the specified field."
          },
          {
            "name": "sortDirection",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/SortDirection"
            },
            "description": "Specifies the sort direction for the sortField."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "after": {
                      "type": "string",
                      "description": "The token of the last item in the response"
                    },
                    "totalCount": {
                      "type": "string",
                      "format": "integer",
                      "description": "The total number of items in the entire filtered data set",
                      "example": "3"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/Deposit"
                          },
                          {
                            "$ref": "#/components/schemas/Withdrawal"
                          },
                          {
                            "$ref": "#/components/schemas/Transfer"
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        }
      }
    },
    "/v1/custody/balances": {
      "get": {
        "summary": "GET Custody Balances",
        "description": "Retrieve custody balances.",

        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "reportingCurrency": {
                      "type": "string",
                      "example": "USD"
                    },
                    "lastUpdatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2021-10-01T00:00:00Z"
                    },
                    "warm": {
                      "type": "object",
                      "properties": {
                        "warmMtm": {
                          "type": "string",
                          "format": "number",
                          "example": "12962297.93"
                        },
                        "warmAllocationPct": {
                          "type": "string",
                          "format": "number",
                          "example": "0.50"
                        },
                        "assets": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "asset": {
                                "type": "string",
                                "example": "BTC"
                              },
                              "totalBalance": {
                                "type": "string",
                                "format": "number",
                                "example": "201.003567"
                              },
                              "mtm": {
                                "type": "string",
                                "format": "number",
                                "example": "12962297.93"
                              }
                            }
                          }
                        }
                      }
                    },
                    "cold": {
                      "type": "object",
                      "properties": {
                        "coldMtm": {
                          "type": "string",
                          "format": "number",
                          "example": "12962297.93"
                        },
                        "allocationPct": {
                          "type": "string",
                          "format": "number",
                          "example": "0.50"
                        },
                        "assets": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "asset": {
                                "type": "string",
                                "example": "BTC"
                              },
                              "totalBalance": {
                                "type": "string",
                                "format": "number",
                                "example": "201.003567"
                              },
                              "mtm": {
                                "type": "string",
                                "format": "number",
                                "example": "12962297.93"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        }
      }
    },
    "/v1/custody/allocation": {
      "get": {
        "summary": "GET Custody Target Allocation",
        "description": "Retrieve custody allocation target pct and rebalancing tolerance threshold.",

        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "warmPct": {
                      "type": "string",
                      "format": "number",
                      "example": "0.00"
                    },
                    "coldPct": {
                      "type": "string",
                      "format": "number",
                      "example": "1.00"
                    },
                    "rebalanceThreshold": {
                      "type": "string",
                      "format": "number",
                      "example": "0.05"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        }
      }
    },
    "/v1/market-data/ohlc": {
      "get": {
        "summary": "Retrieve Historical OHLC Data",
        "description": "Retrieve historical OHLC to construct a historical trend view. Use startTime and endTime to set the date/time range for data pull in the request. The response will include a respective number of JSON objects, each one representing a 1 minute bar. Pagination is currently not supported. Currently the earliest available startTime is 1688655600000 (July 6, 2023).",
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Trade pair"
          },
          {
            "name": "startTime",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Epoch time for the start of the date/time range"
          },
          {
            "name": "endTime",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Epoch time for the end of the date/time range"
          }
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "A list of historical OHLC data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "symbol": {
                        "type": "string",
                        "description": "Trade pair",
                        "example": "BTC-USD"
                      },
                      "itemDateTime": {
                        "type": "integer",
                        "format": "int64",
                        "description": "Epoch time of the OHLC data",
                        "example": 171995040000
                      },
                      "date": {
                        "type": "integer",
                        "format": "int64",
                        "description": "Epoch time of the date",
                        "example": 1719878400000
                      },
                      "high": {
                        "type": "string",
                        "description": "Highest price in the time period",
                        "example": "61899.380566"
                      },
                      "low": {
                        "type": "string",
                        "description": "Lowest price in the time period",
                        "example": "61813.724947"
                      },
                      "close": {
                        "type": "string",
                        "description": "Closing price in the time period",
                        "example": "61871.36912262"
                      },
                      "open": {
                        "type": "string",
                        "description": "Opening price in the time period",
                        "example": "61804.3485625"
                      }
                    },
                    "required": ["symbol", "itemDateTime", "date", "high", "low", "close", "open"]
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
