{
  "openapi": "3.1.0",
  "info": {
    "title": "CRISP Partner API",
    "version": "1.0.0",
    "description": "Server-to-server integration. HMAC input: timestamp + newline + nonce + newline + uppercase method + newline + encoded pathname (query excluded) + newline + SHA256(raw body). Base64 HMAC-SHA256 using the credential secret. TLS required. API key identifies the partner; backend must authorize each end user. Venue-owned extensions are explicitly open JSON objects. Financial intents must survive retries and process restarts."
  },
  "servers": [
    {
      "url": "https://partner-api.crisp.trade"
    }
  ],
  "paths": {
    "/v1/capabilities": {
      "get": {
        "operationId": "getCapabilities",
        "summary": "get capabilities",
        "tags": [
          "Partner"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "accounts:read"
        ],
        "x-crisp-idempotency-required": false,
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "venue": {
                          "type": "string"
                        },
                        "accounts": {
                          "type": "string"
                        },
                        "profile": {
                          "type": "string"
                        },
                        "wallet": {
                          "type": "string"
                        },
                        "orders": {
                          "type": "string"
                        },
                        "tradingStatus": {
                          "type": "string"
                        },
                        "orderPrewarm": {
                          "type": "string"
                        },
                        "orderRequirements": {
                          "type": "string"
                        },
                        "positions": {
                          "type": "string"
                        },
                        "trades": {
                          "type": "string"
                        },
                        "eventsMarketsBooks": {
                          "type": "string"
                        },
                        "localization": {
                          "type": "string"
                        },
                        "depositInstructions": {
                          "type": "string"
                        },
                        "depositQuotes": {
                          "type": "string"
                        },
                        "withdrawalQuotes": {
                          "type": "string"
                        },
                        "transfers": {
                          "type": "string"
                        },
                        "withdrawals": {
                          "type": "string"
                        },
                        "partnerFees": {
                          "type": "string"
                        },
                        "analytics": {
                          "type": "string"
                        },
                        "trafficAnalytics": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "venue",
                        "accounts",
                        "profile",
                        "wallet",
                        "orders",
                        "tradingStatus",
                        "orderPrewarm",
                        "orderRequirements",
                        "positions",
                        "trades",
                        "eventsMarketsBooks",
                        "localization",
                        "depositInstructions",
                        "depositQuotes",
                        "withdrawalQuotes",
                        "transfers",
                        "withdrawals",
                        "partnerFees",
                        "analytics",
                        "trafficAnalytics"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/trading-status": {
      "get": {
        "operationId": "getTradingStatus",
        "summary": "get trading status",
        "tags": [
          "Partner"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "markets:read"
        ],
        "x-crisp-idempotency-required": false,
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "mode": {
                          "type": "string",
                          "enum": [
                            "normal",
                            "cancel-only",
                            "disabled"
                          ]
                        },
                        "provider": {
                          "type": "object",
                          "properties": {
                            "available": {
                              "type": "boolean"
                            },
                            "pageStatus": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "activeIncidents": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "activeMaintenances": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "checkedAt": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "available",
                            "pageStatus",
                            "activeIncidents",
                            "activeMaintenances",
                            "checkedAt"
                          ],
                          "additionalProperties": false
                        },
                        "banner": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "visible": {
                                  "type": "boolean"
                                },
                                "severity": {
                                  "type": "string",
                                  "enum": [
                                    "info",
                                    "warning",
                                    "critical"
                                  ]
                                },
                                "message": {
                                  "type": "string"
                                },
                                "statusPageUrl": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "visible",
                                "severity",
                                "message",
                                "statusPageUrl"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "mode",
                        "provider",
                        "banner"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/accounts": {
      "post": {
        "operationId": "createAccount",
        "summary": "create account",
        "tags": [
          "Accounts and trading"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "accounts:write"
        ],
        "x-crisp-idempotency-required": true,
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:-]{8,200}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "externalUserId": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 254
                  },
                  "externalWalletAddress": {
                    "type": "string",
                    "pattern": "^0x[0-9a-fA-F]{40}$"
                  },
                  "externalIdentity": {
                    "type": "object",
                    "properties": {
                      "label": {
                        "type": "string",
                        "pattern": "^[A-Za-z][A-Za-z0-9 _-]{0,63}$"
                      },
                      "value": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 320
                      }
                    },
                    "required": [
                      "label",
                      "value"
                    ],
                    "additionalProperties": false
                  },
                  "referrerExternalUserId": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
                  }
                },
                "required": [
                  "externalUserId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted; inspect lifecycle state. This is not proof of a fill or payout.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "crispAccountId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "externalUserId": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "provisioning",
                            "wallet_pending",
                            "polymarket_pending",
                            "identity_pending",
                            "ready",
                            "failed",
                            "revoked"
                          ],
                          "description": "identity_pending is a legacy read state, not a supported new onboarding flow."
                        },
                        "failureCode": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "crispAccountId",
                        "externalUserId",
                        "status",
                        "failureCode",
                        "createdAt",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "listAccounts",
        "summary": "list accounts",
        "tags": [
          "Accounts and trading"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "accounts:read"
        ],
        "x-crisp-idempotency-required": false,
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "provisioning",
                "wallet_pending",
                "polymarket_pending",
                "identity_pending",
                "ready",
                "failed",
                "revoked"
              ],
              "description": "identity_pending is a legacy read state, not a supported new onboarding flow."
            },
            "style": "form",
            "explode": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "accounts": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "crispAccountId": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "externalUserId": {
                                "type": "string",
                                "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "provisioning",
                                  "wallet_pending",
                                  "polymarket_pending",
                                  "identity_pending",
                                  "ready",
                                  "failed",
                                  "revoked"
                                ],
                                "description": "identity_pending is a legacy read state, not a supported new onboarding flow."
                              },
                              "failureCode": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "crispAccountId",
                              "externalUserId",
                              "status",
                              "failureCode",
                              "createdAt",
                              "updatedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "limit": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 200,
                          "default": 50
                        },
                        "offset": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "accounts",
                        "total",
                        "limit",
                        "offset"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{externalUserId}": {
      "get": {
        "operationId": "getAccount",
        "summary": "get account",
        "tags": [
          "Accounts and trading"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "accounts:read"
        ],
        "x-crisp-idempotency-required": false,
        "parameters": [
          {
            "name": "externalUserId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "crispAccountId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "externalUserId": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "provisioning",
                            "wallet_pending",
                            "polymarket_pending",
                            "identity_pending",
                            "ready",
                            "failed",
                            "revoked"
                          ],
                          "description": "identity_pending is a legacy read state, not a supported new onboarding flow."
                        },
                        "failureCode": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "crispAccountId",
                        "externalUserId",
                        "status",
                        "failureCode",
                        "createdAt",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{externalUserId}/profile": {
      "get": {
        "operationId": "getProfile",
        "summary": "get profile",
        "tags": [
          "Accounts and trading"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "profile:read"
        ],
        "x-crisp-idempotency-required": false,
        "parameters": [
          {
            "name": "externalUserId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "crispAccountId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "externalUserId": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
                        },
                        "externalIdentity": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "pattern": "^[A-Za-z][A-Za-z0-9 _-]{0,63}$"
                                },
                                "value": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 320
                                }
                              },
                              "required": [
                                "label",
                                "value"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "profile": {
                          "type": "object",
                          "properties": {
                            "email": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "emailVerified": {
                              "anyOf": [
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "username": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "displayName": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "externalWalletAddress": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "externalWalletAddressVerified": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "email",
                            "emailVerified",
                            "username",
                            "displayName",
                            "externalWalletAddress",
                            "externalWalletAddressVerified"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "crispAccountId",
                        "externalUserId",
                        "externalIdentity",
                        "profile"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{externalUserId}/wallet": {
      "get": {
        "operationId": "getWallet",
        "summary": "get wallet",
        "tags": [
          "Accounts and trading"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "wallet:read"
        ],
        "x-crisp-idempotency-required": false,
        "parameters": [
          {
            "name": "externalUserId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "crispAccountId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "externalUserId": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "provisioning",
                            "wallet_pending",
                            "polymarket_pending",
                            "identity_pending",
                            "ready",
                            "failed",
                            "revoked"
                          ],
                          "description": "identity_pending is a legacy read state, not a supported new onboarding flow."
                        },
                        "wallet": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "address": {
                                  "type": "string"
                                },
                                "tradingAddress": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "type": {
                                  "type": "string"
                                },
                                "onboardingStatus": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "tradeBlockedAt": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "tradeBlockReason": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "address",
                                "tradingAddress",
                                "type",
                                "onboardingStatus",
                                "tradeBlockedAt",
                                "tradeBlockReason"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "crispAccountId",
                        "externalUserId",
                        "status",
                        "wallet"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{externalUserId}/order-cell-capability": {
      "post": {
        "operationId": "createOrderCellCapability",
        "summary": "create order cell capability",
        "tags": [
          "Accounts and trading"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "orders:write"
        ],
        "x-crisp-idempotency-required": false,
        "parameters": [
          {
            "name": "externalUserId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "execution": {
                          "type": "object",
                          "properties": {
                            "endpoint": {
                              "type": "string"
                            },
                            "capability": {
                              "type": "string"
                            },
                            "expiresAt": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "endpoint",
                            "capability",
                            "expiresAt"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "execution"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{externalUserId}/orders": {
      "post": {
        "operationId": "placeOrder",
        "summary": "place order",
        "tags": [
          "Accounts and trading"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "orders:write"
        ],
        "x-crisp-idempotency-required": true,
        "parameters": [
          {
            "name": "externalUserId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:-]{8,200}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "marketId": {
                        "type": "string"
                      },
                      "tokenId": {
                        "type": "string",
                        "pattern": "^(0|[1-9]\\d{0,100})$"
                      },
                      "side": {
                        "type": "string",
                        "enum": [
                          "BUY",
                          "SELL"
                        ]
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "market"
                        ]
                      },
                      "amount": {
                        "type": "string",
                        "pattern": "^(?=\\d+(?:\\.\\d+)?$)(?=.*[1-9]).+$",
                        "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                      },
                      "price": {
                        "type": "string",
                        "pattern": "^\\d+(?:\\.\\d+)?$",
                        "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                      },
                      "size": {
                        "type": "string",
                        "pattern": "^\\d+(?:\\.\\d+)?$",
                        "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                      },
                      "priceLimit": {
                        "type": "string",
                        "pattern": "^\\d+(?:\\.\\d+)?$",
                        "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                      },
                      "orderType": {
                        "type": "string"
                      },
                      "expiresInSeconds": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "outcomeIndex": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "tickSize": {
                        "type": "string",
                        "pattern": "^\\d+(?:\\.\\d+)?$",
                        "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                      },
                      "negRisk": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "marketId",
                      "tokenId",
                      "side",
                      "type",
                      "amount"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "marketId": {
                        "type": "string"
                      },
                      "tokenId": {
                        "type": "string",
                        "pattern": "^(0|[1-9]\\d{0,100})$"
                      },
                      "side": {
                        "type": "string",
                        "enum": [
                          "BUY",
                          "SELL"
                        ]
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "limit"
                        ]
                      },
                      "amount": {
                        "type": "string",
                        "pattern": "^\\d+(?:\\.\\d+)?$",
                        "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                      },
                      "price": {
                        "type": "string",
                        "pattern": "^0?\\.(?=\\d*[1-9])\\d+$",
                        "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                      },
                      "size": {
                        "type": "string",
                        "pattern": "^(?=\\d+(?:\\.\\d+)?$)(?=.*[1-9]).+$",
                        "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                      },
                      "priceLimit": {
                        "type": "string",
                        "pattern": "^\\d+(?:\\.\\d+)?$",
                        "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                      },
                      "orderType": {
                        "type": "string"
                      },
                      "expiresInSeconds": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "outcomeIndex": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "tickSize": {
                        "type": "string",
                        "pattern": "^\\d+(?:\\.\\d+)?$",
                        "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                      },
                      "negRisk": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "marketId",
                      "tokenId",
                      "side",
                      "type",
                      "price",
                      "size"
                    ],
                    "additionalProperties": false
                  }
                ],
                "description": "Market BUY amount is a cash budget; market SELL amount is shares. Limit requires price and size. priceLimit is optional market slippage protection. Legacy numeric monetary inputs are accepted by the API; new clients use decimal strings."
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted; inspect lifecycle state. This is not proof of a fill or payout.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "crispAccountId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "externalUserId": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
                        },
                        "command": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "queued",
                                "running",
                                "retryable",
                                "succeeded",
                                "failed",
                                "ambiguous"
                              ]
                            },
                            "failureCode": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "state",
                            "failureCode"
                          ],
                          "additionalProperties": false
                        },
                        "order": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "marketId": {
                              "type": "string"
                            },
                            "tokenId": {
                              "type": "string"
                            },
                            "side": {
                              "type": "string"
                            },
                            "type": {
                              "type": "string"
                            },
                            "status": {
                              "type": "string"
                            },
                            "fill": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "additionalProperties": true,
                                  "description": "Venue-owned JSON extension; fields are not a stable CRISP contract. Handle missing fields."
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "priceLimit": {
                              "anyOf": [
                                {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "number"
                                    }
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "marketId",
                            "tokenId",
                            "side",
                            "type",
                            "status",
                            "fill",
                            "priceLimit"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "crispAccountId",
                        "externalUserId",
                        "command",
                        "order"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "listOrders",
        "summary": "list orders",
        "tags": [
          "Accounts and trading"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "orders:read"
        ],
        "x-crisp-idempotency-required": false,
        "parameters": [
          {
            "name": "externalUserId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "crispAccountId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "externalUserId": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
                        },
                        "orders": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": true,
                            "description": "Venue-owned JSON extension; fields are not a stable CRISP contract. Handle missing fields."
                          }
                        }
                      },
                      "required": [
                        "crispAccountId",
                        "externalUserId",
                        "orders"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{externalUserId}/orders/prewarm": {
      "post": {
        "operationId": "prewarmOrders",
        "summary": "prewarm orders",
        "tags": [
          "Accounts and trading"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "orders:write"
        ],
        "x-crisp-idempotency-required": false,
        "parameters": [
          {
            "name": "externalUserId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tokenIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^(0|[1-9]\\d{0,100})$"
                    },
                    "minItems": 1,
                    "maxItems": 2
                  }
                },
                "required": [
                  "tokenIds"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "tokenIds": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "pattern": "^(0|[1-9]\\d{0,100})$"
                          }
                        },
                        "warmed": {
                          "type": "boolean"
                        },
                        "skipped": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "tokenIds",
                        "warmed"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{externalUserId}/operations/{operationId}": {
      "get": {
        "operationId": "getOperation",
        "summary": "get operation",
        "tags": [
          "Accounts and trading"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "orders:read"
        ],
        "x-crisp-idempotency-required": false,
        "parameters": [
          {
            "name": "externalUserId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
            }
          },
          {
            "name": "operationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "operation": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "operation": {
                              "type": "string",
                              "enum": [
                                "order.place",
                                "order.cancel",
                                "position.redeem"
                              ]
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "queued",
                                "running",
                                "retryable",
                                "succeeded",
                                "failed",
                                "ambiguous"
                              ]
                            },
                            "terminal": {
                              "type": "boolean"
                            },
                            "outcomeUnknown": {
                              "type": "boolean"
                            },
                            "failureCode": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "orderId": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "redemption": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "transactionHash": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "count": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "total": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "conditionIds": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "fallback": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "transactionHash",
                                    "count",
                                    "total",
                                    "conditionIds",
                                    "fallback"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "id",
                            "operation",
                            "state",
                            "terminal",
                            "outcomeUnknown",
                            "failureCode",
                            "orderId",
                            "redemption",
                            "createdAt",
                            "updatedAt"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "operation"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{externalUserId}/operations": {
      "get": {
        "operationId": "findOperation",
        "summary": "find operation",
        "tags": [
          "Accounts and trading"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "orders:read"
        ],
        "x-crisp-idempotency-required": false,
        "parameters": [
          {
            "name": "externalUserId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
            }
          },
          {
            "name": "operation",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "order.place",
                "order.cancel",
                "position.redeem"
              ]
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "idempotencyKey",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:-]{8,200}$"
            },
            "style": "form",
            "explode": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "operation": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "operation": {
                              "type": "string",
                              "enum": [
                                "order.place",
                                "order.cancel",
                                "position.redeem"
                              ]
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "queued",
                                "running",
                                "retryable",
                                "succeeded",
                                "failed",
                                "ambiguous"
                              ]
                            },
                            "terminal": {
                              "type": "boolean"
                            },
                            "outcomeUnknown": {
                              "type": "boolean"
                            },
                            "failureCode": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "orderId": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "redemption": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "transactionHash": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "count": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "total": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "conditionIds": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "fallback": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "transactionHash",
                                    "count",
                                    "total",
                                    "conditionIds",
                                    "fallback"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "id",
                            "operation",
                            "state",
                            "terminal",
                            "outcomeUnknown",
                            "failureCode",
                            "orderId",
                            "redemption",
                            "createdAt",
                            "updatedAt"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "operation"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{externalUserId}/trade-fills": {
      "get": {
        "operationId": "listTradeFills",
        "summary": "list trade fills",
        "tags": [
          "Accounts and trading"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "orders:read",
          "fees:read"
        ],
        "x-crisp-idempotency-required": false,
        "parameters": [
          {
            "name": "externalUserId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "style": "form",
            "explode": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "crispAccountId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "externalUserId": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
                        },
                        "window": {
                          "type": "object",
                          "properties": {
                            "from": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "to": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "from",
                            "to"
                          ],
                          "additionalProperties": false
                        },
                        "fills": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "venue": {
                                "type": "string"
                              },
                              "upstreamFillId": {
                                "type": "string"
                              },
                              "clobOrderId": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "clientOrderId": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "matchedAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "marketId": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "marketTitle": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "assetId": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "outcome": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "side": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "price": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "pattern": "^\\d+(?:\\.\\d+)?$",
                                    "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "shares": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "pattern": "^\\d+(?:\\.\\d+)?$",
                                    "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "notionalUsdc": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "pattern": "^\\d+(?:\\.\\d+)?$",
                                    "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "venueFeeUsdc": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "pattern": "^\\d+(?:\\.\\d+)?$",
                                    "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "venueTransactionHash": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "venueStatus": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "fee": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "collectionId": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "amountUsdc": {
                                        "type": "string",
                                        "pattern": "^\\d+(?:\\.\\d+)?$",
                                        "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                                      },
                                      "state": {
                                        "type": "string",
                                        "enum": [
                                          "queued",
                                          "submitting",
                                          "submitted",
                                          "settled",
                                          "manual_review"
                                        ]
                                      },
                                      "transactionHash": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "allocations": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "recipientType": {
                                              "type": "string",
                                              "enum": [
                                                "crisp_revenue",
                                                "partner_treasury",
                                                "referral"
                                              ]
                                            },
                                            "referralLevel": {
                                              "anyOf": [
                                                {
                                                  "type": "integer",
                                                  "minimum": 0
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "beneficiaryAccountId": {
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "format": "uuid"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "amountUsdc": {
                                              "type": "string",
                                              "pattern": "^\\d+(?:\\.\\d+)?$",
                                              "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                                            },
                                            "destinationAddress": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "payout": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "type": "string",
                                                      "format": "uuid"
                                                    },
                                                    "state": {
                                                      "type": "string",
                                                      "enum": [
                                                        "queued",
                                                        "submitting",
                                                        "submitted",
                                                        "settled",
                                                        "manual_review"
                                                      ]
                                                    },
                                                    "batchAmountUsdc": {
                                                      "type": "string",
                                                      "pattern": "^\\d+(?:\\.\\d+)?$",
                                                      "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                                                    },
                                                    "transactionHash": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "id",
                                                    "state",
                                                    "batchAmountUsdc",
                                                    "transactionHash"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "recipientType",
                                            "referralLevel",
                                            "beneficiaryAccountId",
                                            "amountUsdc",
                                            "destinationAddress",
                                            "payout"
                                          ],
                                          "additionalProperties": false
                                        }
                                      }
                                    },
                                    "required": [
                                      "collectionId",
                                      "amountUsdc",
                                      "state",
                                      "transactionHash",
                                      "allocations"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "venue",
                              "upstreamFillId",
                              "clobOrderId",
                              "clientOrderId",
                              "matchedAt",
                              "marketId",
                              "marketTitle",
                              "assetId",
                              "outcome",
                              "side",
                              "price",
                              "shares",
                              "notionalUsdc",
                              "venueFeeUsdc",
                              "venueTransactionHash",
                              "venueStatus",
                              "fee"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "cursor": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "crispAccountId",
                        "externalUserId",
                        "window",
                        "fills",
                        "cursor",
                        "hasMore"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{externalUserId}/orders/{orderId}/trade-fills": {
      "get": {
        "operationId": "listOrderTradeFills",
        "summary": "list order trade fills",
        "tags": [
          "Accounts and trading"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "orders:read",
          "fees:read"
        ],
        "x-crisp-idempotency-required": false,
        "parameters": [
          {
            "name": "externalUserId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
            }
          },
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "style": "form",
            "explode": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "crispAccountId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "externalUserId": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
                        },
                        "orderId": {
                          "type": "string"
                        },
                        "fills": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "venue": {
                                "type": "string"
                              },
                              "upstreamFillId": {
                                "type": "string"
                              },
                              "clobOrderId": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "clientOrderId": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "matchedAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "marketId": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "marketTitle": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "assetId": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "outcome": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "side": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "price": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "pattern": "^\\d+(?:\\.\\d+)?$",
                                    "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "shares": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "pattern": "^\\d+(?:\\.\\d+)?$",
                                    "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "notionalUsdc": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "pattern": "^\\d+(?:\\.\\d+)?$",
                                    "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "venueFeeUsdc": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "pattern": "^\\d+(?:\\.\\d+)?$",
                                    "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "venueTransactionHash": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "venueStatus": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "fee": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "collectionId": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "amountUsdc": {
                                        "type": "string",
                                        "pattern": "^\\d+(?:\\.\\d+)?$",
                                        "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                                      },
                                      "state": {
                                        "type": "string",
                                        "enum": [
                                          "queued",
                                          "submitting",
                                          "submitted",
                                          "settled",
                                          "manual_review"
                                        ]
                                      },
                                      "transactionHash": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "allocations": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "recipientType": {
                                              "type": "string",
                                              "enum": [
                                                "crisp_revenue",
                                                "partner_treasury",
                                                "referral"
                                              ]
                                            },
                                            "referralLevel": {
                                              "anyOf": [
                                                {
                                                  "type": "integer",
                                                  "minimum": 0
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "beneficiaryAccountId": {
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "format": "uuid"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "amountUsdc": {
                                              "type": "string",
                                              "pattern": "^\\d+(?:\\.\\d+)?$",
                                              "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                                            },
                                            "destinationAddress": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "payout": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "type": "string",
                                                      "format": "uuid"
                                                    },
                                                    "state": {
                                                      "type": "string",
                                                      "enum": [
                                                        "queued",
                                                        "submitting",
                                                        "submitted",
                                                        "settled",
                                                        "manual_review"
                                                      ]
                                                    },
                                                    "batchAmountUsdc": {
                                                      "type": "string",
                                                      "pattern": "^\\d+(?:\\.\\d+)?$",
                                                      "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                                                    },
                                                    "transactionHash": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "id",
                                                    "state",
                                                    "batchAmountUsdc",
                                                    "transactionHash"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "recipientType",
                                            "referralLevel",
                                            "beneficiaryAccountId",
                                            "amountUsdc",
                                            "destinationAddress",
                                            "payout"
                                          ],
                                          "additionalProperties": false
                                        }
                                      }
                                    },
                                    "required": [
                                      "collectionId",
                                      "amountUsdc",
                                      "state",
                                      "transactionHash",
                                      "allocations"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "venue",
                              "upstreamFillId",
                              "clobOrderId",
                              "clientOrderId",
                              "matchedAt",
                              "marketId",
                              "marketTitle",
                              "assetId",
                              "outcome",
                              "side",
                              "price",
                              "shares",
                              "notionalUsdc",
                              "venueFeeUsdc",
                              "venueTransactionHash",
                              "venueStatus",
                              "fee"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "cursor": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "crispAccountId",
                        "externalUserId",
                        "orderId",
                        "fills",
                        "cursor",
                        "hasMore"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{externalUserId}/updates": {
      "get": {
        "operationId": "listUpdates",
        "summary": "list updates",
        "tags": [
          "Accounts and trading"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "orders:read"
        ],
        "x-crisp-idempotency-required": false,
        "parameters": [
          {
            "name": "externalUserId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "style": "form",
            "explode": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "crispAccountId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "externalUserId": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
                        },
                        "events": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "cursor": {
                                "type": "string"
                              },
                              "version": {
                                "type": "integer",
                                "enum": [
                                  1
                                ]
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "account.status_changed",
                                  "order.updated",
                                  "trade.recorded",
                                  "balance.updated",
                                  "funding.updated",
                                  "withdrawal.updated",
                                  "position.redeemed",
                                  "settlement.updated",
                                  "reconciliation.completed"
                                ]
                              },
                              "externalUserId": {
                                "type": "string",
                                "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
                              },
                              "accountId": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "occurredAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "data": {
                                "type": "object",
                                "additionalProperties": true,
                                "description": "Venue-owned JSON extension; fields are not a stable CRISP contract. Handle missing fields."
                              }
                            },
                            "required": [
                              "id",
                              "cursor",
                              "version",
                              "type",
                              "externalUserId",
                              "accountId",
                              "occurredAt",
                              "data"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "updates": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "cursor": {
                                "type": "string"
                              },
                              "version": {
                                "type": "integer",
                                "enum": [
                                  1
                                ]
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "account.status_changed",
                                  "order.updated",
                                  "trade.recorded",
                                  "balance.updated",
                                  "funding.updated",
                                  "withdrawal.updated",
                                  "position.redeemed",
                                  "settlement.updated",
                                  "reconciliation.completed"
                                ]
                              },
                              "externalUserId": {
                                "type": "string",
                                "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
                              },
                              "accountId": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "occurredAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "data": {
                                "type": "object",
                                "additionalProperties": true,
                                "description": "Venue-owned JSON extension; fields are not a stable CRISP contract. Handle missing fields."
                              }
                            },
                            "required": [
                              "id",
                              "cursor",
                              "version",
                              "type",
                              "externalUserId",
                              "accountId",
                              "occurredAt",
                              "data"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "cursor": {
                          "type": "string"
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "crispAccountId",
                        "externalUserId",
                        "events",
                        "updates",
                        "cursor",
                        "hasMore"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{externalUserId}/realtime-session": {
      "post": {
        "operationId": "createRealtimeSession",
        "summary": "create realtime session",
        "tags": [
          "Accounts and trading"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "realtime:session"
        ],
        "x-crisp-idempotency-required": false,
        "parameters": [
          {
            "name": "externalUserId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "crispAccountId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "session": {
                          "type": "object",
                          "properties": {
                            "transport": {
                              "type": "string",
                              "enum": [
                                "websocket"
                              ]
                            },
                            "protocol": {
                              "type": "string",
                              "enum": [
                                "crisp-partner-realtime.v1"
                              ]
                            },
                            "endpoint": {
                              "type": "string"
                            },
                            "token": {
                              "type": "string"
                            },
                            "expiresAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "cursorKey": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "transport",
                            "protocol",
                            "endpoint",
                            "token",
                            "expiresAt",
                            "cursorKey"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "crispAccountId",
                        "session"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{externalUserId}/sellable-shares": {
      "get": {
        "operationId": "getSellableShares",
        "summary": "get sellable shares",
        "tags": [
          "Accounts and trading"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "orders:read"
        ],
        "x-crisp-idempotency-required": false,
        "parameters": [
          {
            "name": "externalUserId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
            }
          },
          {
            "name": "tokenId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(0|[1-9]\\d{0,100})$"
            },
            "style": "form",
            "explode": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "tokenId": {
                          "type": "string",
                          "pattern": "^(0|[1-9]\\d{0,100})$"
                        },
                        "availableShares": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "asOf": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "tokenId",
                        "availableShares",
                        "asOf"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{externalUserId}/orders/{orderId}/cancel": {
      "post": {
        "operationId": "cancelOrder",
        "summary": "cancel order",
        "tags": [
          "Accounts and trading"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "orders:write"
        ],
        "x-crisp-idempotency-required": true,
        "parameters": [
          {
            "name": "externalUserId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
            }
          },
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:-]{8,200}$"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted; inspect lifecycle state. This is not proof of a fill or payout.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "crispAccountId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "externalUserId": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
                        },
                        "command": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "queued",
                                "running",
                                "retryable",
                                "succeeded",
                                "failed",
                                "ambiguous"
                              ]
                            },
                            "failureCode": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "state",
                            "failureCode"
                          ],
                          "additionalProperties": false
                        },
                        "orderId": {
                          "type": "string"
                        },
                        "response": {
                          "anyOf": [
                            {
                              "type": "object",
                              "additionalProperties": true,
                              "description": "Venue-owned JSON extension; fields are not a stable CRISP contract. Handle missing fields."
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "crispAccountId",
                        "externalUserId",
                        "command",
                        "orderId",
                        "response"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{externalUserId}/positions": {
      "get": {
        "operationId": "listPositions",
        "summary": "list positions",
        "tags": [
          "Accounts and trading"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "portfolio:read"
        ],
        "x-crisp-idempotency-required": false,
        "parameters": [
          {
            "name": "externalUserId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "closed",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "style": "form",
            "explode": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "crispAccountId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "externalUserId": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
                        },
                        "positions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": true,
                            "description": "Venue-owned JSON extension; fields are not a stable CRISP contract. Handle missing fields."
                          }
                        },
                        "normalized": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "marketId": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "tokenId": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "title": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "outcome": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "outcomeIndex": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "shares": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "pattern": "^-?\\d+(?:\\.\\d+)?$",
                                    "description": "Venue display snapshot, not spendable balance or ledger authority."
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "averagePrice": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "pattern": "^-?\\d+(?:\\.\\d+)?$",
                                    "description": "Venue display snapshot, not spendable balance or ledger authority."
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "currentPrice": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "pattern": "^-?\\d+(?:\\.\\d+)?$",
                                    "description": "Venue display snapshot, not spendable balance or ledger authority."
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "costUsd": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "pattern": "^-?\\d+(?:\\.\\d+)?$",
                                    "description": "Venue display snapshot, not spendable balance or ledger authority."
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "currentValueUsd": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "pattern": "^-?\\d+(?:\\.\\d+)?$",
                                    "description": "Venue display snapshot, not spendable balance or ledger authority."
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "cashPnlUsd": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "pattern": "^-?\\d+(?:\\.\\d+)?$",
                                    "description": "Venue display snapshot, not spendable balance or ledger authority."
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "realizedPnlUsd": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "pattern": "^-?\\d+(?:\\.\\d+)?$",
                                    "description": "Venue display snapshot, not spendable balance or ledger authority."
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "redeemable": {
                                "anyOf": [
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "negRisk": {
                                "anyOf": [
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "marketId",
                              "tokenId",
                              "title",
                              "outcome",
                              "outcomeIndex",
                              "shares",
                              "averagePrice",
                              "currentPrice",
                              "costUsd",
                              "currentValueUsd",
                              "cashPnlUsd",
                              "realizedPnlUsd",
                              "redeemable",
                              "negRisk"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "crispAccountId",
                        "externalUserId",
                        "positions",
                        "normalized"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{externalUserId}/positions/redeem": {
      "post": {
        "operationId": "redeemPositions",
        "summary": "redeem positions",
        "tags": [
          "Accounts and trading"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "orders:write"
        ],
        "x-crisp-idempotency-required": true,
        "parameters": [
          {
            "name": "externalUserId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:-]{8,200}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "positions": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 20,
                    "items": {
                      "type": "object",
                      "properties": {
                        "conditionId": {
                          "type": "string"
                        },
                        "size": {
                          "type": "number"
                        },
                        "outcomeIndex": {
                          "type": "integer",
                          "enum": [
                            0,
                            1
                          ]
                        },
                        "negRisk": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "conditionId",
                        "size",
                        "outcomeIndex",
                        "negRisk"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "positions"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted; inspect lifecycle state. This is not proof of a fill or payout.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "crispAccountId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "externalUserId": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
                        },
                        "command": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "queued",
                                "running",
                                "retryable",
                                "succeeded",
                                "failed",
                                "ambiguous"
                              ]
                            },
                            "failureCode": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "state",
                            "failureCode"
                          ],
                          "additionalProperties": false
                        },
                        "redemption": {
                          "type": "object",
                          "properties": {
                            "transactionHash": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "count": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "total": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "conditionIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "fallback": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "transactionHash",
                            "count",
                            "total",
                            "conditionIds",
                            "fallback"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "crispAccountId",
                        "externalUserId",
                        "command",
                        "redemption"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{externalUserId}/trades": {
      "get": {
        "operationId": "listTrades",
        "summary": "list trades",
        "tags": [
          "Accounts and trading"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "portfolio:read"
        ],
        "x-crisp-idempotency-required": false,
        "parameters": [
          {
            "name": "externalUserId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "conditionId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "style": "form",
            "explode": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "crispAccountId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "externalUserId": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
                        },
                        "trades": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": true,
                            "description": "Venue-owned JSON extension; fields are not a stable CRISP contract. Handle missing fields."
                          }
                        },
                        "normalized": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "marketId": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "tokenId": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "title": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "outcome": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "side": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "enum": [
                                      "BUY",
                                      "SELL"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "shares": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "pattern": "^-?\\d+(?:\\.\\d+)?$",
                                    "description": "Venue display snapshot, not spendable balance or ledger authority."
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "price": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "pattern": "^-?\\d+(?:\\.\\d+)?$",
                                    "description": "Venue display snapshot, not spendable balance or ledger authority."
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "timestampSeconds": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "transactionHash": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "marketId",
                              "tokenId",
                              "title",
                              "outcome",
                              "side",
                              "shares",
                              "price",
                              "timestampSeconds",
                              "transactionHash"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "crispAccountId",
                        "externalUserId",
                        "trades",
                        "normalized"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/localization/discovery": {
      "get": {
        "operationId": "getDiscoveryLocalization",
        "summary": "get discovery localization",
        "tags": [
          "Partner"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "markets:read"
        ],
        "x-crisp-idempotency-required": false,
        "parameters": [
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "zh",
                "zh-hant",
                "ja"
              ]
            },
            "style": "form",
            "explode": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "locale": {
                          "type": "string",
                          "enum": [
                            "en",
                            "zh",
                            "zh-hant",
                            "ja"
                          ]
                        },
                        "fallbackLocale": {
                          "type": "string",
                          "enum": [
                            "en"
                          ]
                        },
                        "source": {
                          "type": "string",
                          "enum": [
                            "upstream",
                            "unavailable"
                          ]
                        },
                        "topics": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "key",
                              "label"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "tags": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "slug": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "slug",
                              "label"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "locale",
                        "fallbackLocale",
                        "source",
                        "topics",
                        "tags"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/localization/locales": {
      "get": {
        "operationId": "getLocalizationLocales",
        "summary": "get localization locales",
        "tags": [
          "Partner"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "markets:read"
        ],
        "x-crisp-idempotency-required": false,
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "locales": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "en",
                              "zh",
                              "zh-hant",
                              "ja"
                            ]
                          }
                        },
                        "defaultLocale": {
                          "type": "string",
                          "enum": [
                            "en"
                          ]
                        },
                        "maxBatchSize": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "rulesPolicy": {
                          "type": "string",
                          "enum": [
                            "original_only"
                          ]
                        }
                      },
                      "required": [
                        "locales",
                        "defaultLocale",
                        "maxBatchSize",
                        "rulesPolicy"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/localization/catalog": {
      "get": {
        "operationId": "getCatalogLocalization",
        "summary": "get catalog localization",
        "tags": [
          "Partner"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "markets:read"
        ],
        "x-crisp-idempotency-required": false,
        "parameters": [
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "zh",
                "zh-hant",
                "ja"
              ]
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "eventId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "pattern": "^\\d{1,64}$"
              },
              "maxItems": 25
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "marketId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "pattern": "^0x[0-9a-fA-F]{64}$"
              },
              "maxItems": 25
            },
            "style": "form",
            "explode": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "locale": {
                          "type": "string",
                          "enum": [
                            "en",
                            "zh",
                            "zh-hant",
                            "ja"
                          ]
                        },
                        "fallbackLocale": {
                          "type": "string",
                          "enum": [
                            "en"
                          ]
                        },
                        "source": {
                          "type": "string",
                          "enum": [
                            "upstream",
                            "unavailable"
                          ]
                        },
                        "events": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "eventId": {
                                "type": "string"
                              },
                              "title": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "seriesTitle": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "markets": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "marketId": {
                                      "type": "string"
                                    },
                                    "sourceMarketId": {
                                      "type": "string"
                                    },
                                    "title": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "groupItemTitle": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "outcomes": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "tokenId": {
                                            "type": "string",
                                            "pattern": "^(0|[1-9]\\d{0,100})$"
                                          },
                                          "index": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "label": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "tokenId",
                                          "index",
                                          "label"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "required": [
                                    "marketId",
                                    "sourceMarketId",
                                    "title",
                                    "groupItemTitle",
                                    "outcomes"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "tags": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "label": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "label"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "eventId",
                              "title",
                              "markets",
                              "tags"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "markets": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "marketId": {
                                "type": "string"
                              },
                              "sourceMarketId": {
                                "type": "string"
                              },
                              "title": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "groupItemTitle": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "outcomes": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "tokenId": {
                                      "type": "string",
                                      "pattern": "^(0|[1-9]\\d{0,100})$"
                                    },
                                    "index": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "label": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "tokenId",
                                    "index",
                                    "label"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "marketId",
                              "sourceMarketId",
                              "title",
                              "groupItemTitle",
                              "outcomes"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "missingEventIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "missingMarketIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "locale",
                        "fallbackLocale",
                        "source",
                        "events",
                        "markets",
                        "missingEventIds",
                        "missingMarketIds"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/events": {
      "get": {
        "operationId": "listEvents",
        "summary": "list events",
        "tags": [
          "Partner"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "markets:read"
        ],
        "x-crisp-idempotency-required": false,
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "closed",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "zh",
                "zh-hant",
                "ja"
              ]
            },
            "style": "form",
            "explode": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "events": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": true,
                            "description": "Venue-owned JSON extension; fields are not a stable CRISP contract. Handle missing fields."
                          }
                        },
                        "limit": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 200,
                          "default": 50
                        },
                        "offset": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "localization": {
                          "type": "object",
                          "properties": {
                            "locale": {
                              "type": "string",
                              "enum": [
                                "en",
                                "zh",
                                "zh-hant",
                                "ja"
                              ]
                            },
                            "fallbackLocale": {
                              "type": "string",
                              "enum": [
                                "en"
                              ]
                            },
                            "source": {
                              "type": "string",
                              "enum": [
                                "upstream",
                                "unavailable"
                              ]
                            },
                            "events": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "eventId": {
                                    "type": "string"
                                  },
                                  "title": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "seriesTitle": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "markets": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "marketId": {
                                          "type": "string"
                                        },
                                        "sourceMarketId": {
                                          "type": "string"
                                        },
                                        "title": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "groupItemTitle": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "outcomes": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "tokenId": {
                                                "type": "string",
                                                "pattern": "^(0|[1-9]\\d{0,100})$"
                                              },
                                              "index": {
                                                "type": "integer",
                                                "minimum": 0
                                              },
                                              "label": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "tokenId",
                                              "index",
                                              "label"
                                            ],
                                            "additionalProperties": false
                                          }
                                        }
                                      },
                                      "required": [
                                        "marketId",
                                        "sourceMarketId",
                                        "title",
                                        "groupItemTitle",
                                        "outcomes"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "tags": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "label": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "label"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "eventId",
                                  "title",
                                  "markets",
                                  "tags"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "markets": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "marketId": {
                                    "type": "string"
                                  },
                                  "sourceMarketId": {
                                    "type": "string"
                                  },
                                  "title": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "groupItemTitle": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "outcomes": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "tokenId": {
                                          "type": "string",
                                          "pattern": "^(0|[1-9]\\d{0,100})$"
                                        },
                                        "index": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "label": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "tokenId",
                                        "index",
                                        "label"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "marketId",
                                  "sourceMarketId",
                                  "title",
                                  "groupItemTitle",
                                  "outcomes"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "missingEventIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "missingMarketIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "locale",
                            "fallbackLocale",
                            "source",
                            "events",
                            "markets",
                            "missingEventIds",
                            "missingMarketIds"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "events",
                        "limit",
                        "offset"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/events/{id}": {
      "get": {
        "operationId": "getEvent",
        "summary": "get event",
        "tags": [
          "Partner"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "markets:read"
        ],
        "x-crisp-idempotency-required": false,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "zh",
                "zh-hant",
                "ja"
              ]
            },
            "style": "form",
            "explode": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "event": {
                          "type": "object",
                          "additionalProperties": true,
                          "description": "Venue-owned JSON extension; fields are not a stable CRISP contract. Handle missing fields."
                        },
                        "localization": {
                          "type": "object",
                          "properties": {
                            "locale": {
                              "type": "string",
                              "enum": [
                                "en",
                                "zh",
                                "zh-hant",
                                "ja"
                              ]
                            },
                            "fallbackLocale": {
                              "type": "string",
                              "enum": [
                                "en"
                              ]
                            },
                            "source": {
                              "type": "string",
                              "enum": [
                                "upstream",
                                "unavailable"
                              ]
                            },
                            "events": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "eventId": {
                                    "type": "string"
                                  },
                                  "title": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "seriesTitle": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "markets": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "marketId": {
                                          "type": "string"
                                        },
                                        "sourceMarketId": {
                                          "type": "string"
                                        },
                                        "title": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "groupItemTitle": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "outcomes": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "tokenId": {
                                                "type": "string",
                                                "pattern": "^(0|[1-9]\\d{0,100})$"
                                              },
                                              "index": {
                                                "type": "integer",
                                                "minimum": 0
                                              },
                                              "label": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "tokenId",
                                              "index",
                                              "label"
                                            ],
                                            "additionalProperties": false
                                          }
                                        }
                                      },
                                      "required": [
                                        "marketId",
                                        "sourceMarketId",
                                        "title",
                                        "groupItemTitle",
                                        "outcomes"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "tags": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "label": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "label"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "eventId",
                                  "title",
                                  "markets",
                                  "tags"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "markets": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "marketId": {
                                    "type": "string"
                                  },
                                  "sourceMarketId": {
                                    "type": "string"
                                  },
                                  "title": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "groupItemTitle": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "outcomes": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "tokenId": {
                                          "type": "string",
                                          "pattern": "^(0|[1-9]\\d{0,100})$"
                                        },
                                        "index": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "label": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "tokenId",
                                        "index",
                                        "label"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "marketId",
                                  "sourceMarketId",
                                  "title",
                                  "groupItemTitle",
                                  "outcomes"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "missingEventIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "missingMarketIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "locale",
                            "fallbackLocale",
                            "source",
                            "events",
                            "markets",
                            "missingEventIds",
                            "missingMarketIds"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "event"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/markets": {
      "get": {
        "operationId": "listMarkets",
        "summary": "list markets",
        "tags": [
          "Partner"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "markets:read"
        ],
        "x-crisp-idempotency-required": false,
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "closed",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "conditionId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "zh",
                "zh-hant",
                "ja"
              ]
            },
            "style": "form",
            "explode": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "markets": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": true,
                            "description": "Venue-owned JSON extension; fields are not a stable CRISP contract. Handle missing fields."
                          }
                        },
                        "normalized": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "marketId": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "title": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "slug": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "imageUrl": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "active": {
                                "anyOf": [
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "closed": {
                                "anyOf": [
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "acceptingOrders": {
                                "anyOf": [
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "outcomes": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "tokenId": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "label": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "index": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "price": {
                                      "anyOf": [
                                        {
                                          "type": "string",
                                          "pattern": "^-?\\d+(?:\\.\\d+)?$",
                                          "description": "Venue display snapshot, not spendable balance or ledger authority."
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "tokenId",
                                    "label",
                                    "index",
                                    "price"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "marketId",
                              "title",
                              "slug",
                              "imageUrl",
                              "active",
                              "closed",
                              "acceptingOrders",
                              "outcomes"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "limit": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 200,
                          "default": 50
                        },
                        "offset": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "localization": {
                          "type": "object",
                          "properties": {
                            "locale": {
                              "type": "string",
                              "enum": [
                                "en",
                                "zh",
                                "zh-hant",
                                "ja"
                              ]
                            },
                            "fallbackLocale": {
                              "type": "string",
                              "enum": [
                                "en"
                              ]
                            },
                            "source": {
                              "type": "string",
                              "enum": [
                                "upstream",
                                "unavailable"
                              ]
                            },
                            "events": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "eventId": {
                                    "type": "string"
                                  },
                                  "title": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "seriesTitle": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "markets": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "marketId": {
                                          "type": "string"
                                        },
                                        "sourceMarketId": {
                                          "type": "string"
                                        },
                                        "title": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "groupItemTitle": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "outcomes": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "tokenId": {
                                                "type": "string",
                                                "pattern": "^(0|[1-9]\\d{0,100})$"
                                              },
                                              "index": {
                                                "type": "integer",
                                                "minimum": 0
                                              },
                                              "label": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "tokenId",
                                              "index",
                                              "label"
                                            ],
                                            "additionalProperties": false
                                          }
                                        }
                                      },
                                      "required": [
                                        "marketId",
                                        "sourceMarketId",
                                        "title",
                                        "groupItemTitle",
                                        "outcomes"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "tags": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "label": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "label"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "eventId",
                                  "title",
                                  "markets",
                                  "tags"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "markets": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "marketId": {
                                    "type": "string"
                                  },
                                  "sourceMarketId": {
                                    "type": "string"
                                  },
                                  "title": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "groupItemTitle": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "outcomes": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "tokenId": {
                                          "type": "string",
                                          "pattern": "^(0|[1-9]\\d{0,100})$"
                                        },
                                        "index": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "label": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "tokenId",
                                        "index",
                                        "label"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "marketId",
                                  "sourceMarketId",
                                  "title",
                                  "groupItemTitle",
                                  "outcomes"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "missingEventIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "missingMarketIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "locale",
                            "fallbackLocale",
                            "source",
                            "events",
                            "markets",
                            "missingEventIds",
                            "missingMarketIds"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "markets",
                        "normalized",
                        "limit",
                        "offset"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/markets/{conditionId}": {
      "get": {
        "operationId": "getMarket",
        "summary": "get market",
        "tags": [
          "Partner"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "markets:read"
        ],
        "x-crisp-idempotency-required": false,
        "parameters": [
          {
            "name": "conditionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "zh",
                "zh-hant",
                "ja"
              ]
            },
            "style": "form",
            "explode": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "conditionId": {
                          "type": "string"
                        },
                        "markets": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": true,
                            "description": "Venue-owned JSON extension; fields are not a stable CRISP contract. Handle missing fields."
                          }
                        },
                        "normalized": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "marketId": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "title": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "slug": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "imageUrl": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "active": {
                                "anyOf": [
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "closed": {
                                "anyOf": [
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "acceptingOrders": {
                                "anyOf": [
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "outcomes": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "tokenId": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "label": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "index": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "price": {
                                      "anyOf": [
                                        {
                                          "type": "string",
                                          "pattern": "^-?\\d+(?:\\.\\d+)?$",
                                          "description": "Venue display snapshot, not spendable balance or ledger authority."
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "tokenId",
                                    "label",
                                    "index",
                                    "price"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "marketId",
                              "title",
                              "slug",
                              "imageUrl",
                              "active",
                              "closed",
                              "acceptingOrders",
                              "outcomes"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "localization": {
                          "type": "object",
                          "properties": {
                            "locale": {
                              "type": "string",
                              "enum": [
                                "en",
                                "zh",
                                "zh-hant",
                                "ja"
                              ]
                            },
                            "fallbackLocale": {
                              "type": "string",
                              "enum": [
                                "en"
                              ]
                            },
                            "source": {
                              "type": "string",
                              "enum": [
                                "upstream",
                                "unavailable"
                              ]
                            },
                            "events": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "eventId": {
                                    "type": "string"
                                  },
                                  "title": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "seriesTitle": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "markets": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "marketId": {
                                          "type": "string"
                                        },
                                        "sourceMarketId": {
                                          "type": "string"
                                        },
                                        "title": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "groupItemTitle": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "outcomes": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "tokenId": {
                                                "type": "string",
                                                "pattern": "^(0|[1-9]\\d{0,100})$"
                                              },
                                              "index": {
                                                "type": "integer",
                                                "minimum": 0
                                              },
                                              "label": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "tokenId",
                                              "index",
                                              "label"
                                            ],
                                            "additionalProperties": false
                                          }
                                        }
                                      },
                                      "required": [
                                        "marketId",
                                        "sourceMarketId",
                                        "title",
                                        "groupItemTitle",
                                        "outcomes"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "tags": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "label": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "label"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "eventId",
                                  "title",
                                  "markets",
                                  "tags"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "markets": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "marketId": {
                                    "type": "string"
                                  },
                                  "sourceMarketId": {
                                    "type": "string"
                                  },
                                  "title": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "groupItemTitle": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "outcomes": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "tokenId": {
                                          "type": "string",
                                          "pattern": "^(0|[1-9]\\d{0,100})$"
                                        },
                                        "index": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "label": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "tokenId",
                                        "index",
                                        "label"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "marketId",
                                  "sourceMarketId",
                                  "title",
                                  "groupItemTitle",
                                  "outcomes"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "missingEventIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "missingMarketIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "locale",
                            "fallbackLocale",
                            "source",
                            "events",
                            "markets",
                            "missingEventIds",
                            "missingMarketIds"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "conditionId",
                        "markets",
                        "normalized"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/books/{tokenId}": {
      "get": {
        "operationId": "getBook",
        "summary": "get book",
        "tags": [
          "Partner"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "markets:read"
        ],
        "x-crisp-idempotency-required": false,
        "parameters": [
          {
            "name": "tokenId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(0|[1-9]\\d{0,100})$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "tokenId": {
                          "type": "string",
                          "pattern": "^(0|[1-9]\\d{0,100})$"
                        },
                        "book": {
                          "type": "object",
                          "additionalProperties": true,
                          "description": "Venue-owned JSON extension; fields are not a stable CRISP contract. Handle missing fields."
                        },
                        "normalized": {
                          "type": "object",
                          "properties": {
                            "tokenId": {
                              "type": "string"
                            },
                            "marketId": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "bids": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "price": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "pattern": "^-?\\d+(?:\\.\\d+)?$",
                                        "description": "Venue display snapshot, not spendable balance or ledger authority."
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "shares": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "pattern": "^-?\\d+(?:\\.\\d+)?$",
                                        "description": "Venue display snapshot, not spendable balance or ledger authority."
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "price",
                                  "shares"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "asks": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "price": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "pattern": "^-?\\d+(?:\\.\\d+)?$",
                                        "description": "Venue display snapshot, not spendable balance or ledger authority."
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "shares": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "pattern": "^-?\\d+(?:\\.\\d+)?$",
                                        "description": "Venue display snapshot, not spendable balance or ledger authority."
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "price",
                                  "shares"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "minimumOrderShares": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "pattern": "^-?\\d+(?:\\.\\d+)?$",
                                  "description": "Venue display snapshot, not spendable balance or ledger authority."
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "tickSize": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "pattern": "^-?\\d+(?:\\.\\d+)?$",
                                  "description": "Venue display snapshot, not spendable balance or ledger authority."
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "negRisk": {
                              "anyOf": [
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "tokenId",
                            "marketId",
                            "bids",
                            "asks",
                            "minimumOrderShares",
                            "tickSize",
                            "negRisk"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "tokenId",
                        "book",
                        "normalized"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/order-requirements": {
      "get": {
        "operationId": "getOrderRequirements",
        "summary": "get order requirements",
        "tags": [
          "Partner"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "markets:read"
        ],
        "x-crisp-idempotency-required": false,
        "parameters": [
          {
            "name": "tokenId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(0|[1-9]\\d{0,100})$"
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "side",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "BUY",
                "SELL"
              ]
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "market",
                "limit"
              ]
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "amount",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d+(?:\\.\\d+)?$",
              "description": "Exact decimal string. Never use floating point for ledger arithmetic."
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "amounts",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "price",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d+(?:\\.\\d+)?$",
              "description": "Exact decimal string. Never use floating point for ledger arithmetic."
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d+(?:\\.\\d+)?$",
              "description": "Exact decimal string. Never use floating point for ledger arithmetic."
            },
            "style": "form",
            "explode": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "requirements": {
                          "type": "object",
                          "properties": {
                            "tokenId": {
                              "type": "string",
                              "pattern": "^(0|[1-9]\\d{0,100})$"
                            },
                            "side": {
                              "type": "string",
                              "enum": [
                                "BUY",
                                "SELL"
                              ]
                            },
                            "type": {
                              "type": "string",
                              "enum": [
                                "market",
                                "limit"
                              ]
                            },
                            "minOrderSize": {
                              "type": "number"
                            },
                            "tickSize": {
                              "type": "number"
                            },
                            "minimumBuyAmount": {
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "allInBuyAmount": {
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "payoutIfWon": {
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "averagePrice": {
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "marketBuyQuotes": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "allInAmount": {
                                    "type": "number"
                                  },
                                  "payoutIfWon": {
                                    "type": "number"
                                  },
                                  "averagePrice": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "allInAmount",
                                  "payoutIfWon",
                                  "averagePrice"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "asOf": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "tokenId",
                            "side",
                            "type",
                            "minOrderSize",
                            "tickSize",
                            "minimumBuyAmount",
                            "allInBuyAmount",
                            "payoutIfWon",
                            "averagePrice",
                            "marketBuyQuotes",
                            "asOf"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "requirements"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{externalUserId}/wallet/deposit-instructions": {
      "get": {
        "operationId": "getDepositInstructions",
        "summary": "get deposit instructions",
        "tags": [
          "Accounts and trading"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "wallet:read"
        ],
        "x-crisp-idempotency-required": false,
        "parameters": [
          {
            "name": "externalUserId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "crispAccountId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "externalUserId": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
                        },
                        "instructions": {
                          "type": "object",
                          "additionalProperties": true,
                          "description": "Venue-owned JSON extension; fields are not a stable CRISP contract. Handle missing fields."
                        },
                        "normalized": {
                          "type": "object",
                          "properties": {
                            "addresses": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "networkFamily": {
                                    "type": "string"
                                  },
                                  "address": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "networkFamily",
                                  "address"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "assets": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "chainId": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "chainName": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "tokenAddress": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "symbol": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "name": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "decimals": {
                                    "anyOf": [
                                      {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "minimumDepositUsd": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "pattern": "^-?\\d+(?:\\.\\d+)?$",
                                        "description": "Venue display snapshot, not spendable balance or ledger authority."
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "chainId",
                                  "chainName",
                                  "tokenAddress",
                                  "symbol",
                                  "name",
                                  "decimals",
                                  "minimumDepositUsd"
                                ],
                                "additionalProperties": false
                              }
                            }
                          },
                          "required": [
                            "addresses",
                            "assets"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "crispAccountId",
                        "externalUserId",
                        "instructions",
                        "normalized"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{externalUserId}/wallet/trading-availability": {
      "get": {
        "operationId": "getTradingAvailability",
        "summary": "get trading availability",
        "tags": [
          "Accounts and trading"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "wallet:read"
        ],
        "x-crisp-idempotency-required": false,
        "parameters": [
          {
            "name": "externalUserId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "crispAccountId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "externalUserId": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
                        },
                        "availableToTrade": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "formatted": {
                                  "type": "string"
                                },
                                "symbol": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "formatted",
                                "symbol"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "asOf": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "crispAccountId",
                        "externalUserId",
                        "availableToTrade",
                        "asOf"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{externalUserId}/wallet/funding": {
      "get": {
        "operationId": "getFunding",
        "summary": "get funding",
        "tags": [
          "Accounts and trading"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "wallet:read"
        ],
        "x-crisp-idempotency-required": false,
        "parameters": [
          {
            "name": "externalUserId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
            }
          },
          {
            "name": "details",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "summary",
                "trading",
                "full"
              ]
            },
            "style": "form",
            "explode": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "crispAccountId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "externalUserId": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
                        },
                        "wallet": {
                          "type": "object",
                          "properties": {
                            "tradingAddress": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "tradingAddress"
                          ],
                          "additionalProperties": false
                        },
                        "balance": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "baseUnit": {
                                  "type": "string"
                                },
                                "formatted": {
                                  "type": "string"
                                },
                                "symbol": {
                                  "type": "string"
                                },
                                "decimals": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              },
                              "required": [
                                "baseUnit",
                                "formatted"
                              ],
                              "additionalProperties": true
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "balanceStatus": {
                          "type": "string",
                          "enum": [
                            "available",
                            "temporarily_unavailable"
                          ]
                        },
                        "availableToTrade": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "formatted": {
                                  "type": "string"
                                },
                                "symbol": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "formatted",
                                "symbol"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "details": {
                          "type": "string",
                          "enum": [
                            "summary",
                            "trading",
                            "full"
                          ]
                        },
                        "deposit": {
                          "type": "object",
                          "properties": {
                            "instructions": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "additionalProperties": true,
                                  "description": "Venue-owned JSON extension; fields are not a stable CRISP contract. Handle missing fields."
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "instructions"
                          ],
                          "additionalProperties": false
                        },
                        "withdrawal": {
                          "type": "object",
                          "properties": {
                            "source": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "baseUnit": {
                                      "type": "string"
                                    },
                                    "formatted": {
                                      "type": "string"
                                    },
                                    "symbol": {
                                      "type": "string"
                                    },
                                    "decimals": {
                                      "type": "integer",
                                      "minimum": 0
                                    }
                                  },
                                  "required": [
                                    "baseUnit",
                                    "formatted"
                                  ],
                                  "additionalProperties": true
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "enabled": {
                              "type": "boolean"
                            },
                            "authorization": {
                              "type": "string"
                            },
                            "availability": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "source",
                            "enabled",
                            "authorization"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "crispAccountId",
                        "externalUserId",
                        "wallet",
                        "balance",
                        "balanceStatus",
                        "availableToTrade",
                        "details",
                        "deposit",
                        "withdrawal"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{externalUserId}/wallet/transfers": {
      "get": {
        "operationId": "listTransfers",
        "summary": "list transfers",
        "tags": [
          "Accounts and trading"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "wallet:read"
        ],
        "x-crisp-idempotency-required": false,
        "parameters": [
          {
            "name": "externalUserId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "style": "form",
            "explode": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "crispAccountId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "externalUserId": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
                        },
                        "transfers": {
                          "type": "object",
                          "additionalProperties": true,
                          "description": "Venue-owned JSON extension; fields are not a stable CRISP contract. Handle missing fields."
                        }
                      },
                      "required": [
                        "crispAccountId",
                        "externalUserId",
                        "transfers"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{externalUserId}/wallet/deposit-quote": {
      "post": {
        "operationId": "quoteDeposit",
        "summary": "quote deposit",
        "tags": [
          "Accounts and trading"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "wallet:read"
        ],
        "x-crisp-idempotency-required": false,
        "parameters": [
          {
            "name": "externalUserId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "fromAmountBaseUnit": {
                    "type": "string",
                    "pattern": "^(?=\\d{1,100}$)0*[1-9]\\d*$",
                    "description": "Positive integer in the source token base units."
                  },
                  "fromChainId": {
                    "type": "string"
                  },
                  "fromTokenAddress": {
                    "type": "string"
                  }
                },
                "required": [
                  "fromAmountBaseUnit",
                  "fromChainId",
                  "fromTokenAddress"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "crispAccountId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "externalUserId": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
                        },
                        "quote": {
                          "type": "object",
                          "additionalProperties": true,
                          "description": "Venue-owned JSON extension; fields are not a stable CRISP contract. Handle missing fields."
                        }
                      },
                      "required": [
                        "crispAccountId",
                        "externalUserId",
                        "quote"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{externalUserId}/wallet/withdrawal-quote": {
      "post": {
        "operationId": "quoteWithdrawal",
        "summary": "quote withdrawal",
        "tags": [
          "Accounts and trading"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "wallet:read"
        ],
        "x-crisp-idempotency-required": false,
        "parameters": [
          {
            "name": "externalUserId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "amountBaseUnit": {
                    "type": "string",
                    "pattern": "^(?=\\d{1,100}$)0*[1-9]\\d*$",
                    "description": "Positive integer in the source token base units."
                  },
                  "recipientAddress": {
                    "type": "string"
                  },
                  "toChainId": {
                    "type": "string"
                  },
                  "toTokenAddress": {
                    "type": "string"
                  }
                },
                "required": [
                  "amountBaseUnit",
                  "recipientAddress",
                  "toChainId",
                  "toTokenAddress"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "externalUserId": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
                        },
                        "quote": {
                          "type": "object",
                          "additionalProperties": true,
                          "description": "Venue-owned JSON extension; fields are not a stable CRISP contract. Handle missing fields."
                        }
                      },
                      "required": [
                        "externalUserId",
                        "quote"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{externalUserId}/withdrawals": {
      "get": {
        "operationId": "listWithdrawals",
        "summary": "list withdrawals",
        "tags": [
          "Accounts and trading"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "wallet:read"
        ],
        "x-crisp-idempotency-required": false,
        "parameters": [
          {
            "name": "externalUserId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            },
            "style": "form",
            "explode": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "crispAccountId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "externalUserId": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
                        },
                        "withdrawals": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "amountBaseUnit": {
                                "type": "string",
                                "pattern": "^(?=\\d{1,100}$)0*[1-9]\\d*$",
                                "description": "Positive integer in the source token base units."
                              },
                              "recipientAddress": {
                                "type": "string"
                              },
                              "toChainId": {
                                "type": "string"
                              },
                              "toTokenAddress": {
                                "type": "string"
                              },
                              "bridgeAddress": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "state": {
                                "type": "string",
                                "enum": [
                                  "queued",
                                  "submitting",
                                  "submitted",
                                  "confirmed",
                                  "failed",
                                  "manual_review"
                                ]
                              },
                              "relayTransactionId": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "transactionHash": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "failureCode": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "finalDestinationStatus": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "submittedAt": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "confirmedAt": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "amountBaseUnit",
                              "recipientAddress",
                              "toChainId",
                              "toTokenAddress",
                              "bridgeAddress",
                              "state",
                              "relayTransactionId",
                              "transactionHash",
                              "failureCode",
                              "finalDestinationStatus",
                              "createdAt",
                              "updatedAt",
                              "submittedAt",
                              "confirmedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "limit": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 200,
                          "default": 50
                        },
                        "offset": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "crispAccountId",
                        "externalUserId",
                        "withdrawals",
                        "total",
                        "limit",
                        "offset"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createWithdrawal",
        "summary": "create withdrawal",
        "tags": [
          "Accounts and trading"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "wallet:write"
        ],
        "x-crisp-idempotency-required": true,
        "parameters": [
          {
            "name": "externalUserId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:-]{8,200}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "amountBaseUnit": {
                    "type": "string",
                    "pattern": "^(?=\\d{1,100}$)0*[1-9]\\d*$",
                    "description": "Positive integer in the source token base units."
                  },
                  "recipientAddress": {
                    "type": "string"
                  },
                  "toChainId": {
                    "type": "string"
                  },
                  "toTokenAddress": {
                    "type": "string"
                  }
                },
                "required": [
                  "amountBaseUnit",
                  "recipientAddress",
                  "toChainId",
                  "toTokenAddress"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted; inspect lifecycle state. This is not proof of a fill or payout.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "crispAccountId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "externalUserId": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
                        },
                        "withdrawal": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "amountBaseUnit": {
                              "type": "string",
                              "pattern": "^(?=\\d{1,100}$)0*[1-9]\\d*$",
                              "description": "Positive integer in the source token base units."
                            },
                            "recipientAddress": {
                              "type": "string"
                            },
                            "toChainId": {
                              "type": "string"
                            },
                            "toTokenAddress": {
                              "type": "string"
                            },
                            "bridgeAddress": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "queued",
                                "submitting",
                                "submitted",
                                "confirmed",
                                "failed",
                                "manual_review"
                              ]
                            },
                            "relayTransactionId": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "transactionHash": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "failureCode": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "finalDestinationStatus": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "submittedAt": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "confirmedAt": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "amountBaseUnit",
                            "recipientAddress",
                            "toChainId",
                            "toTokenAddress",
                            "bridgeAddress",
                            "state",
                            "relayTransactionId",
                            "transactionHash",
                            "failureCode",
                            "finalDestinationStatus",
                            "createdAt",
                            "updatedAt",
                            "submittedAt",
                            "confirmedAt"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "crispAccountId",
                        "externalUserId",
                        "withdrawal"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{externalUserId}/withdrawals/{withdrawalId}": {
      "get": {
        "operationId": "getWithdrawal",
        "summary": "get withdrawal",
        "tags": [
          "Accounts and trading"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "wallet:read"
        ],
        "x-crisp-idempotency-required": false,
        "parameters": [
          {
            "name": "externalUserId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
            }
          },
          {
            "name": "withdrawalId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "crispAccountId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "externalUserId": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
                        },
                        "withdrawal": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "amountBaseUnit": {
                              "type": "string",
                              "pattern": "^(?=\\d{1,100}$)0*[1-9]\\d*$",
                              "description": "Positive integer in the source token base units."
                            },
                            "recipientAddress": {
                              "type": "string"
                            },
                            "toChainId": {
                              "type": "string"
                            },
                            "toTokenAddress": {
                              "type": "string"
                            },
                            "bridgeAddress": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "queued",
                                "submitting",
                                "submitted",
                                "confirmed",
                                "failed",
                                "manual_review"
                              ]
                            },
                            "relayTransactionId": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "transactionHash": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "failureCode": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "finalDestinationStatus": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "submittedAt": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "confirmedAt": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "amountBaseUnit",
                            "recipientAddress",
                            "toChainId",
                            "toTokenAddress",
                            "bridgeAddress",
                            "state",
                            "relayTransactionId",
                            "transactionHash",
                            "failureCode",
                            "finalDestinationStatus",
                            "createdAt",
                            "updatedAt",
                            "submittedAt",
                            "confirmedAt"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "crispAccountId",
                        "externalUserId",
                        "withdrawal"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{externalUserId}/withdrawal-intents/{idempotencyKey}": {
      "get": {
        "operationId": "findWithdrawal",
        "summary": "find withdrawal",
        "tags": [
          "Accounts and trading"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "wallet:read"
        ],
        "x-crisp-idempotency-required": false,
        "parameters": [
          {
            "name": "externalUserId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
            }
          },
          {
            "name": "idempotencyKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:-]{8,200}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "crispAccountId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "externalUserId": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
                        },
                        "withdrawal": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "amountBaseUnit": {
                              "type": "string",
                              "pattern": "^(?=\\d{1,100}$)0*[1-9]\\d*$",
                              "description": "Positive integer in the source token base units."
                            },
                            "recipientAddress": {
                              "type": "string"
                            },
                            "toChainId": {
                              "type": "string"
                            },
                            "toTokenAddress": {
                              "type": "string"
                            },
                            "bridgeAddress": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "queued",
                                "submitting",
                                "submitted",
                                "confirmed",
                                "failed",
                                "manual_review"
                              ]
                            },
                            "relayTransactionId": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "transactionHash": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "failureCode": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "finalDestinationStatus": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "submittedAt": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "confirmedAt": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "amountBaseUnit",
                            "recipientAddress",
                            "toChainId",
                            "toTokenAddress",
                            "bridgeAddress",
                            "state",
                            "relayTransactionId",
                            "transactionHash",
                            "failureCode",
                            "finalDestinationStatus",
                            "createdAt",
                            "updatedAt",
                            "submittedAt",
                            "confirmedAt"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "crispAccountId",
                        "externalUserId",
                        "withdrawal"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{externalUserId}/referral-claims/{claimId}": {
      "get": {
        "operationId": "getReferralClaim",
        "summary": "get referral claim",
        "tags": [
          "Accounts and trading"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "fees:read"
        ],
        "x-crisp-idempotency-required": false,
        "parameters": [
          {
            "name": "externalUserId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
            }
          },
          {
            "name": "claimId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "claim": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "queued",
                                "submitting",
                                "submitted",
                                "settled",
                                "manual_review"
                              ]
                            },
                            "amountUsdc": {
                              "type": "string",
                              "pattern": "^\\d+(?:\\.\\d+)?$",
                              "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                            },
                            "transactionHash": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "terminal": {
                              "type": "boolean"
                            },
                            "needsReview": {
                              "type": "boolean"
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "id",
                            "state",
                            "amountUsdc",
                            "transactionHash",
                            "terminal",
                            "needsReview",
                            "createdAt",
                            "updatedAt"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "claim"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/analytics/trading": {
      "get": {
        "operationId": "getTradingAnalytics",
        "summary": "get trading analytics",
        "tags": [
          "Partner"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "analytics:read"
        ],
        "x-crisp-idempotency-required": false,
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "style": "form",
            "explode": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "venue": {
                          "type": "string"
                        },
                        "period": {
                          "type": "object",
                          "properties": {
                            "from": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "to": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "from",
                            "to"
                          ],
                          "additionalProperties": false
                        },
                        "source": {
                          "type": "string"
                        },
                        "consistency": {
                          "type": "string"
                        },
                        "ingestion": {
                          "type": "object",
                          "properties": {
                            "lastCompletedAt": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "inProgress": {
                              "type": "boolean"
                            },
                            "lastError": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "lastCompletedAt",
                            "inProgress",
                            "lastError"
                          ],
                          "additionalProperties": false
                        },
                        "accounts": {
                          "type": "object",
                          "properties": {
                            "ready": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "withMatchedTrades": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "displayedWithMatchedTrades": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "userMetricsTruncated": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "ready",
                            "withMatchedTrades",
                            "displayedWithMatchedTrades",
                            "userMetricsTruncated"
                          ],
                          "additionalProperties": false
                        },
                        "totals": {
                          "type": "object",
                          "properties": {
                            "tradingVolumeUsdc": {
                              "type": "string",
                              "pattern": "^\\d+(?:\\.\\d+)?$",
                              "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                            },
                            "polymarketTakerFeesUsdc": {
                              "type": "string",
                              "pattern": "^\\d+(?:\\.\\d+)?$",
                              "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                            },
                            "platformFeesUsdc": {
                              "type": "string",
                              "pattern": "^\\d+(?:\\.\\d+)?$",
                              "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                            },
                            "platformFeesSettledUsdc": {
                              "type": "string",
                              "pattern": "^\\d+(?:\\.\\d+)?$",
                              "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                            },
                            "partnerTreasuryFeesUsdc": {
                              "type": "string",
                              "pattern": "^\\d+(?:\\.\\d+)?$",
                              "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                            },
                            "partnerTreasuryFeesSettledUsdc": {
                              "type": "string",
                              "pattern": "^\\d+(?:\\.\\d+)?$",
                              "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                            },
                            "partnerFeesUsdc": {
                              "type": "string",
                              "pattern": "^\\d+(?:\\.\\d+)?$",
                              "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                            },
                            "partnerFeesSettledUsdc": {
                              "type": "string",
                              "pattern": "^\\d+(?:\\.\\d+)?$",
                              "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                            },
                            "partnerFeesClaimedUsdc": {
                              "type": "string",
                              "pattern": "^\\d+(?:\\.\\d+)?$",
                              "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                            },
                            "partnerFeesOutstandingUsdc": {
                              "type": "string",
                              "pattern": "^\\d+(?:\\.\\d+)?$",
                              "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                            }
                          },
                          "required": [
                            "tradingVolumeUsdc",
                            "polymarketTakerFeesUsdc",
                            "platformFeesUsdc",
                            "platformFeesSettledUsdc",
                            "partnerTreasuryFeesUsdc",
                            "partnerTreasuryFeesSettledUsdc",
                            "partnerFeesUsdc",
                            "partnerFeesSettledUsdc",
                            "partnerFeesClaimedUsdc",
                            "partnerFeesOutstandingUsdc"
                          ],
                          "additionalProperties": false
                        },
                        "users": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "crispAccountId": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "externalUserId": {
                                "type": "string",
                                "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
                              },
                              "tradeCount": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "tradingVolumeUsdc": {
                                "type": "string",
                                "pattern": "^\\d+(?:\\.\\d+)?$",
                                "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                              },
                              "polymarketTakerFeesUsdc": {
                                "type": "string",
                                "pattern": "^\\d+(?:\\.\\d+)?$",
                                "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                              },
                              "partnerFeesUsdc": {
                                "type": "string",
                                "pattern": "^\\d+(?:\\.\\d+)?$",
                                "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                              },
                              "partnerFeesSettledUsdc": {
                                "type": "string",
                                "pattern": "^\\d+(?:\\.\\d+)?$",
                                "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                              },
                              "partnerFeesClaimedUsdc": {
                                "type": "string",
                                "pattern": "^\\d+(?:\\.\\d+)?$",
                                "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                              },
                              "partnerFeesOutstandingUsdc": {
                                "type": "string",
                                "pattern": "^\\d+(?:\\.\\d+)?$",
                                "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                              }
                            },
                            "required": [
                              "crispAccountId",
                              "externalUserId",
                              "tradeCount",
                              "tradingVolumeUsdc",
                              "polymarketTakerFeesUsdc",
                              "partnerFeesUsdc",
                              "partnerFeesSettledUsdc",
                              "partnerFeesClaimedUsdc",
                              "partnerFeesOutstandingUsdc"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "venue",
                        "period",
                        "source",
                        "consistency",
                        "ingestion",
                        "accounts",
                        "totals",
                        "users"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/traffic/page-views": {
      "post": {
        "operationId": "recordPageView",
        "summary": "record page view",
        "tags": [
          "Partner"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "traffic:write"
        ],
        "x-crisp-idempotency-required": false,
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "eventId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "projectSlug": {
                    "type": "string"
                  },
                  "visitorToken": {
                    "type": "string"
                  },
                  "pagePath": {
                    "type": "string"
                  },
                  "referrerHost": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "countryCode": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "isLanding": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "eventId",
                  "projectSlug",
                  "visitorToken",
                  "pagePath"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted; inspect lifecycle state. This is not proof of a fill or payout.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "recorded": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "recorded"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/fee-claims": {
      "get": {
        "operationId": "listFeeClaims",
        "summary": "list fee claims",
        "tags": [
          "Partner"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "fees:read"
        ],
        "x-crisp-idempotency-required": false,
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 90,
              "default": 31
            },
            "style": "form",
            "explode": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "venue": {
                          "type": "string"
                        },
                        "cadence": {
                          "type": "string"
                        },
                        "claims": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "feeDay": {
                                "type": "string",
                                "format": "date"
                              },
                              "recipientAddress": {
                                "type": "string"
                              },
                              "accruedUsdc": {
                                "type": "string",
                                "pattern": "^\\d+(?:\\.\\d+)?$",
                                "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                              },
                              "collectedUsdc": {
                                "type": "string",
                                "pattern": "^\\d+(?:\\.\\d+)?$",
                                "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                              },
                              "claimableUsdc": {
                                "type": "string",
                                "pattern": "^\\d+(?:\\.\\d+)?$",
                                "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                              },
                              "claim": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "state": {
                                        "type": "string",
                                        "enum": [
                                          "queued",
                                          "submitting",
                                          "submitted",
                                          "settled",
                                          "manual_review"
                                        ]
                                      },
                                      "amountUsdc": {
                                        "type": "string",
                                        "pattern": "^\\d+(?:\\.\\d+)?$",
                                        "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                                      },
                                      "transactionHash": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "requestedAt": {
                                        "type": "string",
                                        "format": "date-time"
                                      },
                                      "settledAt": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "format": "date-time"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "state",
                                      "amountUsdc",
                                      "transactionHash",
                                      "requestedAt",
                                      "settledAt"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "feeDay",
                              "recipientAddress",
                              "accruedUsdc",
                              "collectedUsdc",
                              "claimableUsdc",
                              "claim"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "venue",
                        "cadence",
                        "claims"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createFeeClaim",
        "summary": "create fee claim",
        "tags": [
          "Partner"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "fees:write"
        ],
        "x-crisp-idempotency-required": true,
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:-]{8,200}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "feeDay": {
                    "type": "string",
                    "format": "date"
                  },
                  "recipientAddress": {
                    "type": "string",
                    "pattern": "^0x[0-9a-fA-F]{40}$"
                  }
                },
                "required": [
                  "feeDay",
                  "recipientAddress"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted; inspect lifecycle state. This is not proof of a fill or payout.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "venue": {
                          "type": "string"
                        },
                        "claim": {
                          "type": "object",
                          "properties": {
                            "feeDay": {
                              "type": "string",
                              "format": "date"
                            },
                            "recipientAddress": {
                              "type": "string"
                            },
                            "accruedUsdc": {
                              "type": "string",
                              "pattern": "^\\d+(?:\\.\\d+)?$",
                              "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                            },
                            "collectedUsdc": {
                              "type": "string",
                              "pattern": "^\\d+(?:\\.\\d+)?$",
                              "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                            },
                            "claimableUsdc": {
                              "type": "string",
                              "pattern": "^\\d+(?:\\.\\d+)?$",
                              "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                            },
                            "claim": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "queued",
                                        "submitting",
                                        "submitted",
                                        "settled",
                                        "manual_review"
                                      ]
                                    },
                                    "amountUsdc": {
                                      "type": "string",
                                      "pattern": "^\\d+(?:\\.\\d+)?$",
                                      "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                                    },
                                    "transactionHash": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "requestedAt": {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    "settledAt": {
                                      "anyOf": [
                                        {
                                          "type": "string",
                                          "format": "date-time"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "state",
                                    "amountUsdc",
                                    "transactionHash",
                                    "requestedAt",
                                    "settledAt"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "feeDay",
                            "recipientAddress",
                            "accruedUsdc",
                            "collectedUsdc",
                            "claimableUsdc",
                            "claim"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "venue",
                        "claim"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{externalUserId}/referrer": {
      "put": {
        "operationId": "setReferrer",
        "summary": "set referrer",
        "tags": [
          "Accounts and trading"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "accounts:write"
        ],
        "x-crisp-idempotency-required": true,
        "parameters": [
          {
            "name": "externalUserId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:-]{8,200}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "referrerExternalUserId": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
                  }
                },
                "required": [
                  "referrerExternalUserId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "externalUserId": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
                        },
                        "referrerExternalUserId": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
                        },
                        "created": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "externalUserId",
                        "referrerExternalUserId",
                        "created"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{externalUserId}/referral-earnings": {
      "get": {
        "operationId": "getReferralEarnings",
        "summary": "get referral earnings",
        "tags": [
          "Accounts and trading"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "fees:read"
        ],
        "x-crisp-idempotency-required": false,
        "parameters": [
          {
            "name": "externalUserId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "granularity",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "daily",
                "weekly",
                "monthly"
              ]
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 366,
              "default": 31
            },
            "style": "form",
            "explode": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "cadence": {
                          "type": "string"
                        },
                        "from": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "date"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "to": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "date"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "granularity": {
                          "type": "string"
                        },
                        "earnings": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "feeDay": {
                                "type": "string",
                                "format": "date"
                              },
                              "accruedUsdc": {
                                "type": "string",
                                "pattern": "^\\d+(?:\\.\\d+)?$",
                                "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                              },
                              "collectedUsdc": {
                                "type": "string",
                                "pattern": "^\\d+(?:\\.\\d+)?$",
                                "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                              },
                              "feeDayConcluded": {
                                "type": "boolean"
                              },
                              "claimableUsdc": {
                                "type": "string",
                                "pattern": "^\\d+(?:\\.\\d+)?$",
                                "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                              },
                              "claim": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "state": {
                                        "type": "string",
                                        "enum": [
                                          "queued",
                                          "submitting",
                                          "submitted",
                                          "settled",
                                          "manual_review"
                                        ]
                                      },
                                      "amountUsdc": {
                                        "type": "string",
                                        "pattern": "^\\d+(?:\\.\\d+)?$",
                                        "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                                      },
                                      "totalAmountUsdc": {
                                        "type": "string",
                                        "pattern": "^\\d+(?:\\.\\d+)?$",
                                        "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                                      },
                                      "transactionHash": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "state",
                                      "amountUsdc",
                                      "transactionHash"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "feeDay",
                              "accruedUsdc",
                              "collectedUsdc",
                              "feeDayConcluded",
                              "claimableUsdc",
                              "claim"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "series": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "periodStart": {
                                "type": "string",
                                "format": "date"
                              },
                              "accruedUsdc": {
                                "type": "string",
                                "pattern": "^\\d+(?:\\.\\d+)?$",
                                "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                              },
                              "collectedUsdc": {
                                "type": "string",
                                "pattern": "^\\d+(?:\\.\\d+)?$",
                                "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                              },
                              "claimableUsdc": {
                                "type": "string",
                                "pattern": "^\\d+(?:\\.\\d+)?$",
                                "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                              }
                            },
                            "required": [
                              "periodStart",
                              "accruedUsdc",
                              "collectedUsdc",
                              "claimableUsdc"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "levels": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "level": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "accruedUsdc": {
                                "type": "string",
                                "pattern": "^\\d+(?:\\.\\d+)?$",
                                "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                              }
                            },
                            "required": [
                              "level",
                              "accruedUsdc"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "claimEarnings": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "feeDay": {
                                "type": "string",
                                "format": "date"
                              },
                              "accruedUsdc": {
                                "type": "string",
                                "pattern": "^\\d+(?:\\.\\d+)?$",
                                "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                              },
                              "collectedUsdc": {
                                "type": "string",
                                "pattern": "^\\d+(?:\\.\\d+)?$",
                                "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                              },
                              "feeDayConcluded": {
                                "type": "boolean"
                              },
                              "claimableUsdc": {
                                "type": "string",
                                "pattern": "^\\d+(?:\\.\\d+)?$",
                                "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                              },
                              "claim": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "state": {
                                        "type": "string",
                                        "enum": [
                                          "queued",
                                          "submitting",
                                          "submitted",
                                          "settled",
                                          "manual_review"
                                        ]
                                      },
                                      "amountUsdc": {
                                        "type": "string",
                                        "pattern": "^\\d+(?:\\.\\d+)?$",
                                        "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                                      },
                                      "totalAmountUsdc": {
                                        "type": "string",
                                        "pattern": "^\\d+(?:\\.\\d+)?$",
                                        "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                                      },
                                      "transactionHash": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "state",
                                      "amountUsdc",
                                      "transactionHash"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "feeDay",
                              "accruedUsdc",
                              "collectedUsdc",
                              "feeDayConcluded",
                              "claimableUsdc",
                              "claim"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "cadence",
                        "from",
                        "to",
                        "granularity",
                        "earnings",
                        "series",
                        "levels",
                        "claimEarnings"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{externalUserId}/referral-summary": {
      "get": {
        "operationId": "getReferralSummary",
        "summary": "get referral summary",
        "tags": [
          "Accounts and trading"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "fees:read"
        ],
        "x-crisp-idempotency-required": false,
        "parameters": [
          {
            "name": "externalUserId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            },
            "style": "form",
            "explode": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "summary": {
                          "type": "object",
                          "properties": {
                            "accruedUsdc": {
                              "type": "string",
                              "pattern": "^\\d+(?:\\.\\d+)?$",
                              "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                            },
                            "claimableUsdc": {
                              "type": "string",
                              "pattern": "^\\d+(?:\\.\\d+)?$",
                              "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                            },
                            "pendingSettlementUsdc": {
                              "type": "string",
                              "pattern": "^\\d+(?:\\.\\d+)?$",
                              "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                            },
                            "payoutPendingUsdc": {
                              "type": "string",
                              "pattern": "^\\d+(?:\\.\\d+)?$",
                              "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                            },
                            "paidOutUsdc": {
                              "type": "string",
                              "pattern": "^\\d+(?:\\.\\d+)?$",
                              "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                            }
                          },
                          "required": [
                            "accruedUsdc",
                            "claimableUsdc",
                            "pendingSettlementUsdc",
                            "payoutPendingUsdc",
                            "paidOutUsdc"
                          ],
                          "additionalProperties": false
                        },
                        "payouts": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "state": {
                                "type": "string",
                                "enum": [
                                  "queued",
                                  "submitting",
                                  "submitted",
                                  "settled",
                                  "manual_review"
                                ]
                              },
                              "amountUsdc": {
                                "type": "string",
                                "pattern": "^\\d+(?:\\.\\d+)?$",
                                "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                              },
                              "transactionHash": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "feeDays": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "format": "date"
                                }
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "state",
                              "amountUsdc",
                              "transactionHash",
                              "feeDays",
                              "createdAt",
                              "updatedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "limit": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 200,
                          "default": 50
                        },
                        "offset": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "summary",
                        "payouts",
                        "limit",
                        "offset",
                        "hasMore"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{externalUserId}/referral-claims": {
      "post": {
        "operationId": "claimReferralRewards",
        "summary": "claim referral rewards",
        "tags": [
          "Accounts and trading"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "fees:write"
        ],
        "x-crisp-idempotency-required": true,
        "parameters": [
          {
            "name": "externalUserId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:@-]{1,200}$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:-]{8,200}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "all": {
                        "type": "boolean",
                        "enum": [
                          true
                        ]
                      }
                    },
                    "required": [
                      "all"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "feeDay": {
                        "type": "string",
                        "format": "date"
                      }
                    },
                    "required": [
                      "feeDay"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted; inspect lifecycle state. This is not proof of a fill or payout.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "claims": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "feeDay": {
                                    "type": "string",
                                    "format": "date"
                                  },
                                  "accruedUsdc": {
                                    "type": "string",
                                    "pattern": "^\\d+(?:\\.\\d+)?$",
                                    "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                                  },
                                  "collectedUsdc": {
                                    "type": "string",
                                    "pattern": "^\\d+(?:\\.\\d+)?$",
                                    "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                                  },
                                  "feeDayConcluded": {
                                    "type": "boolean"
                                  },
                                  "claimableUsdc": {
                                    "type": "string",
                                    "pattern": "^\\d+(?:\\.\\d+)?$",
                                    "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                                  },
                                  "claim": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "id": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "state": {
                                            "type": "string",
                                            "enum": [
                                              "queued",
                                              "submitting",
                                              "submitted",
                                              "settled",
                                              "manual_review"
                                            ]
                                          },
                                          "amountUsdc": {
                                            "type": "string",
                                            "pattern": "^\\d+(?:\\.\\d+)?$",
                                            "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                                          },
                                          "totalAmountUsdc": {
                                            "type": "string",
                                            "pattern": "^\\d+(?:\\.\\d+)?$",
                                            "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                                          },
                                          "transactionHash": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "state",
                                          "amountUsdc",
                                          "transactionHash"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "feeDay",
                                  "accruedUsdc",
                                  "collectedUsdc",
                                  "feeDayConcluded",
                                  "claimableUsdc",
                                  "claim"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "amountUsdc": {
                              "type": "string",
                              "pattern": "^\\d+(?:\\.\\d+)?$",
                              "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                            },
                            "dayCount": {
                              "type": "integer",
                              "minimum": 0
                            }
                          },
                          "required": [
                            "claims",
                            "amountUsdc",
                            "dayCount"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "claim": {
                              "type": "object",
                              "properties": {
                                "feeDay": {
                                  "type": "string",
                                  "format": "date"
                                },
                                "accruedUsdc": {
                                  "type": "string",
                                  "pattern": "^\\d+(?:\\.\\d+)?$",
                                  "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                                },
                                "collectedUsdc": {
                                  "type": "string",
                                  "pattern": "^\\d+(?:\\.\\d+)?$",
                                  "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                                },
                                "feeDayConcluded": {
                                  "type": "boolean"
                                },
                                "claimableUsdc": {
                                  "type": "string",
                                  "pattern": "^\\d+(?:\\.\\d+)?$",
                                  "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                                },
                                "claim": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        "state": {
                                          "type": "string",
                                          "enum": [
                                            "queued",
                                            "submitting",
                                            "submitted",
                                            "settled",
                                            "manual_review"
                                          ]
                                        },
                                        "amountUsdc": {
                                          "type": "string",
                                          "pattern": "^\\d+(?:\\.\\d+)?$",
                                          "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                                        },
                                        "totalAmountUsdc": {
                                          "type": "string",
                                          "pattern": "^\\d+(?:\\.\\d+)?$",
                                          "description": "Exact decimal string. Never use floating point for ledger arithmetic."
                                        },
                                        "transactionHash": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "state",
                                        "amountUsdc",
                                        "transactionHash"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "feeDay",
                                "accruedUsdc",
                                "collectedUsdc",
                                "feeDayConcluded",
                                "claimableUsdc",
                                "claim"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "claim"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/fee-program": {
      "get": {
        "operationId": "getFeeProgram",
        "summary": "get fee program",
        "tags": [
          "Partner"
        ],
        "security": [
          {
            "PartnerKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "x-crisp-scopes": [
          "fees:read"
        ],
        "x-crisp-idempotency-required": false,
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "program": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "version": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "effectiveAt": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "consentVersion": {
                                  "type": "string"
                                },
                                "totalFeeBps": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "chargeSides": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "enum": [
                                      "buy",
                                      "sell"
                                    ]
                                  }
                                },
                                "levels": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "recipient": {
                                        "type": "string",
                                        "enum": [
                                          "crisp_revenue",
                                          "partner_treasury",
                                          "referral"
                                        ]
                                      },
                                      "level": {
                                        "anyOf": [
                                          {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "bps": {
                                        "type": "integer",
                                        "minimum": 0
                                      }
                                    },
                                    "required": [
                                      "recipient",
                                      "level",
                                      "bps"
                                    ],
                                    "additionalProperties": false
                                  }
                                }
                              },
                              "required": [
                                "version",
                                "effectiveAt",
                                "consentVersion",
                                "totalFeeBps",
                                "chargeSides",
                                "levels"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "program"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not visible for this account. A recovery lookup miss is not proof that an in-flight submission failed.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect error.code and retain the original financial intent.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Optional bounded retry delay in seconds or HTTP-date."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "PartnerKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Crisp-Partner-Key"
      },
      "Timestamp": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Crisp-Timestamp"
      },
      "Nonce": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Crisp-Nonce"
      },
      "Signature": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Crisp-Signature"
      }
    }
  }
}
