{
    "openapi": "3.0.0",
    "info": {
        "title": "BitcoinVN API Documentation",
        "description": "API documentation of [**BitcoinVN**](/), the instant Bitcoin and Cryptocurrency Exchange in Vietnam.\n\n## Authentication\n\nPrivate endpoints require an `X-API-KEY` header. [Get an API key](/api-keys) or call `POST /api/register` to create an account and receive one.\n\nPublic endpoints do not require authentication.\n\n## Quick Start\n\n1. **Get exchange info** \u2014 `GET /api/info` returns all supported assets and transfer methods.\n2. **Create a quote** \u2014 `POST /api/quotes` with `depositMethod`, `settleMethod`, and either `depositAmount` or `settleAmount`. The quote locks the rate for 15 minutes.\n3. **Create an order** \u2014 `POST /api/orders` with the `quote` ID and your `settleData` (crypto address or bank details).\n4. **Send your deposit** \u2014 transfer funds to the address/account in the order's `depositData`.\n5. **Track the order** \u2014 `GET /api/orders/{shortId}` or listen to the `webhookUrl` callback for status updates.\n\n## Error Format\n\nAll error responses follow this shape:\n```json\n{\n  \"error\": {\n    \"message\": \"Human-readable description\",\n    \"code\": 400\n  }\n}\n```\n\n## Support\n\nJoin our [Developer Telegram Chat](https://t.me/bitcoinvn_dev) to get help.\n",
        "version": "1.1034"
    },
    "paths": {
        "/api/health": {
            "get": {
                "tags": [
                    "exchange"
                ],
                "summary": "Check health of exchange",
                "description": "Use this endpoint to see whether we're online.",
                "operationId": "get_chadshift_core_default_health.en",
                "responses": {
                    "200": {
                        "description": "Healthy",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "example": {
                                    "status": "ok"
                                }
                            }
                        }
                    }
                },
                "security": []
            }
        },
        "/api/info": {
            "get": {
                "tags": [
                    "exchange"
                ],
                "summary": "General information",
                "description": "Returns general information about currently supported assets and their networks, jointly called 'transfer methods'.",
                "operationId": "get_chadshift_core_default_info.en",
                "responses": {
                    "200": {
                        "description": "Info fetched",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Info"
                                }
                            }
                        }
                    }
                },
                "security": []
            }
        },
        "/api/pairs/{depositMethodId}/{settleMethodId}": {
            "get": {
                "tags": [
                    "exchange"
                ],
                "summary": "Get pair",
                "description": "Returns the current exchange rate, minimum deposit amount, and maximum deposit amount for a specific pair of transfer methods. Use transfer method IDs from `GET /api/info`.",
                "operationId": "get_chadshift_core_default_fetchpair.en",
                "parameters": [
                    {
                        "name": "depositMethodId",
                        "in": "path",
                        "description": "Transfer method ID for the deposit side (e.g. btc, eth, vnd)",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "example": "btc"
                    },
                    {
                        "name": "settleMethodId",
                        "in": "path",
                        "description": "Transfer method ID for the settlement side (e.g. vnd, btc, usdt_trc20)",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "example": "vnd"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Pair fetched",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Pair"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "One or both transfer method IDs are invalid"
                    }
                },
                "security": []
            }
        },
        "/api/ticker/{baseAssetId}/{quoteAssetId}": {
            "get": {
                "tags": [
                    "exchange"
                ],
                "summary": "Get ticker",
                "description": "Returns the current exchange rate and 24-hour trading volume for a pair of assets. Unlike `/api/pairs`, this uses asset IDs (e.g. BTC, VND) rather than transfer method IDs.",
                "operationId": "get_chadshift_core_default_fetchticker.en",
                "parameters": [
                    {
                        "name": "baseAssetId",
                        "in": "path",
                        "description": "Base asset ticker (e.g. BTC, ETH). Case-sensitive",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "example": "BTC"
                    },
                    {
                        "name": "quoteAssetId",
                        "in": "path",
                        "description": "Quote asset ticker (e.g. VND, USDT). The rate is expressed as 1 base = X quote",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "example": "VND"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Ticker fetched",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ticker"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "One or both asset IDs are invalid"
                    }
                },
                "security": []
            }
        },
        "/api/balances": {
            "get": {
                "tags": [
                    "account"
                ],
                "summary": "Fetch your balances",
                "description": "Returns your available balance for each holdable asset as a key-value map. Requires authentication.",
                "operationId": "get_chadshift_core_ledger_fetchbalances.en",
                "responses": {
                    "200": {
                        "description": "Balances fetched",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "example": {
                                    "BTC": 0.0007491,
                                    "VND": 20000000
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication required"
                    }
                },
                "security": [
                    {
                        "ApiKey": []
                    }
                ]
            }
        },
        "/api/balances/history": {
            "get": {
                "tags": [
                    "account"
                ],
                "summary": "Fetch ledger items",
                "description": "Returns a list of ledger item objects (25 per page).",
                "operationId": "get_chadshift_core_ledger_fetchhistory.en",
                "parameters": [
                    {
                        "name": "assetId",
                        "in": "query",
                        "description": "Filter by asset ticker (e.g. BTC, VND). Omit to see all assets",
                        "required": false,
                        "example": "BTC"
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page number for pagination (default: 1)",
                        "required": false,
                        "example": "1"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Ledger items fetched",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/LedgerItem"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication required"
                    },
                    "404": {
                        "description": "Invalid assetId"
                    }
                },
                "security": [
                    {
                        "ApiKey": []
                    }
                ]
            }
        },
        "/api/orders/{id}": {
            "get": {
                "tags": [
                    "orders"
                ],
                "summary": "Fetch order",
                "description": "Returns the full order object. Lookup is by `shortId` (8-character code, e.g. BV2MTZAF). Orders owned by another user require authentication as that user.",
                "operationId": "get_chadshift_core_order_fetchorder.en",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "The 8-character short ID of the order (e.g. BV2MTZAF)",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "example": "BV2MTZAF"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Order fetched",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Order"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Order not found"
                    }
                },
                "security": []
            }
        },
        "/api/orders": {
            "get": {
                "tags": [
                    "orders"
                ],
                "summary": "Fetch orders",
                "description": "Returns a paginated list of your orders (10 per page), sorted by creation date descending (newest first). Requires authentication.",
                "operationId": "get_chadshift_core_order_fetchorders.en",
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page number for pagination (default: 1)",
                        "required": false,
                        "example": "1"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Orders fetched",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/Order"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication required"
                    }
                },
                "security": [
                    {
                        "ApiKey": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "orders"
                ],
                "summary": "Create order",
                "description": "Creates a new order. If you don't provide a `quote`, then you will need to specify `depositMethod` and `settleMethod` instead.",
                "operationId": "post_chadshift_core_order_createorder.en",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "quote": {
                                        "title": "Quote ID",
                                        "description": "The `id` of your quote. If you don't provide this, you'll need to specify `depositMethod` and `settleMethod` instead.",
                                        "type": "string",
                                        "example": "883da606-9f68-11eb-8366-0242c0a83003"
                                    },
                                    "settleData": {
                                        "title": "Settle data",
                                        "description": "Data used for settling the order. Cryptocurrencies: `address`, `tag`, `invoice`. Bank transfers: `accountNumber`, `accountHolder`, `bank`, `note`.",
                                        "properties": {
                                            "address": {
                                                "description": "For cryptocurrency settlements.",
                                                "type": "string",
                                                "example": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa"
                                            },
                                            "destinationTag": {
                                                "description": "For XRP settlements.",
                                                "type": "string",
                                                "example": "123456"
                                            },
                                            "memo": {
                                                "description": "For XLM, ATOM settlements.",
                                                "type": "string",
                                                "example": "123456"
                                            },
                                            "accountNumber": {
                                                "description": "For VND bank transfer settlements.",
                                                "type": "string",
                                                "example": "1122334455"
                                            },
                                            "accountHolder": {
                                                "description": "For VND bank transfer settlements.",
                                                "type": "string",
                                                "example": "Satoshi Nakamoto"
                                            },
                                            "bank": {
                                                "description": "For VND bank transfer settlements. For all options, see `/api/info` (`transferMethods`.`vnd`.`details`.`banks`)",
                                                "type": "string",
                                                "example": "Vietcombank"
                                            }
                                        },
                                        "type": "object"
                                    },
                                    "webhookUrl": {
                                        "title": "Webhook URL",
                                        "description": "The URL we will make a POST request against on each order status transition. Body = Order JSON",
                                        "type": "string",
                                        "example": "https://example.com/my-webhook-url"
                                    },
                                    "referrer": {
                                        "title": "Referral code",
                                        "description": "You can pass along your referral code to earn a share on each completed order, or someone else's code.",
                                        "type": "string",
                                        "example": "QO264G"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Order created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Order"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Validation error \u2014 common causes: expired/invalid quote, missing settle data, amount below minimum or above maximum, KYC limit reached"
                    }
                },
                "security": []
            }
        },
        "/api/orders/{id}/settle-data": {
            "put": {
                "tags": [
                    "orders"
                ],
                "summary": "Update/fix settle data",
                "description": "Update the settlement (payout) data on an order that has status `settle_data_error`. For **crypto** settlements send `{\"address\": \"...\"}` (and optionally `destinationTag` or `memo`). For **bank** settlements send `{\"accountNumber\": \"...\", \"accountHolder\": \"...\", \"bank\": \"...\"}`.",
                "operationId": "put_chadshift_core_order_updatesettledata.en",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "The 8-character short ID of the order",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "example": "BV2MTZAF"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "address": {
                                        "description": "Crypto destination address",
                                        "type": "string",
                                        "example": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa"
                                    },
                                    "accountNumber": {
                                        "description": "Bank account number (VND)",
                                        "type": "string",
                                        "example": "1122334455"
                                    },
                                    "accountHolder": {
                                        "description": "Bank account holder name (VND)",
                                        "type": "string",
                                        "example": "Satoshi Nakamoto"
                                    },
                                    "bank": {
                                        "description": "Bank name (VND)",
                                        "type": "string",
                                        "example": "Vietcombank"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Order updated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Order"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Order not found or order is not in settle_data_error status"
                    }
                },
                "security": [
                    {
                        "ApiKey": []
                    }
                ]
            }
        },
        "/api/quotes": {
            "post": {
                "tags": [
                    "orders"
                ],
                "summary": "Create quote",
                "description": "Returns a quote. Each quote is binding and valid for 15 minutes. You can use the quote for creating orders. Provide either `depositAmount` or `settleAmount` (not both) to get a fixed-amount quote. Omit both for a variable-amount quote.",
                "operationId": "post_chadshift_core_quote_createquote.en",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/QuoteType"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Quote created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Quote"
                                }
                            }
                        }
                    }
                },
                "security": []
            }
        },
        "/api/verification/identity": {
            "post": {
                "tags": [
                    "account"
                ],
                "summary": "Submit identity KYC",
                "description": "Submit identity verification documents. Unlike other endpoints, this data must be submitted as **multipart/form-data** (not JSON) because it includes file uploads.",
                "operationId": "post_chadshift_core_kyc_identity_1.en",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/KycIdentityType"
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "Empty response when data submitted"
                    },
                    "403": {
                        "description": "Identity KYC already approved or pending review"
                    }
                },
                "security": [
                    {
                        "ApiKey": []
                    }
                ]
            }
        },
        "/api/verification/residence": {
            "post": {
                "tags": [
                    "account"
                ],
                "summary": "Submit residence KYC",
                "description": "Submit proof of residence documents. Unlike other endpoints, this data must be submitted as **multipart/form-data** (not JSON) because it includes file uploads.",
                "operationId": "post_chadshift_core_kyc_residence_1.en",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/KycResidenceType"
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "Empty response when data submitted"
                    },
                    "403": {
                        "description": "Residence KYC already approved or pending review"
                    }
                },
                "security": [
                    {
                        "ApiKey": []
                    }
                ]
            }
        },
        "/api/blacklist/categories": {
            "get": {
                "tags": [
                    "blacklist"
                ],
                "summary": "Get a list of your blacklist categories.",
                "operationId": "get_chadshift_common_blacklist_getblacklistcategories.en",
                "responses": {
                    "200": {
                        "description": "List of your blacklist categories."
                    }
                },
                "security": [
                    {
                        "ApiKey": []
                    }
                ]
            }
        },
        "/api/blacklist/categories/{categoryId}/entries": {
            "post": {
                "tags": [
                    "blacklist"
                ],
                "summary": "Create a blacklist entry",
                "operationId": "post_chadshift_common_blacklist_postblacklistentry.en",
                "parameters": [
                    {
                        "name": "categoryId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[13-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/BlackListEntryType"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Blacklist entry created.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/BlackListEntry"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "ApiKey": []
                    }
                ]
            }
        },
        "/api/blacklist/categories/{categoryId}/entries/bulk": {
            "post": {
                "tags": [
                    "blacklist"
                ],
                "summary": "Bulk create blacklist entries",
                "operationId": "post_chadshift_common_blacklist_postblacklistentrybulk.en",
                "parameters": [
                    {
                        "name": "categoryId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[13-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {},
                            "example": "[{\"type\": \"crypto_address\",\"identifier\": \"tb1qct7gxw0pn5d66tkj4as7tcktvqje3aesd5dezm\"}]"
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Blacklist entries created.",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "example": "[{\"type\": \"crypto_address\",\"identifier\": \"tb1qct7gxw0pn5d66tkj4as7tcktvqje3aesd5dezm\"}]"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "ApiKey": []
                    }
                ]
            }
        },
        "/api/blacklist/categories/{categoryId}/freezing-threshold": {
            "patch": {
                "tags": [
                    "blacklist"
                ],
                "summary": "Set freezing threshold on a blacklist category",
                "operationId": "patch_chadshift_common_blacklist_patchcategoryfreezingthreshold.en",
                "parameters": [
                    {
                        "name": "categoryId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[13-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "freezingThreshold": {
                                        "description": "Minimum order value (USD) below which blacklist matches are ignored. Null to clear.",
                                        "type": "number",
                                        "example": 100,
                                        "nullable": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Category freezing threshold updated."
                    }
                },
                "security": [
                    {
                        "ApiKey": []
                    }
                ]
            }
        },
        "/api/blacklist/categories/{categoryId}/entries/{entryId}/freezing-threshold": {
            "patch": {
                "tags": [
                    "blacklist"
                ],
                "summary": "Set freezing threshold on a blacklist entry",
                "operationId": "patch_chadshift_common_blacklist_patchentryfreezingthreshold.en",
                "parameters": [
                    {
                        "name": "categoryId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[13-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}"
                        }
                    },
                    {
                        "name": "entryId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[13-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "freezingThreshold": {
                                        "description": "Minimum order value (USD) below which this entry's match is ignored. Overrides category threshold. Null to clear.",
                                        "type": "number",
                                        "example": 50,
                                        "nullable": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Entry freezing threshold updated."
                    }
                },
                "security": [
                    {
                        "ApiKey": []
                    }
                ]
            }
        },
        "/api/register": {
            "post": {
                "tags": [
                    "account"
                ],
                "summary": "Create an account",
                "description": "Register a new account with email and password. Returns an API key that can be used for authenticated endpoints via the `X-API-KEY` header.",
                "operationId": "post_chadshift_common_registration_registration_1.en",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/RegistrationType"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Account created. Returns the API key.",
                        "content": {
                            "application/json": {
                                "schema": {},
                                "example": {
                                    "apiKey": "3b4c53474fc3d8f8b23652f42c074fe55616078c257cf75906acedb52cec2364"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Validation error \u2014 e.g. email already in use, password too short"
                    }
                },
                "security": []
            }
        },
        "/api/staking": {
            "get": {
                "tags": [
                    "staking"
                ],
                "summary": "Fetch staking offers",
                "description": "Returns a list of staking offer objects.",
                "operationId": "get_chadshift_vault_vault_index.en",
                "responses": {
                    "200": {
                        "description": "Staking offers fetched",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/Vault"
                                    }
                                }
                            }
                        }
                    }
                },
                "security": []
            }
        },
        "/api/staking/{id}/auto-stake": {
            "put": {
                "tags": [
                    "staking"
                ],
                "summary": "Enable/disable auto staking",
                "description": "Returns updated configuration.",
                "operationId": "put_chadshift_vault_vault_putautostake.en",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/BooleanConfigurationType"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Configuration updated.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/BooleanConfigurationType"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "ApiKey": []
                    }
                ]
            }
        },
        "/api/staking/{id}/notifications": {
            "put": {
                "tags": [
                    "staking"
                ],
                "summary": "Enable/disable notifications",
                "description": "Returns updated configuration.",
                "operationId": "put_chadshift_vault_vault_putnotification.en",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/BooleanConfigurationType"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Configuration updated.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/BooleanConfigurationType"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "ApiKey": []
                    }
                ]
            }
        }
    },
    "components": {
        "schemas": {
            "Error": {
                "properties": {
                    "error": {
                        "properties": {
                            "message": {
                                "description": "Human-readable error description",
                                "type": "string",
                                "example": "Pair does not exist."
                            },
                            "code": {
                                "description": "HTTP status code",
                                "type": "integer",
                                "example": 400
                            }
                        },
                        "type": "object"
                    }
                },
                "type": "object"
            },
            "Info": {
                "properties": {
                    "assets": {
                        "description": "Map of supported assets keyed by asset ID",
                        "type": "object"
                    },
                    "transferMethods": {
                        "description": "Map of supported transfer methods keyed by method ID",
                        "type": "object"
                    }
                },
                "type": "object"
            },
            "Pair": {
                "properties": {
                    "rate": {
                        "title": "Exchange rate including exchange fees",
                        "description": "Current exchange rate from deposit method to settle method, including all percentage-based fees",
                        "type": "float",
                        "default": 0,
                        "example": 100000000
                    },
                    "min": {
                        "title": "Minimum deposit amount",
                        "description": "Minimum deposit amount in the deposit asset",
                        "type": "float",
                        "default": 0,
                        "example": 0.0001
                    },
                    "max": {
                        "title": "Maximum deposit amount",
                        "description": "Maximum deposit amount in the deposit asset. Null means no maximum",
                        "type": "float",
                        "example": 1
                    }
                },
                "type": "object"
            },
            "Ticker": {
                "properties": {
                    "rate": {
                        "title": "Exchange rate including exchange fees",
                        "description": "Current exchange rate from base asset to quote asset, including exchange fees",
                        "type": "float",
                        "example": 100000000
                    },
                    "volume24h": {
                        "title": "24h volume denominated in currency specified by quote asset",
                        "description": "24-hour trading volume denominated in the quote asset",
                        "type": "float",
                        "example": 500000000
                    }
                },
                "type": "object"
            },
            "LedgerItem": {
                "properties": {
                    "id": {
                        "type": "string",
                        "example": "8120a8a8-8dd1-4168-80fc-c4d932ce5b93"
                    },
                    "asset": {
                        "description": "Asset ticker for this ledger entry",
                        "type": "string",
                        "example": "BTC"
                    },
                    "value": {
                        "description": "Amount credited (positive) or debited (negative)",
                        "type": "float",
                        "default": "0.0",
                        "example": 0.05
                    },
                    "note": {
                        "description": "Human-readable description of this ledger entry",
                        "type": "string",
                        "maxLength": 255,
                        "example": "Order settle BV2MTZAF"
                    },
                    "createdAt": {
                        "description": "Timestamp when this ledger entry was created (ISO 8601)",
                        "type": "string",
                        "example": "2023-04-10T10:00:00+00:00"
                    }
                },
                "type": "object"
            },
            "Order": {
                "properties": {
                    "id": {
                        "type": "string",
                        "example": "8120a8a8-8dd1-4168-80fc-c4d932ce5b93"
                    },
                    "shortId": {
                        "title": "The more commonly used unique identifier of an order.",
                        "description": "Unique 8-character order identifier used in URLs and lookups",
                        "type": "string",
                        "example": "BV2MTZAF"
                    },
                    "customOrderId": {
                        "title": "Custom order ID specified by the client.",
                        "description": "Optional client-defined identifier for this order (max 64 chars, unique per user)",
                        "type": "string",
                        "maxLength": 64,
                        "example": "Rent payment October"
                    },
                    "status": {
                        "title": "Current status of the order.",
                        "description": "Current order status. new=awaiting deposit, pending=deposit seen, processing=settlement in progress, completed=done, canceled=expired or refunded, settle_data_error=invalid payout details, on_hold=manual review",
                        "type": "string",
                        "default": "new",
                        "enum": [
                            "new",
                            "pending",
                            "settle_data_error",
                            "on_hold",
                            "processing",
                            "completed",
                            "canceled"
                        ],
                        "example": "new"
                    },
                    "depositMethod": {
                        "description": "Transfer method ID for the deposit side (what you send)",
                        "type": "string",
                        "example": "btc"
                    },
                    "depositAsset": {
                        "description": "Asset ticker of the deposit currency",
                        "type": "string",
                        "example": "BTC"
                    },
                    "depositAmount": {
                        "description": "Amount to deposit. Null for variable-amount orders",
                        "type": "float",
                        "example": 0.1
                    },
                    "depositFee": {
                        "title": "Deposit fee and network fee of deposit method combined.",
                        "description": "Total deposit-side fee (deposit fee + network fee combined)",
                        "type": "float",
                        "default": "0.0",
                        "example": 0.001
                    },
                    "depositData": {
                        "description": "Where to send your deposit. For crypto: contains `address` (and optionally `memo` or `destinationTag`). For fiat: contains bank details",
                        "type": "json",
                        "default": [],
                        "example": {
                            "address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa"
                        }
                    },
                    "depositRefundData": {
                        "title": "This is where we would send your refund if we cannot complete your order.",
                        "description": "Refund address if the order cannot be completed. Crypto only",
                        "type": "json",
                        "example": {
                            "address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa"
                        }
                    },
                    "depositTxns": {
                        "description": "Transaction IDs of incoming deposits",
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "default": [],
                        "example": [
                            "e3b0c44298fc1c149afbf4c8996fb924"
                        ]
                    },
                    "settleMethod": {
                        "description": "Transfer method ID for the settlement side (what you receive)",
                        "type": "string",
                        "example": "vnd"
                    },
                    "settleAsset": {
                        "description": "Asset ticker of the settlement currency",
                        "type": "string",
                        "example": "VND"
                    },
                    "settleAmount": {
                        "description": "Amount you will receive after fees",
                        "type": "float",
                        "example": 10000000
                    },
                    "settleFee": {
                        "title": "Settle fee and network fee of settle method combined.",
                        "description": "Total settlement-side fee (settle fee + network fee combined)",
                        "type": "float",
                        "default": "0.0",
                        "example": 25000
                    },
                    "settleData": {
                        "description": "Destination for settlement. For crypto: `address` (and optionally `memo`/`destinationTag`). For bank: `bank`, `accountNumber`, `accountHolder`",
                        "type": "json",
                        "default": [],
                        "example": {
                            "bank": "Vietcombank",
                            "accountHolder": "Satoshi Nakamoto",
                            "accountNumber": "000001"
                        }
                    },
                    "settleTxns": {
                        "description": "Transaction IDs of outgoing settlement payments",
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "default": [],
                        "example": [
                            "a1b2c3d4e5f6"
                        ]
                    },
                    "settleReceiptUrl": {
                        "description": "URL of the settlement receipt or proof of payment",
                        "type": "string",
                        "example": "https://example.com/receipt.jpg"
                    },
                    "rate": {
                        "title": "The exchange rate, including all percentage-based fees.",
                        "description": "Final exchange rate including all percentage-based fees",
                        "type": "float",
                        "example": 100000000
                    },
                    "depositMin": {
                        "title": "The minimum amount that needs to be deposited.",
                        "description": "Minimum deposit amount required for this order",
                        "type": "float",
                        "default": "0.0",
                        "example": 5.0e-5
                    },
                    "depositMax": {
                        "title": "The maximum amount that can be deposited. This is a soft limit unless determined by KYC policies.",
                        "description": "Maximum deposit amount allowed. Soft limit unless enforced by KYC",
                        "type": "float",
                        "example": 1
                    },
                    "createdAt": {
                        "description": "Timestamp when the order was created (ISO 8601)",
                        "type": "string",
                        "example": "2023-04-10T10:00:00+00:00"
                    },
                    "expiresAt": {
                        "title": "The time at which the order will be canceled if no deposit has been sent.",
                        "description": "Deadline for receiving the deposit. Order is canceled after this time if no deposit is received",
                        "type": "string",
                        "example": "2023-04-17T10:00:00+00:00"
                    },
                    "quote": {
                        "$ref": "#/components/schemas/Quote"
                    },
                    "adminMessage": {
                        "description": "Message from the exchange operator, if any (e.g. reason for hold)",
                        "type": "string",
                        "example": null
                    }
                },
                "type": "object"
            },
            "QuoteType": {
                "required": [
                    "depositMethod",
                    "settleMethod"
                ],
                "properties": {
                    "depositMethod": {
                        "description": "Specify how you would like to fund your order.",
                        "type": "string",
                        "example": "btc"
                    },
                    "depositAmount": {
                        "description": "The amount you want to deposit. If your payment amount deviates from this, the quote might not be accepted.",
                        "type": "number",
                        "example": 1.5
                    },
                    "settleMethod": {
                        "description": "Specify how you would like to receive your settlement.",
                        "type": "string",
                        "example": "vnd"
                    },
                    "settleAmount": {
                        "description": "The amount you want to receive.",
                        "type": "number",
                        "example": null
                    }
                },
                "type": "object"
            },
            "Quote": {
                "required": [
                    "depositMethod",
                    "settleMethod"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "example": "8120a8a8-8dd1-4168-80fc-c4d932ce5b93"
                    },
                    "depositAmount": {
                        "description": "Amount to deposit. Provide either this or settleAmount when creating a quote",
                        "type": "float",
                        "example": 0.1
                    },
                    "depositFee": {
                        "description": "Fee deducted from the deposit side",
                        "type": "float",
                        "default": "0.0",
                        "example": 0.001
                    },
                    "depositMethod": {
                        "description": "Transfer method ID for the deposit side",
                        "type": "string",
                        "example": "btc"
                    },
                    "settleAmount": {
                        "description": "Amount you will receive. Provide either this or depositAmount when creating a quote",
                        "type": "float",
                        "example": 10000000
                    },
                    "settleFee": {
                        "description": "Fee deducted from the settlement side",
                        "type": "float",
                        "default": "0.0",
                        "example": 25000
                    },
                    "settleMethod": {
                        "description": "Transfer method ID for the settlement side",
                        "type": "string",
                        "example": "vnd"
                    },
                    "rate": {
                        "description": "Locked exchange rate including all percentage-based fees",
                        "type": "float",
                        "default": "0.0",
                        "example": 100000000
                    },
                    "rawRate": {
                        "description": "Raw market rate before fees are applied",
                        "type": "float",
                        "example": 102000000
                    },
                    "createdAt": {
                        "description": "Timestamp when the quote was created (ISO 8601)",
                        "type": "string",
                        "example": "2023-04-10T10:00:00+00:00"
                    },
                    "expiresAt": {
                        "description": "Quote expires at this time. After expiry the rate is no longer guaranteed",
                        "type": "string",
                        "example": "2023-04-10T10:15:00+00:00"
                    },
                    "accepted": {
                        "description": "Whether this quote has been used to create an order",
                        "type": "boolean",
                        "default": false,
                        "example": false
                    },
                    "markupRate": {
                        "description": "Optional markup rate applied on top of the base exchange fee",
                        "type": "float",
                        "example": 0.01
                    }
                },
                "type": "object"
            },
            "KycIdentityType": {
                "required": [
                    "nationality",
                    "fullName",
                    "sex",
                    "birthdate",
                    "identityDocumentNumber",
                    "identityImage1File",
                    "identityImage2File"
                ],
                "properties": {
                    "nationality": {
                        "type": "string",
                        "example": "VN"
                    },
                    "fullName": {
                        "type": "string",
                        "example": "Satoshi Nakamoto"
                    },
                    "sex": {
                        "type": "string",
                        "example": "m"
                    },
                    "birthdate": {
                        "type": "string",
                        "example": "1970-01-01"
                    },
                    "identityDocumentNumber": {
                        "type": "string",
                        "example": "1283891023"
                    },
                    "identityImage1File": {
                        "type": "file"
                    },
                    "identityImage2File": {
                        "type": "file"
                    }
                },
                "type": "object"
            },
            "KycResidenceType": {
                "required": [
                    "residenceAddress",
                    "residenceCity",
                    "residenceCountry",
                    "residenceImage1File"
                ],
                "properties": {
                    "residenceAddress": {
                        "type": "string",
                        "example": "\u0110\u01b0\u1eddng Qu\u1ed1c l\u1ed9 1A"
                    },
                    "residenceCity": {
                        "type": "string",
                        "example": "Thuan Nam"
                    },
                    "residenceCountry": {
                        "type": "string",
                        "example": "VN"
                    },
                    "residenceImage1File": {
                        "type": "file"
                    }
                },
                "type": "object"
            },
            "BlackListEntryType": {
                "required": [
                    "type",
                    "identifier"
                ],
                "properties": {
                    "type": {
                        "type": "string",
                        "enum": [
                            "crypto_address",
                            "ip_address"
                        ]
                    },
                    "identifier": {
                        "type": "string",
                        "example": "tb1qct7gxw0pn5d66tkj4as7tcktvqje3aesd5dezm"
                    },
                    "freezingThreshold": {
                        "type": "number"
                    }
                },
                "type": "object"
            },
            "BlackListEntry": {
                "required": [
                    "identifier"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "example": "8120a8a8-8dd1-4168-80fc-c4d932ce5b93"
                    },
                    "type": {
                        "type": "string"
                    },
                    "identifier": {
                        "description": "Blacklisted identifier (address or IP)",
                        "type": "string",
                        "maxLength": 255,
                        "example": "tb1qct7gxw0pn5d66tkj4as7tcktvqje3aesd5dezm"
                    },
                    "freezingThreshold": {
                        "type": "number",
                        "format": "float"
                    }
                },
                "type": "object"
            },
            "RegistrationType": {
                "required": [
                    "email",
                    "type"
                ],
                "properties": {
                    "email": {
                        "type": "string"
                    },
                    "plainPassword": {
                        "type": "string",
                        "format": "password"
                    },
                    "type": {
                        "type": "string",
                        "enum": [
                            "individual",
                            "business"
                        ]
                    },
                    "optedIntoNewsletter": {
                        "type": "boolean"
                    }
                },
                "type": "object"
            },
            "Vault": {
                "properties": {
                    "id": {
                        "type": "string",
                        "example": "8120a8a8-8dd1-4168-80fc-c4d932ce5b93"
                    },
                    "asset": {
                        "type": "string",
                        "example": "sBCH"
                    },
                    "distribution": {
                        "description": "The share of exchange volume that will be rewarded to the stakers.",
                        "type": "float",
                        "default": 0,
                        "example": 0.005
                    },
                    "supplyTarget": {
                        "title": "Threshold at which no further funds can be staked.",
                        "type": "float",
                        "default": "0.0",
                        "example": 200
                    },
                    "staked": {
                        "title": "Total amount staked.",
                        "type": "float",
                        "default": "0.0",
                        "example": 99
                    },
                    "tvl": {
                        "title": "Total value locked in USD.",
                        "type": "float",
                        "default": 0,
                        "example": 5001.2
                    },
                    "unstakingFee": {
                        "type": "float",
                        "default": 0,
                        "example": 0.005
                    },
                    "latestApr": {
                        "type": "float",
                        "default": 0,
                        "example": 0.31
                    },
                    "lastestFullyDilutedApr": {
                        "type": "float",
                        "default": 0,
                        "example": 0.06
                    }
                },
                "type": "object"
            },
            "BooleanConfigurationType": {
                "required": [
                    "value"
                ],
                "properties": {
                    "value": {
                        "type": "boolean"
                    }
                },
                "type": "object"
            }
        },
        "securitySchemes": {
            "ApiKey": {
                "type": "apiKey",
                "description": "API key authentication. Go to /api-keys to get a key.",
                "name": "X-API-KEY",
                "in": "header"
            }
        }
    },
    "security": [
        {
            "ApiKey": []
        }
    ],
    "tags": [
        {
            "name": "exchange",
            "description": "Public endpoints \u2014 no authentication required. Use these to discover supported assets, get exchange rates, and check service health."
        },
        {
            "name": "account",
            "description": "Endpoints for managing your account"
        },
        {
            "name": "orders",
            "description": "Endpoints for (crypto) currency exchange"
        },
        {
            "name": "blacklist",
            "description": "Endpoints for trusted partners for managing blacklist entries."
        },
        {
            "name": "staking",
            "description": "Endpoints related to our staking program"
        }
    ]
}