From 73cf0ffeb8697433ae745d4ef9a0a3e915304fc1 Mon Sep 17 00:00:00 2001 From: whitebit-robot Date: Tue, 3 Feb 2026 18:13:23 +0200 Subject: [PATCH 01/84] DR-57: document missing stopOnFail for v4 order bulk endpoint --- openapi/private/http-trade-v4.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/openapi/private/http-trade-v4.yaml b/openapi/private/http-trade-v4.yaml index d81d761..24399b7 100644 --- a/openapi/private/http-trade-v4.yaml +++ b/openapi/private/http-trade-v4.yaml @@ -1797,7 +1797,14 @@ paths: $ref: '#/components/schemas/BulkOrderItem' stopOnFail: type: boolean - description: "If true, stops processing remaining orders when one fails" + default: false + description: | + Controls how the bulk order processor handles failures. + + When true: Processing stops at the first order that fails validation or execution. Only orders up to (but not including) the failed order are processed. + + When false (default): All orders in the bulk request are processed regardless of individual failures. Each order result is returned in the response array. + request: type: string nonce: From 2ea04aaa05d51c51068bdb019133e2ed9463dd7f Mon Sep 17 00:00:00 2001 From: whitebit-robot Date: Thu, 5 Feb 2026 16:11:54 +0200 Subject: [PATCH 02/84] DR-63: documented stopOnFail behavior for collateral bulk limit order according to the DR-57 task. --- openapi/private/http-trade-v4.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/openapi/private/http-trade-v4.yaml b/openapi/private/http-trade-v4.yaml index 24399b7..0417608 100644 --- a/openapi/private/http-trade-v4.yaml +++ b/openapi/private/http-trade-v4.yaml @@ -221,6 +221,13 @@ paths: type: object stopOnFail: type: boolean + default: false + description: | + Controls how the bulk order processor handles failures. + + When true: Processing stops at the first order that fails validation or execution. Only orders up to (but not including) the failed order are processed. + + When false (default): All orders in the bulk request are processed regardless of individual failures. Each order result is returned in the response array. request: type: string nonce: From d563a07a4e038da1136276d03508cff4716d55bf Mon Sep 17 00:00:00 2001 From: whitebit-robot Date: Thu, 5 Feb 2026 16:59:20 +0200 Subject: [PATCH 03/84] DR-52: Changed Withdrawal and Deposit Status from Frozen to Additional data required in API documentation. File main_api_v4.yaml. --- openapi/private/main_api_v4.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openapi/private/main_api_v4.yaml b/openapi/private/main_api_v4.yaml index cc5e51a..aec9b5b 100644 --- a/openapi/private/main_api_v4.yaml +++ b/openapi/private/main_api_v4.yaml @@ -1314,7 +1314,7 @@ paths: - `Successful` - 3, 7 - `Canceled` - 4, 9 - `Unconfirmed by user` - 5 - - `Frozen` - 21 + - `Additional data required` - 21 - `Uncredited` - 22 - `Pending` - 15 @@ -1329,7 +1329,7 @@ paths: - `Successful` - 3, 7 - `Canceled` - 4 - `Unconfirmed by user` - 5 - - `Frozen` - 21 + - `Additional data required` - 21 - `Partially successful` - 18 From ed6e7544587c563925e2bc2276407a5892e5297c Mon Sep 17 00:00:00 2001 From: whitebit-robot Date: Thu, 5 Feb 2026 17:49:20 +0200 Subject: [PATCH 04/84] DR-37: Updated the status code from 201 to 200 in JWT token endpoint. File main_api_v4.yaml. --- openapi/private/main_api_v4.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openapi/private/main_api_v4.yaml b/openapi/private/main_api_v4.yaml index cc5e51a..c3d5f4f 100644 --- a/openapi/private/main_api_v4.yaml +++ b/openapi/private/main_api_v4.yaml @@ -494,7 +494,7 @@ paths: nonceWindow: false nonce: "{{nonce}}" responses: - "201": + "200": description: Validation succeeded and JWT token is returned content: application/json: From 74cf6b6f876ee7c1717a0fefdb5f323df4749946 Mon Sep 17 00:00:00 2001 From: whitebit-robot Date: Wed, 11 Feb 2026 16:55:19 +0100 Subject: [PATCH 05/84] DR-68 AI base setup was added; --- README.md | 59 ++++++++++++++++++++++--------------------------------- 1 file changed, 24 insertions(+), 35 deletions(-) diff --git a/README.md b/README.md index 22c4fb9..8434d9e 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,34 @@ Official documentation for WhiteBIT's REST and WebSocket APIs, built with Mintlify. +## Prerequisites + +Before you begin, make sure the following tools are installed on your machine: + +| Tool | Minimum Version | Installation | +|------|----------------|--------------| +| [Node.js](https://nodejs.org/) | v18+ | [Download](https://nodejs.org/en/download/) or use [nvm](https://github.com/nvm-sh/nvm) | +| npm | v9+ (ships with Node.js) | Included with Node.js | +| [Mintlify CLI](https://mintlify.com/docs/development) | latest | `npm install -g mintlify@latest` | +| [Redocly CLI](https://redocly.com/docs/cli/) | latest | `npm install -g @redocly/cli@latest` | +| [AsyncAPI CLI](https://www.asyncapi.com/tools/cli) | latest | `npm install -g @asyncapi/cli` | + +Verify your setup: + +```bash +node --version # Should print v18.x or higher +npm --version # Should print 9.x or higher +mint --version # Mintlify CLI +redocly --version # Redocly CLI +asyncapi --version # AsyncAPI CLI +``` + ## Quick Start Get the documentation running locally in 2 minutes: ```bash -# Install Mintlify CLI +# Install Mintlify CLI (if not already installed) npm install -g mintlify@latest # Start dev server @@ -16,19 +38,6 @@ mint dev # Open http://localhost:3000 ``` -**Full setup instructions** → [Validation Guide](docs/reference/validation.md) - -## Documentation Tasks - -Contributing to the API docs? Choose your task: - -### Common Tasks -- **[Adding Parameters](docs/guides/01-adding-parameters.md)** - Add query, body, or WebSocket parameters -- **[Adding Descriptions](docs/guides/02-adding-descriptions.md)** - Write endpoint overviews and descriptions -- **[Parameter Exceptions](docs/guides/03-parameter-exceptions.md)** - Document optional, conditional, or exclusive parameters -- **[Documenting Errors](docs/guides/04-documenting-errors.md)** - Add error codes and error responses -- **[Adding New Endpoints](docs/guides/05-adding-new-endpoints.md)** - Complete workflow for new REST or WebSocket endpoints - ## Contributing See **[CONTRIBUTING.md](CONTRIBUTING.md)** for: @@ -37,16 +46,7 @@ See **[CONTRIBUTING.md](CONTRIBUTING.md)** for: - Pull request process - Review checklists for tech writers, DevRel engineers, and developers -## Reference Documentation - -### Quick Access -- **[File Structure Decision Tree](docs/reference/file-structure.md)** - Which file should I edit? -- **[Style Guide](docs/reference/style-guide.md)** - Writing standards and best practices -- **[Quick Reference](docs/reference/quick-reference.md)** - Tables, patterns, error codes -- **[Common Pitfalls](docs/reference/common-pitfalls.md)** - Avoid frequent mistakes -- **[Validation Guide](docs/reference/validation.md)** - Local dev environment and testing - -### External Resources +## External Resources - [OpenAPI 3.0.3 Specification](https://spec.openapis.org/oas/v3.0.3.html) - [AsyncAPI 3.0.0 Specification](https://www.asyncapi.com/docs/reference/specification/v3.0.0) - [Mintlify Documentation](https://mintlify.com/docs) @@ -63,9 +63,6 @@ mintlify-docs/ │ └── private/ # Private channels ├── public/ # MDX docs for public APIs ├── private/ # MDX docs for private APIs -├── docs/ # Internal documentation -│ ├── guides/ # Step-by-step task guides -│ └── reference/ # Reference materials └── docs.json # Navigation configuration ``` @@ -73,11 +70,9 @@ mintlify-docs/ **For technical questions**: - Check existing similar endpoints in the codebase -- See [Validation Guide](docs/reference/validation.md) - Search OpenAPI/AsyncAPI specifications **For style questions**: -- Consult [Style Guide](docs/reference/style-guide.md) - Ask tech writer team lead - Check [glossary](/glossary.mdx) for terminology @@ -106,10 +101,4 @@ find asyncapi -name "*.yaml" -exec asyncapi validate {} \; mint dev ``` -See [Validation Guide](docs/reference/validation.md) for detailed instructions. - --- - -**Last Updated**: 2026-01-30 -**Maintainers**: Technical Writing Team, DevRel Team -**Questions?**: Contact team leads or post in #documentation-help From c2549fbc8272fe92683f988196e708d9c4af303f Mon Sep 17 00:00:00 2001 From: whitebit-robot Date: Thu, 12 Feb 2026 08:44:19 +0100 Subject: [PATCH 06/84] SME questions was marked as a required step; clean up logic was added; From c74890ba91f3651445c92b860364776e4c6f6e5f Mon Sep 17 00:00:00 2001 From: whitebit-robot Date: Thu, 12 Feb 2026 11:23:58 +0100 Subject: [PATCH 07/84] A review pipeline and glossary style guides were added. From 805e666b0243f2d46b54649a7233ce63b949f16f Mon Sep 17 00:00:00 2001 From: whitebit-robot Date: Thu, 12 Feb 2026 12:24:35 +0200 Subject: [PATCH 08/84] DR-64: document RPI visibility, IOC incompatibility, and sub-account fee behavior --- asyncapi/private/orders_executed.yaml | 3 +- asyncapi/private/orders_pending.yaml | 3 +- docs.json | 3 +- glossary.mdx | 74 +++++++------ guides/order-parameter-rules.mdx | 25 +++++ openapi/private/http-trade-v4.yaml | 152 ++++++++++++++++++++++---- openapi/public/http-v4.yaml | 7 +- private/websocket/orders-executed.mdx | 3 + private/websocket/orders-pending.mdx | 3 + public/http-v4/depth.mdx | 4 + public/http-v4/orderbook.mdx | 3 + public/websocket/book-ticker.mdx | 21 ++++ public/websocket/depth.mdx | 9 +- public/websocket/trades.mdx | 9 +- 14 files changed, 257 insertions(+), 62 deletions(-) create mode 100644 guides/order-parameter-rules.mdx diff --git a/asyncapi/private/orders_executed.yaml b/asyncapi/private/orders_executed.yaml index 6ac59dc..1cc2095 100644 --- a/asyncapi/private/orders_executed.yaml +++ b/asyncapi/private/orders_executed.yaml @@ -463,7 +463,8 @@ components: description: "Position side - LONG or SHORT or BOTH" rpi: type: boolean - description: "RPI order flag" + description: "Indicates Retail Price Improvement (RPI) mode for the order." + example: true fee_asset: type: string description: "Fee asset type" diff --git a/asyncapi/private/orders_pending.yaml b/asyncapi/private/orders_pending.yaml index e6a8431..7eb0da3 100644 --- a/asyncapi/private/orders_pending.yaml +++ b/asyncapi/private/orders_pending.yaml @@ -447,7 +447,8 @@ components: description: "Position side - LONG or SHORT or BOTH" rpi: type: boolean - description: "RPI order flag" + description: "Indicates Retail Price Improvement (RPI) mode for the order." + example: true UnsubscribeRequest: type: object diff --git a/docs.json b/docs.json index 1c41afc..5bcd4d0 100644 --- a/docs.json +++ b/docs.json @@ -334,7 +334,8 @@ "group": "Guides", "pages": [ "guides/client-order-id", - "guides/fireblocks" + "guides/fireblocks", + "guides/order-parameter-rules" ] }, "sdks", diff --git a/glossary.mdx b/glossary.mdx index b83ca75..664d14f 100644 --- a/glossary.mdx +++ b/glossary.mdx @@ -312,54 +312,65 @@ Is the number of digits to the right of the decimal point ## Q ## R + + + Retail Price Improvement (RPI) defines a limit order mode that improves execution for retail users and keeps the order out of public market data feeds. -## S + **Visibility** - - + Public `depth` and `bookTicker` feeds exclude RPI orders in both WebSocket and REST responses. Private active order endpoints and private WebSocket streams return RPI orders. The exchange UI order book (web and mobile) displays RPI orders. -See [Crypto Lending](#crypto-lending) - + **IOC compatibility** - + RPI orders use post-only behavior by design. An RPI order does not support the IOC flag. The API returns error code `37` when a request sets both `rpi=true` and `ioc=true`. -See [Crypto Lending](#crypto-lending) - - - - -Self Trade Prevention (STP) is a mechanism that prevents traders from executing trades against their own [orders](#orders). This feature helps avoid unintentional self-trading and ensures market integrity by automatically canceling or modifying orders that would result in a self-match. - + **Fees** - + RPI executions apply a specific fee or rebate model defined for the account. When a user trades through a sub-account, the system applies the effective sub-account fee configuration. Use the `Query Market Fee` or `Query All Market Fees` endpoints to retrieve effective fees. + + +## S -Buying and selling [assets](#assets) for immediate settlement - + + + See [Crypto Lending](#crypto-lending) + - + + See [Crypto Lending](#crypto-lending) + -[Asset](#assets) that can be traded on an exchange. - + + Self Trade Prevention (STP) is a mechanism that prevents traders from executing trades against their own [orders](#orders). This feature helps avoid unintentional self-trading and ensures market integrity by automatically canceling or modifying orders that would result in a self-match. + - + + Buying and selling [assets](#assets) for immediate settlement + -This [order](#orders) has both the [stop](#stop-price) and the limit prices. When the specified market price at this [pair](#market) is reached the order gets activated and is being completed as a basic [limit order](#limit-order). - + + [Asset](#assets) that can be traded on an exchange. + - + + This [order](#orders) has both the [stop](#stop-price) and the limit prices. When the specified market price at this [pair](#market) is reached the order gets activated and is being completed as a basic [limit order](#limit-order). + -This [order](#orders) is completed when the market price reaches a price set by you in advance (the [stop price](#stop-price)). This type of order is often used to prevent losses in the context of market volatility. - + + This [order](#orders) is completed when the market price reaches a price set by you in advance (the [stop price](#stop-price)). This type of order is often used to prevent losses in the context of market volatility. + - + + A price set by you in advance + -A price set by you in advance - + + A sub-account is an account managed by a main account. A main account assigns specific permissions to a sub-account (for example, a main account disables [margin trading](#margin-trading)). - + A sub-account can use a custom trading fee or rebate model defined for that sub-account. Use [`Query Market Fee`](/private/http-trade-v4/query-market-fee) and [`Query All Market Fees`](/private/http-trade-v4/query-all-market-fees) to retrieve effective fees when an API key belongs to a sub-account. -Account (user) with specific permissions (for example disable [margin trading](#margin-trading)) is managed by main user - + RPI trading uses account-specific fees or rebates. When a user places RPI orders through a sub-account, the system applies the effective sub-account fees. Use [`Query Market Fee`](/private/http-trade-v4/query-market-fee) and [`Query All Market Fees`](/private/http-trade-v4/query-all-market-fees) to verify fees for RPI executions. + ## T @@ -404,7 +415,6 @@ The total number of shares or contracts exchanged between buyers and sellers of ## W - Easy and free way to turn your funds into a unique alphanumeric code. diff --git a/guides/order-parameter-rules.mdx b/guides/order-parameter-rules.mdx new file mode 100644 index 0000000..ff5fe89 --- /dev/null +++ b/guides/order-parameter-rules.mdx @@ -0,0 +1,25 @@ +--- +title: "Order Parameter Rules" +description: "Defines unsupported parameter combinations for order requests and explains related validation errors." +--- +## Overview + +This guide describes parameter combinations that the API does not support and explains how to resolve related errors. + +--- + +## Retail Price Improvement (RPI) and IOC + +RPI orders use post-only behavior by design. An RPI order does not support the IOC flag. + +### Issue + +A request sets both `rpi=true` and `ioc=true`. + +### Result + +The API rejects the request and returns error code `37`. + +### Fix + +Remove `ioc` when using `rpi`, or disable `rpi` when IOC behavior is required. diff --git a/openapi/private/http-trade-v4.yaml b/openapi/private/http-trade-v4.yaml index 24399b7..f868a09 100644 --- a/openapi/private/http-trade-v4.yaml +++ b/openapi/private/http-trade-v4.yaml @@ -121,13 +121,19 @@ paths: For open long position you have to use **buy**, for short **sell**. Also to close current position you have to place opposite order with current position amount. + + + - RPI orders are post-only by design and cannot be used with the IOC flag. The API returns error code `37` when both `rpi=true` and `ioc=true` are used. + + - - `30` - default validation error code - - `31` - market validation failed - - `32` - amount validation failed - - `33` - price validation failed - - `36` - clientOrderId validation failed + - `30` - default validation error code + - `31` - market validation failed + - `32` - amount validation failed + - `33` - price validation failed + - `36` - clientOrderId validation failed + - `37` - `ioc=true` cannot be used with `postOnly=true` or `rpi=true` tags: - Collateral Trading @@ -175,6 +181,13 @@ paths: ioc: type: boolean description: "An immediate or cancel order (IOC) is an order that attempts to execute all or part immediately and then cancels any unfilled portion." + rpi: + type: boolean + description: | + Enables Retail Price Improvement (RPI) mode. + + RPI orders are post-only by design and cannot be used with `ioc=true`. The API returns error code `37` when both `rpi=true` and `ioc=true` are used. + example: true positionSide: type: string enum: [long, short, both] @@ -219,6 +232,51 @@ paths: type: array items: type: object + properties: + market: + type: string + description: "Available margin [market](/glossary#market). Example: BTC_USDT" + side: + type: string + enum: [buy, sell] + description: "Order type. Variables: 'buy' / 'sell'." + amount: + type: string + description: "Amount of [stock](/glossary#stock) currency to buy or sell." + price: + type: string + description: "Price in [money](/glossary#money) currency." + clientOrderId: + type: string + description: "Identifier must be unique and contain letters, numbers, dashes, dots, or underscores." + stopLoss: + type: string + description: "Stop loss price. Creates an [OTO](/glossary#OTO) order with stop loss." + takeProfit: + type: string + description: "Take profit price. Creates an [OTO](/glossary#OTO) order with take profit." + postOnly: + type: boolean + description: "Ensures the order adds liquidity and executes as maker." + ioc: + type: boolean + description: | + Immediate-or-cancel (IOC) executes all or part of an order immediately and cancels any unfilled portion. + + IOC does not support `rpi=true` because RPI uses post-only behavior by design. + The API returns error code `37` when an order item sets both `ioc=true` and `rpi=true`. + rpi: + type: boolean + description: | + Enables Retail Price Improvement (RPI) mode. + + RPI orders use post-only behavior by design. An RPI order does not support `ioc=true`. + The API returns error code `37` when an order item sets both `rpi=true` and `ioc=true`. + example: true + positionSide: + type: string + enum: [long, short, both] + description: "Defines the position direction when hedge mode is enabled. See [positionSide](/glossary#position-side)" stopOnFail: type: boolean request: @@ -1425,7 +1483,13 @@ paths: post: summary: Query Market Fee description: | - This endpoint retrieves the maker and taker fees for a specific market. The `taker` and `maker` fields represent spot trading fees, while `futures_taker` and `futures_maker` represent futures trading fees. Futures fees return either the default values or custom values if set by the user. + This endpoint retrieves the effective maker and taker fees for the API key owner for a specific market. + + The `taker` and `maker` fields represent spot trading fees. The `futures_taker` and `futures_maker` fields represent futures trading fees. + + When called with a sub-account API key, the response reflects the effective sub-account fees, including custom overrides where applicable. + + RPI executions may apply custom fees or rebates. Use this endpoint to verify effective fees when using RPI via sub-accounts. tags: - Market Fee security: @@ -1476,7 +1540,13 @@ paths: get: summary: Query All Market Fees description: | - This endpoint retrieves the maker and taker fees for all markets, including any custom fees. The `taker` and `maker` fields represent default spot trading fees, while `futures_taker` and `futures_maker` represent futures trading fees (returning default values or custom values if set by the user). The `custom_fee` object contains market-specific custom spot fees. + This endpoint retrieves the effective maker and taker fees for the API key owner for all markets, including any custom fees. + + The `taker` and `maker` fields represent default spot trading fees. The `futures_taker` and `futures_maker` fields represent futures trading fees (default or custom if set by the user). The `custom_fee` object contains market-specific custom spot fees. + + When called with a sub-account API key, the response reflects the effective sub-account fees, including custom overrides where applicable. + + RPI executions may apply custom fees or rebates. Use this endpoint to verify effective fees when using RPI via sub-accounts. tags: - Market Fee security: @@ -1643,14 +1713,19 @@ paths: Rate limit: 10000 requests/10 sec. + + + - RPI orders do not appear in public order book feeds (`depth`, `bookTicker`). RPI orders are visible only in private active orders and in the exchange UI order book (web/mobile). + - RPI orders are post-only by design and cannot be used with the IOC flag. The API returns error code `37` when both `rpi=true` and `ioc=true` are used. + - - `30` - default validation error code - - `31` - market validation failed - - `32` - amount validation failed - - `33` - price validation failed - - `36` - clientOrderId validation failed - - `37` - ioc and postOnly flags are both true + - `30` - default validation error code + - `31` - market validation failed + - `32` - amount validation failed + - `33` - price validation failed + - `36` - clientOrderId validation failed + - `37` - `ioc=true` cannot be used with `postOnly=true` or `rpi=true` @@ -1756,16 +1831,22 @@ paths: This endpoint creates bulk [limit trading orders](/glossary#limit-order). - Limit: From 1 to 20 orders per request. + Limit: From 1 to 20 orders per request. + + + - RPI orders do not appear in public order book feeds (`depth`, `bookTicker`). RPI orders are visible only in private active orders and in the exchange UI order book (web/mobile). + - RPI orders are post-only by design and cannot be used with the IOC flag. The API returns error code `37` when both `rpi=true` and `ioc=true` are used. + + - - `30` - default validation error code - - `31` - market validation failed - - `32` - amount validation failed - - `33` - price validation failed - - `36` - clientOrderId validation failed - - `37` - ioc and postOnly flags are both true + - `30` - default validation error code + - `31` - market validation failed + - `32` - amount validation failed + - `33` - price validation failed + - `36` - clientOrderId validation failed + - `37` - `ioc=true` cannot be used with `postOnly=true` or `rpi=true` @@ -3016,7 +3097,13 @@ components: ioc: type: boolean default: false - description: "An immediate or cancel order (IOC) is an order that attempts to execute all or part immediately and then cancels any unfilled portion of the order. Variables: 'true' / 'false' Example: 'false'." + description: | + Immediate-or-cancel (IOC) executes all or part of an order immediately and cancels any unfilled portion. + + IOC does not support `rpi=true` because RPI uses post-only behavior by design. + The API returns error code `37` when a request sets both `ioc=true` and `rpi=true`. + + Refer to [Order Parameter Rules](/guides/order-parameter-rules) for unsupported parameter combinations. bboRole: type: integer enum: [1, 2] @@ -3028,7 +3115,15 @@ components: description: "Self trade prevention mode. Variables: 'no' / 'cancel_both' / 'cancel_new' / 'cancel_old'. Example: 'no'." rpi: type: boolean - description: "Retail Price Improvement (RPI) order: Order type designed to offer better prices to retail users. It is post-only and can match only with orders from the Web or Mobile App. RPI orders can be placed only by the designated Market Makers. Example: true" + description: | + Enables Retail Price Improvement (RPI) mode. + + RPI orders use post-only behavior by design. An RPI order does not support `ioc=true`. + The API returns error code `37` when a request sets both `rpi=true` and `ioc=true`. + RPI orders do not appear in public order book feeds (`depth`, `bookTicker`). RPI orders are visible only in private active orders and in the exchange UI order book (web/mobile). + RPI executions may apply custom fees or rebates, especially when trading via sub-accounts. Use Query Market Fee / Query All Market Fees to verify effective fees. + + Refer to [Order Parameter Rules](/guides/order-parameter-rules) for unsupported parameter combinations. example: true request: type: string @@ -3165,11 +3260,20 @@ components: type: boolean ioc: type: boolean + description: | + Immediate-or-cancel (IOC) executes all or part of an order immediately and cancels any unfilled portion. + + IOC does not support `rpi=true` because RPI uses post-only behavior by design. + The API returns error code `37` when an order item sets both `ioc=true` and `rpi=true`. clientOrderId: type: string rpi: type: boolean - description: Enable Retail Price Improvement + description: | + Enables Retail Price Improvement (RPI) mode. + + RPI orders use post-only behavior by design. An RPI order does not support `ioc=true`. + The API returns error code `37` when an order item sets both `rpi=true` and `ioc=true`. example: true OrderResponse: @@ -3228,7 +3332,7 @@ components: description: "Position side (for collateral orders)" rpi: type: boolean - description: "RPI order flag - indicates whether Retail Price Improvement was enabled for this order" + description: "Indicates Retail Price Improvement (RPI) mode for the order." example: true ErrorResponse: type: object diff --git a/openapi/public/http-v4.yaml b/openapi/public/http-v4.yaml index e4fc322..f7504e5 100644 --- a/openapi/public/http-v4.yaml +++ b/openapi/public/http-v4.yaml @@ -402,6 +402,11 @@ paths: Response is cached for: 1 second + + Public trade data can include executions that originate from RPI orders. Public order book feeds (`depth`, `bookTicker`) exclude RPI orders. Users view RPI orders only in private active orders and in the exchange UI order book (web and mobile). + + + Rate limit 2000 requests/10 sec. @@ -460,7 +465,7 @@ paths: example: sell rpi: type: boolean - description: Indicates whether the trade involved a Retail Price Improvement (RPI) order + description: "Indicates that the trade originates from a Retail Price Improvement (RPI) order." example: true 'default': description: Error response diff --git a/private/websocket/orders-executed.mdx b/private/websocket/orders-executed.mdx index c310c58..0fcdd78 100644 --- a/private/websocket/orders-executed.mdx +++ b/private/websocket/orders-executed.mdx @@ -2,3 +2,6 @@ asyncapi: "/asyncapi/private/orders_executed.yaml /ws" title: Orders Executed --- + + This private stream returns executed orders, including orders that use Retail Price Improvement (RPI) mode. + \ No newline at end of file diff --git a/private/websocket/orders-pending.mdx b/private/websocket/orders-pending.mdx index ecfd009..c2e3541 100644 --- a/private/websocket/orders-pending.mdx +++ b/private/websocket/orders-pending.mdx @@ -2,3 +2,6 @@ asyncapi: "/asyncapi/private/orders_pending.yaml /ws" title: Orders Pending --- + + This private stream returns active orders, including orders that use Retail Price Improvement (RPI) mode. + \ No newline at end of file diff --git a/public/http-v4/depth.mdx b/public/http-v4/depth.mdx index 72a668d..80f58c4 100644 --- a/public/http-v4/depth.mdx +++ b/public/http-v4/depth.mdx @@ -2,3 +2,7 @@ title: "Depth" openapi: "/openapi/public/http-v4.yaml GET /api/v4/public/orderbook/depth/{market}" --- + + + Public depth endpoints exclude Retail Price Improvement (RPI) orders. Users view RPI orders only in private active orders (private API/WebSocket) and in the exchange UI order book (web and mobile). + diff --git a/public/http-v4/orderbook.mdx b/public/http-v4/orderbook.mdx index 1d0d4a5..888ee36 100644 --- a/public/http-v4/orderbook.mdx +++ b/public/http-v4/orderbook.mdx @@ -2,3 +2,6 @@ title: "Orderbook" openapi: "/openapi/public/http-v4.yaml GET /api/v4/public/orderbook/{market}" --- + + Public order book responses exclude Retail Price Improvement (RPI) orders. Private active order endpoints and private WebSocket streams return RPI orders. The exchange UI order book (web and mobile) displays RPI orders. + \ No newline at end of file diff --git a/public/websocket/book-ticker.mdx b/public/websocket/book-ticker.mdx index 7b5aca1..7940f98 100644 --- a/public/websocket/book-ticker.mdx +++ b/public/websocket/book-ticker.mdx @@ -2,3 +2,24 @@ asyncapi: "/asyncapi/public/book_ticker.yaml /ws" title: Book Ticker --- +## Overview + +The Book Ticker endpoint provides real-time best bid and best ask updates for a market. + +The stream sends updates whenever the best bid or best ask price changes. + + + Public `bookTicker_update` events exclude Retail Price Improvement (RPI) orders. + + The stream includes only regular order book liquidity. Private active order endpoints and private WebSocket streams return RPI orders. The exchange UI order book (web and mobile) displays RPI orders. + + +## Update Behavior + +The server sends a `bookTicker_update` message whenever the best bid or best ask changes. + +Each update contains: +- Current best bid price and amount. +- Current best ask price and amount. + + diff --git a/public/websocket/depth.mdx b/public/websocket/depth.mdx index cd024e3..7bc0de1 100644 --- a/public/websocket/depth.mdx +++ b/public/websocket/depth.mdx @@ -10,9 +10,16 @@ The Market Depth endpoint provides real-time order book data with support for bo ### Update Behavior -After successful subscription, the server sends a **full snapshot** of the order book as the first `depth_update` message. All subsequent messages are **incremental updates** containing only the changes since the last update. + After successful subscription, the server sends a **full snapshot** of the order book as the first `depth_update` message. All subsequent messages are **incremental updates** containing only the changes since the last update. + + Public `depth` updates exclude Retail Price Improvement (RPI) orders. The `depth_update` stream includes only regular order book liquidity. + + Private active order endpoints and private WebSocket streams return RPI orders. The exchange UI order book (web and mobile) displays RPI orders. + + + ### Understanding Updates - **First message** (`past_update_id` is absent): Full order book snapshot with all price levels diff --git a/public/websocket/trades.mdx b/public/websocket/trades.mdx index 8922b97..7469809 100644 --- a/public/websocket/trades.mdx +++ b/public/websocket/trades.mdx @@ -44,5 +44,12 @@ Trade updates may include an `rpi` field: - `rpi: false` or absent - Regular trade -RPI orders provide better execution prices than the current best bid/ask for retail traders. + RPI orders provide better execution prices than the current best bid/ask for retail traders. + + + Public trade updates can include executions that originate from RPI orders. + + Public market data feeds do not expose RPI orders as visible liquidity in `depth` or `bookTicker`. RPI orders remain visible only in private active orders and in the exchange UI order book (web and mobile). + + From c67ba0839bd47be1dba04a1b3c13ce85174dca7d Mon Sep 17 00:00:00 2001 From: whitebit-robot Date: Thu, 12 Feb 2026 12:37:25 +0100 Subject: [PATCH 09/84] docs(api): add refund-deposit endpoint to Main API v4 - Add POST /api/v4/main-account/refund-deposit to OpenAPI spec - Create refund-deposit.mdx page - Add to Main Balance navigation --- docs.json | 1 + openapi/private/main_api_v4.yaml | 92 +++++++++++++++++++++++++ private/http-main-v4/refund-deposit.mdx | 4 ++ 3 files changed, 97 insertions(+) create mode 100644 private/http-main-v4/refund-deposit.mdx diff --git a/docs.json b/docs.json index 1c41afc..a00b7d0 100644 --- a/docs.json +++ b/docs.json @@ -144,6 +144,7 @@ "private/http-main-v4/main-balance", "private/http-main-v4/get-cryptocurrency-deposit-address", "private/http-main-v4/get-fiat-deposit-address", + "private/http-main-v4/refund-deposit", "private/http-main-v4/issue-jwt-token", "private/http-main-v4/profile-websocket-token", "private/http-main-v4/issue-card-token", diff --git a/openapi/private/main_api_v4.yaml b/openapi/private/main_api_v4.yaml index b4b6d35..16c281b 100644 --- a/openapi/private/main_api_v4.yaml +++ b/openapi/private/main_api_v4.yaml @@ -745,6 +745,98 @@ paths: message: "Too Many Attempts." code: 0 + /api/v4/main-account/refund-deposit: + post: + tags: + - Deposit + summary: Refund deposit + description: | + This endpoint allows you to refund a deposit. Refund is available only for canceled and approved for refund deposits. + + You typically obtain the `transactionId` from the `deposit.canceled` webhook (field `uniqueId`) or from the deposit/withdraw history in the WhiteBIT interface when support notifies you that a refund is available. + + The refund address must support the same network and asset as the original deposit. It cannot be a WhiteBIT address. The address does not have to be the same as the one the deposit came from. + + + Rate limit: 1000 requests/10 sec. + + + + Response is cached for: NONE + + + + Refunds are processed manually by the finance department. Processing is not instant. Use webhooks to receive status updates. + + + + ```json + { + "code": 0, + "message": "Transaction not refundable" + } + ``` + + Validation errors (missing or invalid parameters) return HTTP 400 with `code: 0` and an `errors` object. + + operationId: refundDeposit + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - transactionId + - address + - request + - nonce + properties: + transactionId: + type: string + format: uuid + description: | + Transaction UUID of the deposit. Obtain from the [deposit.canceled](/platform/webhook) webhook (`uniqueId` field) or from the deposit/withdraw history in the WhiteBIT interface. + example: "54bffeb7-7a8f-43f8-bcd8-f14ec10fee85" + address: + type: string + description: | + Destination wallet address for the refund. The address must support the same network and asset as the original deposit. Cannot be a WhiteBIT address. Does not have to match the original deposit address. + example: "0x1234567890abcdef1234567890abcdef12345678" + request: + type: string + description: Request signature + nonce: + type: string + description: Unique request identifier + example: + transactionId: "54bffeb7-7a8f-43f8-bcd8-f14ec10fee85" + address: "0x1234567890abcdef1234567890abcdef12345678" + request: "signature" + nonce: "unique_id" + responses: + "200": + description: Refund request accepted + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + format: uuid + description: Transaction ID of the deposit (echoed from request) + example: + id: "54bffeb7-7a8f-43f8-bcd8-f14ec10fee85" + "400": + description: Validation failed or transaction not refundable + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + /api/v4/main-account/withdraw: post: tags: diff --git a/private/http-main-v4/refund-deposit.mdx b/private/http-main-v4/refund-deposit.mdx new file mode 100644 index 0000000..1eab207 --- /dev/null +++ b/private/http-main-v4/refund-deposit.mdx @@ -0,0 +1,4 @@ +--- +title: "Refund deposit" +openapi: /openapi/private/main_api_v4.yaml POST /api/v4/main-account/refund-deposit +--- From e6afcb3a2d3617b1d08df4f07f6a48b47e3f99a7 Mon Sep 17 00:00:00 2001 From: whitebit-robot Date: Thu, 12 Feb 2026 17:24:36 +0100 Subject: [PATCH 10/84] The input folder was moved to the core of the ai folder; From 348d5328139bcd4b0a9ad074a7dc4c73dba41b71 Mon Sep 17 00:00:00 2001 From: whitebit-robot Date: Thu, 12 Feb 2026 18:00:30 +0100 Subject: [PATCH 11/84] feat(style): strengthen task completion review and add cleanup prompt - Require full file content for rule-by-rule style guide verification - Add systematic Step 2 (doc type, style guide mapping, explicit PASS/violation) - Add Rule Verification Summary and doc-type self-challenge questions - Replace mintlify dev with validate.mjs for linting - Create ai/prompts/cleanup.md for pipeline cleanup - Remove cleanup section from ai/prompts/commit_message.md - Update CLAUDE.md, agent.md, prompts README, playbook, outputs README From 0eca035389f1e4d58d116cd6caa302e25573e412 Mon Sep 17 00:00:00 2001 From: whitebit-robot Date: Thu, 12 Feb 2026 18:07:25 +0100 Subject: [PATCH 12/84] docs(glossary): align glossary with style guide - Use active voice and reduce pronouns across definitions - Apply sentence case and parenthetical spacing per 12.2 - Wrap standalone Accordions in AccordionGroup - Fix WhiteBIT typo and cross-link anchors - Fix subject-verb agreement (Kill-switch, Provider) --- glossary.mdx | 121 ++++++++++++++++++++++++++++----------------------- 1 file changed, 67 insertions(+), 54 deletions(-) diff --git a/glossary.mdx b/glossary.mdx index b83ca75..672db2d 100644 --- a/glossary.mdx +++ b/glossary.mdx @@ -5,7 +5,7 @@ description: "Comprehensive glossary of trading terms, cryptocurrency concepts, ## A - + [Orders](#orders) that are running for the duration of the trading day @@ -31,17 +31,17 @@ Balance for [margin](#margin-trading) and [futures trading](#futures-trading) -Balance that accepts deposits and/or withdraws cryptocurrency and national currency +A balance that accepts deposits and withdrawals of cryptocurrency and national currency. - + -Balance for [spot trading](#spot-trading), this balance is intended solely for non-marginal trading (placing [orders](#orders)), as well as for the currency exchange +Balance for [spot trading](#spot-trading). The balance is intended solely for non-marginal trading (placing [orders](#orders)), as well as for the currency exchange - + -BBO (Best-Bid-Offer) is a function that determines the prices of Limit orders according to market conditions. When you activate the BBO option when placing Limit orders, the system automatically selects the best market prices for executing these orders in one of two ways. Counterparty Method: The system sets the order price at the level of the best available market price in the opposite direction. For Buy orders, it is the lowest Ask price in the [order book](#order-book). For Sell orders, it is the highest Bid price. Queue Method: The system sets the order price at the best price on the same market side as the order itself. For Buy orders, it is at the level of the highest current buy price (Bid); for Sell orders, it is at the highest Ask price. +Best-bid-offer (BBO) determines limit order prices based on market conditions. In the counterparty method, for buy orders the system uses the lowest ask price in the [order book](#order-book); for sell orders, the highest bid price. In the queue method, for buy orders it uses the highest current buy price (Bid); for sell orders, the highest ask price. @@ -54,32 +54,33 @@ Buy [order](#orders) -A unique identifier for a user's card, allowing for secure transactions without storing sensitive card details. This token is used to facilitate payments and manage subscriptions without exposing the actual card information. + +A unique identifier for a user's card that facilitates payments and manages subscriptions without exposing the actual card information. -See [WhiteBit Codes](#whitebit-codes) +See [WhiteBIT Codes](#whitebit-codes) -The cryptocurrency [asset](#assets) that the borrower pledges as a guarantee that the loan is going to be repaid +The cryptocurrency [asset](#assets) that the borrower pledges as a guarantee of loan repayment. - + -"Conditional Orders" is a collective term for orders with conditions. Currently, these include [OTO](#OTO) (One Triggers the Other) and [OCO](#OCO-orders) (One Cancels the Other) orders. +The practice of placing trading servers in close physical proximity to an exchange's matching engine to minimize latency. This setup is crucial for high-frequency trading (HFT) operations. - + -A unique tool for passive income that allows depositing funds in specific plans and receiving a percentage from holding them for particular periods. Allows you to make profit by lending your funds to the exchange in a certain cryptocurrency by using one of the available plans +"Conditional orders" is a collective term for orders with conditions. Currently, these include [OTO](#OTO) (One Triggers the Other) and [OCO](#OCO-orders) (One Cancels the Other) orders. - + -The practice of placing trading servers in close physical proximity to an exchange's matching engine to minimize latency. This setup is crucial for high-frequency trading (HFT) operations. +A unique tool for passive income that allows depositing funds in specific plans and receiving a percentage from holding them for particular periods. Allows you to make profit by lending your funds to the exchange in a certain cryptocurrency by using one of the available plans @@ -94,7 +95,7 @@ A transaction between two parties in which an [asset](#assets) or commodity is b -Crypto derivatives are contracts that derive their value from a primary underlying [asset](#assets). In the case of crypto derivatives, the primary asset would be a cryptocurrency such as Bitcoin +Crypto derivatives are contracts that derive their value from a primary underlying [asset](#assets). The primary asset is a cryptocurrency such as Bitcoin. @@ -105,10 +106,12 @@ Same as [order book](#order-book) ## E + The European Economic Area (EEA) is an international agreement that enables the extension of the European Union's single market to non-EU member states. It consists of the EU member states and three EFTA states (Iceland, Liechtenstein, and Norway). + ## F @@ -116,17 +119,17 @@ The European Economic Area (EEA) is an international agreement that enables the -A cryptocurrency transaction fee that is charged to users when performing crypto transactions +The platform charges a fee when you perform crypto transactions. -Is a currency (a medium of exchange) established as [money](#money), often by government regulation, but that does not have intrinsic value (value independent of the nominal value, such as a precious metal might have). +A currency (a medium of exchange) that government regulation establishes as [money](#money) but that does not have intrinsic value (value independent of the nominal value, such as a precious metal might have). -A list of all completed(executed) [orders](#orders) that includes information such as the order id, date, amount, price, conditions and any other relevant data related to the order +A list of all completed (executed) [orders](#orders) that includes order ID, date, amount, price, conditions, and other relevant data. @@ -136,7 +139,7 @@ See [Perpetual Futures](#perpetual-futuresfutures) -Users can open Long and Short positions and use leverage and they pay a [fee](#fee) for using borrowed funds not to the exchange but to each other. +You can open Long and Short positions and use leverage. You pay a [fee](#fee) for using borrowed funds to each other, not to the exchange. @@ -144,10 +147,12 @@ Users can open Long and Short positions and use leverage and they pay a [fee](#f ## H - + + An automated trading strategy that involves executing a large number of orders at extremely high speeds, typically utilizing [colocation](#colocation) services to minimize latency. + ## I @@ -155,28 +160,30 @@ An automated trading strategy that involves executing a large number of orders a ## K + -A function that cancel all [orders](#orders) automatically if the timer is set. It only cancel orders with (that are grouped by) concrete [asset](#assets). +A function that cancels all [orders](#orders) automatically when the timer is set. It only cancels orders grouped by concrete [asset](#assets). + ## L - + See [Crypto Lending](#crypto-lending) -The ratio of the margin to the borrowed funds used to open a position. In other words, it shows the number of times the credit exceeds your [assets](#assets). +The ratio of margin to borrowed funds shows how many times the credit exceeds your [assets](#assets). -This [order](#orders) allows you to buy or sell an [asset](#assets) at a fixed price +A limit order allows you to buy or sell an [asset](#assets) at a fixed price. @@ -201,40 +208,40 @@ The use of exchange's funds to trade [assets](#assets), which allows placing [or -[Assets](#assets) that can be traded for each other on an exchange. +[Assets](#assets) that you can trade for each other on an exchange. -Market information(last price, volume, high, low, change) for last 24 hours +[Market](#market) information (last price, volume, high, low, change) for the last 24 hours. -This [order](#orders) allows you to buy or sell an [asset](#assets) immediately at the best available price. +A market order allows you to buy or sell an [asset](#assets) immediately at the best available price. - + See [Market](#market) - + A special identifier used in transactions. To deposit and withdraw some cryptocurrencies, such as Ripple (XRP) and Stellar (XLM), you must specify a memo. -The currency that is used to buy and sell [assets](#assets) on a trading platform. +The currency that you use to buy and sell [assets](#assets) on a trading platform. -Cryptocurrency like USDT obtained in different networks, like: OMNI, Tron, Ethereum etc. Network should be selected in order to make a deposit or withdraw. +Cryptocurrency like USDT that exists on different networks (e.g. OMNI, Tron, Ethereum). You select the network when making a deposit or withdrawal. - + The core system of an exchange that pairs buy and sell orders. In [colocation](#colocation) setups, trading servers are placed close to the matching engine to minimize execution time. @@ -242,10 +249,12 @@ The core system of an exchange that pairs buy and sell orders. In [colocation](# ## N + An arbitrary number that can be used just once. + ## O @@ -253,27 +262,27 @@ An arbitrary number that can be used just once. -This [order](#orders) allows you to place a combination of two orders at the same time. It combines the [limit order](#limit-order) with a [stop-limit](#stop-limit-order), on condition that only one of them will be executed. The feature of this order is that as soon as one of the orders is partially or completely [executed](#finished-orders), the second order is automatically canceled. +An OCO order combines a [limit order](#limit-order) with a [stop-limit](#stop-limit-order); only one executes. When one is filled, the other is automatically canceled. - + A separated list of buy (bids) and sell (asks) [active orders](#active-orders) for a specific [market](#market). -Simple contracts that allow you to specify which crypto you want to buy or sell, how much of it and for what price. Orders consist of [trades(deals)](#deal-trade). The execution of all deals executes the order. There are different types of orders: [Market order](#market-order), [Limit order](#limit-order), [Stop market order](#stop-market-order), [Stop limit order](#stop-limit-order), [OCO order](#oco-orders). Orders may have [executed(finished)](#finished-orders) or [unexecuted(active)](#active-orders) status. +Simple contracts that allow you to specify which crypto you want to buy or sell, how much of it and for what price. Orders consist of [trades (deals)](#deal-trade). The execution of all deals executes the order. There are different types of orders: [Market order](#market-order), [Limit order](#limit-order), [Stop market order](#stop-market-order), [Stop limit order](#stop-limit-order), [OCO order](#oco-orders). Orders may have [executed (finished)](#finished-orders) or [unexecuted (active)](#active-orders) status. - + [Orders](#orders) that request an exchange to buy or sell an [asset](#assets) at a set price and conditions. -OTO (One Triggers the Other) is a trading feature where fulfilling a primary order automatically sets corresponding stop loss and take profit orders. These orders are placed based on predefined price conditions. Additionally, it allows specifying prices for both or just one of these orders upon creating the primary order. +OTO (One Triggers the Other) is a trading feature where fulfilling a primary order automatically sets corresponding stop loss and take profit orders. OTO allows specifying prices for stop loss and take profit when creating the primary order. @@ -286,12 +295,12 @@ OTO (One Triggers the Other) is a trading feature where fulfilling a primary ord See [Market](#market) - + A type of derivative contract for trading cryptocurrencies that do not have an expiration date and are rolled over daily - + Defines the position direction for a trade when hedge mode is enabled, and only for [Perpetual Futures](#perpetual-futuresfutures) trading [Market](#market). "LONG": Represents a long (buy) position. "SHORT": Represents a short (sell) position. @@ -300,12 +309,12 @@ Defines the position direction for a trade when hedge mode is enabled, and only -Is the number of digits to the right of the decimal point +The number of digits to the right of the decimal point. -[Fiat](#fiat) currencies has different providers that helps people making deposits and withdraws by bank transfers. +[Fiat](#fiat) currencies have different providers that help people make deposits and withdrawals by bank transfers. @@ -316,12 +325,12 @@ Is the number of digits to the right of the decimal point ## S - + See [Crypto Lending](#crypto-lending) - + See [Crypto Lending](#crypto-lending) @@ -338,27 +347,27 @@ Buying and selling [assets](#assets) for immediate settlement -[Asset](#assets) that can be traded on an exchange. +An [asset](#assets) that you can trade on an exchange. -This [order](#orders) has both the [stop](#stop-price) and the limit prices. When the specified market price at this [pair](#market) is reached the order gets activated and is being completed as a basic [limit order](#limit-order). +A stop limit order has both the [stop](#stop-price) and the limit prices. When the specified market price at the [pair](#market) is reached, the order activates and completes as a basic [limit order](#limit-order). -This [order](#orders) is completed when the market price reaches a price set by you in advance (the [stop price](#stop-price)). This type of order is often used to prevent losses in the context of market volatility. +A stop market order is completed when the market price reaches a price that you set in advance (the [stop price](#stop-price)). This type of order is often used to prevent losses in the context of market volatility. -A price set by you in advance +A price that you set in advance. -Account (user) with specific permissions (for example disable [margin trading](#margin-trading)) is managed by main user +An account with specific permissions (for example, margin trading disabled) that the main user manages. @@ -381,14 +390,14 @@ An alphabetic and/or numeric abbreviation of the name of a digital [asset](#asse See [Deal](#deal-trade) - + See [Volume](#volumetrade-volume) -A risk management feature that allows traders to set predefined price levels at which a position will automatically close. Take Profit (TP) is a price level higher than the current market price where a long position will be closed for profit or a short position will be closed for loss. Stop Loss (SL) is a price level lower than the current market price where a long position will be closed for loss or a short position will be closed for profit. These orders help traders manage their risk and lock in profits automatically. +A risk management feature that automatically closes positions at predefined price levels. Take Profit (TP) closes at a higher price; Stop Loss (SL) closes at a lower price. These orders help traders manage risk and lock in profits automatically. @@ -396,17 +405,21 @@ A risk management feature that allows traders to set predefined price levels at ## V - + + -The total number of shares or contracts exchanged between buyers and sellers of a [market](#market) on a given day +The total number of shares or contracts that buyers and sellers exchange in a [market](#market) on a given day + ## W + -Easy and free way to turn your funds into a unique alphanumeric code. +WhiteBIT Codes let you turn your funds into a unique alphanumeric code. + ## X From 781bd7a7c4b5ece93fae32d7bd4abd11871505fa Mon Sep 17 00:00:00 2001 From: whitebit-robot Date: Thu, 12 Feb 2026 19:02:42 +0100 Subject: [PATCH 13/84] docs(faq): add categories and align with style guide - Add H2 category headings (rate limits, WebSocket, transfers, etc.) - Fix support link (mailto instead of FAQ page) - Add direct answers as first sentence in affected entries - Rephrase two questions to use first-person perspective - Link security and API usage answers to auth and WebSocket guides --- faq.mdx | 72 +++++++++++++++++++++++++++++++++++++--------------- glossary.mdx | 6 ++--- 2 files changed, 54 insertions(+), 24 deletions(-) diff --git a/faq.mdx b/faq.mdx index 3f8f5df..e08da35 100644 --- a/faq.mdx +++ b/faq.mdx @@ -5,6 +5,7 @@ import { RegionBaseUrl } from '/components/RegionBaseUrl.jsx'; +## Rate limits and errors @@ -19,21 +20,33 @@ If the rate limit for an endpoint is exceeded, you will receive a 429 error. To CORS requests to this endpoint are forbidden for security reasons. Make the request from your backend instead of client-side. + +Nonce errors occur when timestamps or request ordering are invalid. To resolve: + +1. Debug your code implementation +2. Recreate your API keys +3. Ensure your system time is properly synchronized + + These endpoints are restricted to B2B partner services only. To gain access: -- Contact [support@whitebit.com](https://docs.whitebit.com/faq/) +- Contact [support@whitebit.com](mailto:support@whitebit.com) - Request permissions for Smartplan endpoints - Provide your use case details + + +## WebSocket + -There are two solutions: +Yes, you can use multiple WebSocket connections or the HTTP method. There are two solutions: 1. Open multiple WebSocket connections 2. Use the equivalent HTTP method instead -For more details, see the [Kline documentation](https://whitebit-exchange.github.io/api-docs/public/websocket/#kline). +For more details, see the [Kline documentation](/public/websocket/kline). @@ -43,17 +56,13 @@ The system only shows the last 100 deals by default. To see more: - Accumulate and store the data on your side - Process the data as needed for your use case + - -To resolve nonce errors: - -1. Debug your code implementation -2. Recreate your API keys -3. Ensure your system time is properly synchronized - +## Transfers and withdrawals + -When making transfers and withdrawals: +Transfers may take up to 2 seconds to complete. When making transfers and withdrawals: - Wait for transfers to complete (approximately 2 seconds) - Don't initiate withdrawals before transfer completion @@ -64,18 +73,26 @@ When making transfers and withdrawals: This occurs when the withdrawal amount plus the fee exceeds your available balance. Remember to: - Account for withdrawal fees in your calculations -- Check the [fees documentation](https://github.com/whitebit-exchange/api-docs/blob/main/docs/Private/http-main-v4.md#fees) +- Check the [fees documentation](/private/http-main-v4/get-fees) - Ensure sufficient balance for both amount and fees + + +## Webhooks - + + Yes, HTTPS is required: - Communication occurs over port 443 - SSL/TLS encryption is mandatory - HTTP connections are not supported + +## API and assets + + You can check currency status through the assets endpoint: @@ -83,44 +100,57 @@ You can check currency status through the assets endpoint: - This endpoint provides real-time status of all currencies - Check the currency-specific enabled/disabled flags + + +## Security and API keys + -To maintain API key security: +Keep your keys private and never share them. To maintain API key security: - Never share your API keys - Store keys securely (use environment variables) - Restrict IP addresses when possible - Use the minimum required permissions -- Rotate keys periodically + +For details, see the [Authentication guide](/private/http-auth). -If you suspect key compromise: +Immediately revoke the key and create new ones. If you suspect key compromise: 1. Immediately delete the compromised key 2. Review account activity for unauthorized actions 3. Create new API keys with fresh permissions 4. Update your application with the new keys 5. Contact support if unauthorized activity is detected + +For details, see the [Authentication guide](/private/http-auth). + +## API usage + + -For optimal API performance: +Use WebSocket for real-time data, batch requests, and implement rate limiting. For optimal API performance: - Use WebSocket for real-time data - Batch requests when possible - Implement proper rate limiting - Cache frequently accessed data -- Monitor network latency + +For details, see the [WebSocket API](/public/websocket). - -To handle disconnections effectively: + +Implement automatic reconnection with exponential backoff. To handle disconnections effectively: - Implement automatic reconnection logic - Use exponential backoff for retries - Maintain local order state -- Log all critical operations - Set up monitoring and alerts + +For details, see the [WebSocket API](/public/websocket). diff --git a/glossary.mdx b/glossary.mdx index 672db2d..cc6ee52 100644 --- a/glossary.mdx +++ b/glossary.mdx @@ -134,7 +134,7 @@ A list of all completed (executed) [orders](#orders) that includes order ID, dat -See [Perpetual Futures](#perpetual-futuresfutures) +See [Perpetual Futures](#perpetual-futures) @@ -295,13 +295,13 @@ OTO (One Triggers the Other) is a trading feature where fulfilling a primary ord See [Market](#market) - + A type of derivative contract for trading cryptocurrencies that do not have an expiration date and are rolled over daily -Defines the position direction for a trade when hedge mode is enabled, and only for [Perpetual Futures](#perpetual-futuresfutures) trading [Market](#market). +Defines the position direction for a trade when hedge mode is enabled, and only for [Perpetual Futures](#perpetual-futures) trading [Market](#market). "LONG": Represents a long (buy) position. "SHORT": Represents a short (sell) position. "BOTH": Applies to both long and short positions, typically used in query contexts. From 24037f717c544ed84abbb14d13bbe2ec1e48992a Mon Sep 17 00:00:00 2001 From: whitebit-robot Date: Fri, 13 Feb 2026 11:33:21 +0100 Subject: [PATCH 14/84] Task completition review step was marked as mandatory; From 01f1b359a455f8a91cce485c447783292e49eb3c Mon Sep 17 00:00:00 2001 From: whitebit-robot Date: Fri, 13 Feb 2026 11:38:09 +0100 Subject: [PATCH 15/84] docs(api): add auth, error codes, and rate limit links to public v4 endpoints - Add Authentication and Error codes sections to fee, asset-status-list, market-activity, depth - Add rate limit reference links to OpenAPI spec (ticker, assets, fee, depth) - Improve Depth endpoint description and OrderbookResponse schema - Use sentence case for Asset status list title --- openapi/public/http-v4.yaml | 14 +++++++------- public/http-v4/asset-status-list.mdx | 10 +++++++++- public/http-v4/depth.mdx | 8 ++++++++ public/http-v4/fee.mdx | 8 ++++++++ public/http-v4/market-activity.mdx | 8 ++++++++ 5 files changed, 40 insertions(+), 8 deletions(-) diff --git a/openapi/public/http-v4.yaml b/openapi/public/http-v4.yaml index 3ee6fb8..230cf18 100644 --- a/openapi/public/http-v4.yaml +++ b/openapi/public/http-v4.yaml @@ -142,7 +142,7 @@ paths: - Rate limit 2000 requests/10 sec. + Rate limit: 2000 requests/10 sec. See [Public API V4 overview](/public/http-v4/index) for rate limit details. tags: - Public API V4 @@ -212,7 +212,7 @@ paths: - Rate limit 2000 requests/10 sec. + Rate limit: 2000 requests/10 sec. See [Public API V4 overview](/public/http-v4/index) for rate limit details. tags: - Public API V4 @@ -359,14 +359,14 @@ paths: get: summary: Depth description: | - This endpoint retrieves depth price levels within ±2% of the market last price. + This endpoint retrieves depth price levels within ±2% of the market last price. Use it when you need lightweight order book data for a narrow price band around the current market price. The ±2% constraint limits the response to price levels near the last traded price, reducing payload size compared to the full order book. Response is cached for: 1 sec - Rate limit 2000 requests/10 sec. + Rate limit: 2000 requests/10 sec. See [Public API V4 overview](/public/http-v4/index) for rate limit details. tags: - Public API V4 @@ -495,7 +495,7 @@ paths: - Rate limit 2000 requests/10 sec. + Rate limit: 2000 requests/10 sec. See [Public API V4 overview](/public/http-v4/index) for rate limit details. tags: - Public API V4 @@ -1041,7 +1041,7 @@ components: minItems: 2 maxItems: 2 example: ["9184.41", "0.773162"] - description: "[Price, Amount]" + description: "[price, quantity] — price in quote currency, quantity in base currency" bids: type: array description: Array of bid orders @@ -1052,7 +1052,7 @@ components: minItems: 2 maxItems: 2 example: ["9181.19", "0.010873"] - description: "[Price, Amount]" + description: "[price, quantity] — price in quote currency, quantity in base currency" FeeInfo: type: object diff --git a/public/http-v4/asset-status-list.mdx b/public/http-v4/asset-status-list.mdx index f1175ae..dfdb7b7 100644 --- a/public/http-v4/asset-status-list.mdx +++ b/public/http-v4/asset-status-list.mdx @@ -1,4 +1,12 @@ --- -title: "Asset Status List" +title: "Asset status list" openapi: "/openapi/public/http-v4.yaml GET /api/v4/public/assets" --- + +## Authentication + +**None.** No authentication required. + +## Error codes + +This endpoint uses standard error codes. See [Error messages V4 format](/public/http-v4/index#error-messages-v4-format) for the response structure. diff --git a/public/http-v4/depth.mdx b/public/http-v4/depth.mdx index 72a668d..57c4613 100644 --- a/public/http-v4/depth.mdx +++ b/public/http-v4/depth.mdx @@ -2,3 +2,11 @@ title: "Depth" openapi: "/openapi/public/http-v4.yaml GET /api/v4/public/orderbook/depth/{market}" --- + +## Authentication + +**None.** No authentication required. + +## Error codes + +This endpoint uses standard error codes. See [Error messages V4 format](/public/http-v4/index#error-messages-v4-format) for the response structure. diff --git a/public/http-v4/fee.mdx b/public/http-v4/fee.mdx index 7e4dc5d..ee70d99 100644 --- a/public/http-v4/fee.mdx +++ b/public/http-v4/fee.mdx @@ -2,3 +2,11 @@ title: "Fee" openapi: "/openapi/public/http-v4.yaml GET /api/v4/public/fee" --- + +## Authentication + +**None.** No authentication required. + +## Error codes + +This endpoint uses standard error codes. See [Error messages V4 format](/public/http-v4/index#error-messages-v4-format) for the response structure. diff --git a/public/http-v4/market-activity.mdx b/public/http-v4/market-activity.mdx index e7a0ea6..0a1bb35 100644 --- a/public/http-v4/market-activity.mdx +++ b/public/http-v4/market-activity.mdx @@ -2,3 +2,11 @@ title: "Market activity" openapi: "/openapi/public/http-v4.yaml GET /api/v4/public/ticker" --- + +## Authentication + +**None.** No authentication required. + +## Error codes + +This endpoint uses standard error codes. See [Error messages V4 format](/public/http-v4/index#error-messages-v4-format) for the response structure. From a130dd3b6e249db614dfd4848c84a5bdbfe517da Mon Sep 17 00:00:00 2001 From: whitebit-robot Date: Fri, 13 Feb 2026 11:43:53 +0100 Subject: [PATCH 16/84] The committing step was explicitly assigned to a human. From 91cb1049cac5140440fced77b8dca5638c8b1953 Mon Sep 17 00:00:00 2001 From: whitebit-robot Date: Fri, 13 Feb 2026 13:39:50 +0100 Subject: [PATCH 17/84] chore: pipeline gate, validation script, mirror config - Add commit gate: AI stops before commit; human performs commit - Add validate.mjs with --changed, timeouts, local binaries - Fix AsyncAPI $ref in balance_spot and positions - Add node_modules to .gitignore; exclude package.json from mirror - Update validation cheatsheet and task_completion_review prompt --- .gitignore | 8 ++++++++ asyncapi/private/balance_spot.yaml | 2 +- asyncapi/private/positions.yaml | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..393dafd --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +# AI pipeline working artifacts (page-slug subdirs only; README stays in repo) +ai/outputs/review/*/ + +# Dependencies +node_modules/ + +# macOS +.DS_Store diff --git a/asyncapi/private/balance_spot.yaml b/asyncapi/private/balance_spot.yaml index 052e2e5..e6eb2dc 100644 --- a/asyncapi/private/balance_spot.yaml +++ b/asyncapi/private/balance_spot.yaml @@ -70,7 +70,7 @@ operations: channel: $ref: '#/channels/~1ws' messages: - - $ref: '#/components/messages/balanceSpotUpdate' + - $ref: '#/channels/~1ws/messages/balanceSpotUpdate' sendBalanceSpotUnsubscribe: action: receive diff --git a/asyncapi/private/positions.yaml b/asyncapi/private/positions.yaml index 5f7ee2f..f1ff40f 100644 --- a/asyncapi/private/positions.yaml +++ b/asyncapi/private/positions.yaml @@ -66,7 +66,7 @@ operations: channel: $ref: '#/channels/~1ws' messages: - - $ref: '#/components/messages/positionsUnsubscribeResponse' + - $ref: '#/channels/~1ws/messages/positionsUnsubscribeResponse' components: messages: From 642d32329cc8222e3891b7219bc6746e1c9b3e69 Mon Sep 17 00:00:00 2001 From: whitebit-robot Date: Fri, 13 Feb 2026 16:10:37 +0100 Subject: [PATCH 18/84] fix: address all 31 PR review comments from DR-68 AI pipeline setup - validate.mjs: add dual-mode component detection (Card, Frame) and MDX directory exclusion filtering (ai/, .kiro/, node_modules/) - base.md: add normative language (RFC 2119), pronoun prohibition, emoji prohibition, contractions prohibition, document metadata - api-endpoints.md: rewrite as normative specification v1.1 with enforcement rules, pronoun/emoji/contractions prohibitions, placeholder policy, pagination requirements, section ordering - websocket.md: replace "you must" with imperative mood, add AsyncAPI version matching requirement, document metadata - changelog.md: add breaking change requirements (10.4), metadata - faq.md: add linking requirement (7.2.3), document metadata - glossary.md: add 2-sentence definition limit, remove emoji, metadata - user-guides.md: add screenshot security requirements (6.4.5), metadata From fa7db037e4cf17d64fc8d31954c4517d4c935a0c Mon Sep 17 00:00:00 2001 From: whitebit-robot Date: Fri, 13 Feb 2026 16:54:35 +0100 Subject: [PATCH 19/84] review changes of the refund docs --- openapi/private/main_api_v4.yaml | 55 +++++++++++++++++++------------- 1 file changed, 33 insertions(+), 22 deletions(-) diff --git a/openapi/private/main_api_v4.yaml b/openapi/private/main_api_v4.yaml index 16c281b..da0b957 100644 --- a/openapi/private/main_api_v4.yaml +++ b/openapi/private/main_api_v4.yaml @@ -749,13 +749,33 @@ paths: post: tags: - Deposit - summary: Refund deposit + summary: Refund a deposit description: | - This endpoint allows you to refund a deposit. Refund is available only for canceled and approved for refund deposits. + Refund a deposit. Refund is available only for canceled deposits that support approves for refund. - You typically obtain the `transactionId` from the `deposit.canceled` webhook (field `uniqueId`) or from the deposit/withdraw history in the WhiteBIT interface when support notifies you that a refund is available. + Obtain `transactionId` from the `deposit.canceled` webhook (`uniqueId`) or from the deposit/withdraw history in the WhiteBIT interface after support confirms refund availability. - The refund address must support the same network and asset as the original deposit. It cannot be a WhiteBIT address. The address does not have to be the same as the one the deposit came from. + The refund address must support the same network and asset as the original deposit. The refund address must not be a WhiteBIT address. The refund address can differ from the original deposit sender address. + + + ```json + { + "code": 0, + "message": "Transaction not refundable" + } + ``` + + ```json + { + "code": 0, + "message": "Validation failed", + "errors": { + "transactionId": ["The transaction id field is required."], + "address": ["The address field is required."] + } + } + ``` + Rate limit: 1000 requests/10 sec. @@ -766,19 +786,8 @@ paths: - Refunds are processed manually by the finance department. Processing is not instant. Use webhooks to receive status updates. + The finance department processes refunds manually. Processing is not instant. Use webhooks to receive status updates. - - - ```json - { - "code": 0, - "message": "Transaction not refundable" - } - ``` - - Validation errors (missing or invalid parameters) return HTTP 400 with `code: 0` and an `errors` object. - operationId: refundDeposit requestBody: required: true @@ -805,18 +814,20 @@ paths: example: "0x1234567890abcdef1234567890abcdef12345678" request: type: string - description: Request signature + description: | + Base64-encoded request body. See the [authentication guide](/private/http-auth) for signature generation details. nonce: type: string - description: Unique request identifier + description: | + A unique identifier for the request. Use a monotonically increasing value such as a Unix timestamp in milliseconds. example: transactionId: "54bffeb7-7a8f-43f8-bcd8-f14ec10fee85" address: "0x1234567890abcdef1234567890abcdef12345678" - request: "signature" - nonce: "unique_id" + request: "{{request}}" + nonce: "{{nonce}}" responses: "200": - description: Refund request accepted + description: System accepts refund request content: application/json: schema: @@ -831,7 +842,7 @@ paths: example: id: "54bffeb7-7a8f-43f8-bcd8-f14ec10fee85" "400": - description: Validation failed or transaction not refundable + description: Validation fails or transaction does not qualify for refund content: application/json: schema: From 825ff1102afc785ff7c715f0caabd52a1a9d3ee9 Mon Sep 17 00:00:00 2001 From: whitebit-robot Date: Mon, 16 Feb 2026 12:30:59 +0100 Subject: [PATCH 20/84] docs(glossary): align entries with style guide - Rewrite passive voice and remove ambiguous pronouns - Add cross-links to related glossary terms (14 entries) - Rename titles to sentence case, spell out acronyms - Reorder L, M, S, T sections alphabetically - Update EEA/OTO anchor refs in OpenAPI YAML files --- glossary.mdx | 203 +++++++++++++++-------------- openapi/private/http-trade-v4.yaml | 8 +- openapi/private/main_api_v4.yaml | 14 +- 3 files changed, 119 insertions(+), 106 deletions(-) diff --git a/glossary.mdx b/glossary.mdx index 84730c7..15e33e7 100644 --- a/glossary.mdx +++ b/glossary.mdx @@ -7,17 +7,17 @@ description: "Comprehensive glossary of trading terms, cryptocurrency concepts, -[Orders](#orders) that are running for the duration of the trading day +[Orders](#orders) that are running for the duration of the trading day. -Sell [order](#orders) +Sell [order](#orders). -A digital representation of value that you can transfer, store, or [trade](#deal-trade) electronically +A digital representation of value that you can transfer, store, or [trade](#deal-trade) electronically. @@ -36,17 +36,17 @@ A balance that accepts deposits and withdrawals of cryptocurrency and national c -Balance for [spot trading](#spot-trading). The balance is intended solely for non-marginal trading (placing [orders](#orders)), as well as for the currency exchange +Balance for [spot trading](#spot-trading). This balance supports non-marginal trading ([order](#orders) placement) and currency exchange. -Best-bid-offer (BBO) determines limit order prices based on market conditions. In the counterparty method, for buy orders the system uses the lowest ask price in the [order book](#order-book); for sell orders, the highest bid price. In the queue method, for buy orders it uses the highest current buy price (Bid); for sell orders, the highest ask price. +Best-bid-offer (BBO) determines [limit order](#limit-order) prices based on market conditions. In the counterparty method, for buy orders the system uses the lowest ask price in the [order book](#order-book); for sell orders, the highest bid price. The queue method uses the highest current buy price (Bid) for buy orders and the highest ask price for sell orders. -Buy [order](#orders) +Buy [order](#orders). @@ -70,17 +70,17 @@ The cryptocurrency [asset](#assets) that the borrower pledges as a guarantee of -The practice of placing trading servers in close physical proximity to an exchange's matching engine to minimize latency. This setup is crucial for high-frequency trading (HFT) operations. +The practice of placing trading servers in close physical proximity to an exchange's [matching engine](#matching-engine) to minimize [latency](#latency). Colocation is crucial for [high-frequency trading (HFT)](#high-frequency-trading-hft) operations. -"Conditional orders" is a collective term for orders with conditions. Currently, these include [OTO](#OTO) (One Triggers the Other) and [OCO](#OCO-orders) (One Cancels the Other) orders. +"Conditional orders" is a collective term for [orders](#orders) with conditions. Currently, these include [OTO](#one-triggers-the-other-oto) (One Triggers the Other) and [OCO](#oco-orders) (One Cancels the Other) orders. -A unique tool for passive income that allows depositing funds in specific plans and receiving a percentage from holding them for particular periods. Allows you to make profit by lending your funds to the exchange in a certain cryptocurrency by using one of the available plans +Crypto Lending lets you earn passive income by lending your funds to the exchange in a chosen cryptocurrency for a set period. @@ -90,7 +90,7 @@ A unique tool for passive income that allows depositing funds in specific plans -A transaction between two parties in which an [asset](#assets) or commodity is bought or sold at an agreed-upon price, with a record of the transaction typically including information such as the trade price, amount, date, and any [fees](#fee) or commissions associated with the [trade](#deal-trade). +A transaction where two parties buy or sell an [asset](#assets) at an agreed-upon price. The trade record includes the price, amount, date, and any [fees](#fee). @@ -100,16 +100,16 @@ Crypto derivatives are contracts that derive their value from a primary underlyi -Same as [order book](#order-book) +See [Order book](#order-book). ## E - + -The European Economic Area (EEA) is an international agreement that enables the extension of the European Union's single market to non-EU member states. It consists of the EU member states and three EFTA states (Iceland, Liechtenstein, and Norway). +The EEA is an international agreement that enables the extension of the European Union's single market to non-EU member states. The EEA consists of the EU member states and three EFTA states (Iceland, Liechtenstein, and Norway). @@ -134,12 +134,12 @@ A list of all completed (executed) [orders](#orders) that includes order ID, dat -See [Perpetual Futures](#perpetual-futures) +See [Perpetual futures](#perpetual-futures) - + -You can open Long and Short positions and use leverage. You pay a [fee](#fee) for using borrowed funds to each other, not to the exchange. +You can open Long and Short positions and use [leverage](#leverage). You pay a [fee](#fee) for using borrowed funds to each other, not to the exchange. @@ -150,7 +150,7 @@ You can open Long and Short positions and use leverage. You pay a [fee](#fee) fo -An automated trading strategy that involves executing a large number of orders at extremely high speeds, typically utilizing [colocation](#colocation) services to minimize latency. +An automated trading strategy that involves executing a large number of [orders](#orders) at extremely high speeds, typically utilizing [colocation](#colocation) services to minimize [latency](#latency). @@ -163,7 +163,7 @@ An automated trading strategy that involves executing a large number of orders a -A function that cancels all [orders](#orders) automatically when the timer is set. It only cancels orders grouped by concrete [asset](#assets). +A function that cancels all [orders](#orders) automatically when the timer expires. The kill-switch timer only cancels orders grouped by concrete [asset](#assets). @@ -171,6 +171,11 @@ A function that cancels all [orders](#orders) automatically when the timer is se + + +The time delay between sending a trading order and its execution. In [high-frequency trading](#high-frequency-trading-hft), traders measure latency in milliseconds or microseconds. + + See [Crypto Lending](#crypto-lending) @@ -178,18 +183,13 @@ See [Crypto Lending](#crypto-lending) -The ratio of margin to borrowed funds shows how many times the credit exceeds your [assets](#assets). +The ratio of [margin](#margin-trading) to borrowed funds shows how many times the credit exceeds your [assets](#assets). A limit order allows you to buy or sell an [asset](#assets) at a fixed price. - - - -The time delay between sending a trading order and its execution. In [high-frequency trading](#high-frequency-trading-hft), latency is measured in milliseconds or microseconds. - ## M @@ -198,12 +198,12 @@ The time delay between sending a trading order and its execution. In [high-frequ -Trader who places [limit orders](#limit-order) on the [order book](#order-book), which means they set the price and quantity of the [trade](#deal-trade) they want to make, and wait for another trader to accept their [order](#orders) +A maker is a trader who places [limit orders](#limit-order) on the [order book](#order-book), setting the price and quantity of the [trade](#deal-trade), and waits for another trader to accept the [order](#orders). -The use of exchange's funds to trade [assets](#assets), which allows placing [orders](#orders) for sums exceeding the initial deposit several times. The latter is called "margin" and its size depends on the leverage. +The use of exchange's funds to trade [assets](#assets), which allows placing [orders](#orders) for sums exceeding the initial deposit several times. The initial deposit is called "margin," and the margin size depends on the [leverage](#leverage). @@ -213,7 +213,7 @@ The use of exchange's funds to trade [assets](#assets), which allows placing [or -[Market](#market) information (last price, volume, high, low, change) for the last 24 hours. +[Market](#market) information (last price, [volume](#volumetrade-volume), high, low, change) for the last 24 hours. @@ -226,9 +226,14 @@ A market order allows you to buy or sell an [asset](#assets) immediately at the See [Market](#market) + + +The core system of an exchange that pairs buy and sell [orders](#orders). In [colocation](#colocation) setups, exchanges position trading servers close to the matching engine to minimize execution time. + + -A special identifier used in transactions. To deposit and withdraw some cryptocurrencies, such as Ripple (XRP) and Stellar (XLM), you must specify a memo. +A special identifier that some cryptocurrency networks require for transactions. To deposit and withdraw some cryptocurrencies, such as Ripple (XRP) and Stellar (XLM), you must specify a memo. @@ -240,11 +245,6 @@ The currency that you use to buy and sell [assets](#assets) on a trading platfor Cryptocurrency like USDT that exists on different networks (e.g. OMNI, Tron, Ethereum). You select the network when making a deposit or withdrawal. - - - -The core system of an exchange that pairs buy and sell orders. In [colocation](#colocation) setups, trading servers are placed close to the matching engine to minimize execution time. - ## N @@ -252,7 +252,7 @@ The core system of an exchange that pairs buy and sell orders. In [colocation](# -An arbitrary number that can be used just once. +An arbitrary number that you use only once in a request. @@ -262,7 +262,12 @@ An arbitrary number that can be used just once. -An OCO order combines a [limit order](#limit-order) with a [stop-limit](#stop-limit-order); only one executes. When one is filled, the other is automatically canceled. +An OCO order combines a [limit order](#limit-order) with a [stop-limit](#stop-limit-order); only one executes. When one order fills, the platform automatically cancels the other. + + + + +OTO is a trading feature where fulfilling a primary [order](#orders) automatically sets corresponding stop loss and take profit orders. OTO allows specifying prices for stop loss and take profit when creating the primary order. @@ -272,18 +277,13 @@ A separated list of buy (bids) and sell (asks) [active orders](#active-orders) f -Simple contracts that allow you to specify which crypto you want to buy or sell, how much of it and for what price. Orders consist of [trades (deals)](#deal-trade). The execution of all deals executes the order. There are different types of orders: [Market order](#market-order), [Limit order](#limit-order), [Stop market order](#stop-market-order), [Stop limit order](#stop-limit-order), [OCO order](#oco-orders). Orders may have [executed (finished)](#finished-orders) or [unexecuted (active)](#active-orders) status. +Simple contracts that allow you to specify which crypto you want to buy or sell, how much of it and for what price. Orders consist of [trades (deals)](#deal-trade). The execution of all deals executes the order. There are different types of orders: [Market order](#market-order), [Limit order](#limit-order), [Stop market order](#stop-market-order), [Stop limit order](#stop-limit-order), [OCO order](#oco-orders). Orders have either [executed (finished)](#finished-orders) or [unexecuted (active)](#active-orders) status. [Orders](#orders) that request an exchange to buy or sell an [asset](#assets) at a set price and conditions. - - - -OTO (One Triggers the Other) is a trading feature where fulfilling a primary order automatically sets corresponding stop loss and take profit orders. OTO allows specifying prices for stop loss and take profit when creating the primary order. - ## P @@ -295,13 +295,13 @@ OTO (One Triggers the Other) is a trading feature where fulfilling a primary ord See [Market](#market) - + -A type of derivative contract for trading cryptocurrencies that do not have an expiration date and are rolled over daily +A type of [derivative](#derivative) contract for trading cryptocurrencies with no expiration date and daily rollover. -Defines the position direction for a trade when hedge mode is enabled, and only for [Perpetual Futures](#perpetual-futures) trading [Market](#market). +Defines the position direction for a trade when you enable hedge mode, and only for [perpetual futures](#perpetual-futures) trading [Market](#market). "LONG": Represents a long (buy) position. "SHORT": Represents a short (sell) position. "BOTH": Applies to both long and short positions, typically used in query contexts. @@ -314,81 +314,98 @@ The number of digits to the right of the decimal point. -[Fiat](#fiat) currencies have different providers that help people make deposits and withdrawals by bank transfers. +[Fiat](#fiat) currencies have different providers that help you make deposits and withdrawals by bank transfers. ## Q ## R - - - Retail Price Improvement (RPI) defines a limit order mode that improves execution for retail users and keeps the order out of public market data feeds. - **Visibility** + + + +Retail Price Improvement (RPI) defines a [limit order](#limit-order) mode that improves execution for retail users and keeps the order out of public market data feeds. + +**Visibility** - Public `depth` and `bookTicker` feeds exclude RPI orders in both WebSocket and REST responses. Private active order endpoints and private WebSocket streams return RPI orders. The exchange UI order book (web and mobile) displays RPI orders. +Public `depth` and `bookTicker` feeds exclude RPI orders in both WebSocket and REST responses. Private active order endpoints and private WebSocket streams return RPI orders. The exchange UI [order book](#order-book) (web and mobile) displays RPI orders. - **IOC compatibility** +**IOC compatibility** - RPI orders use post-only behavior by design. An RPI order does not support the IOC flag. The API returns error code `37` when a request sets both `rpi=true` and `ioc=true`. +RPI orders use post-only behavior by design. An RPI order does not support the IOC flag. The API returns error code `37` when a request sets both `rpi=true` and `ioc=true`. - **Fees** +**Fees** + +RPI executions apply a specific [fee](#fee) or rebate model defined for the account. When a user trades through a [sub-account](#sub-account), the system applies the effective sub-account fee configuration. Use the `Query Market Fee` or `Query All Market Fees` endpoints to retrieve effective fees. + + - RPI executions apply a specific fee or rebate model defined for the account. When a user trades through a sub-account, the system applies the effective sub-account fee configuration. Use the `Query Market Fee` or `Query All Market Fees` endpoints to retrieve effective fees. - - ## S - - See [Crypto Lending](#crypto-lending) - + - - See [Crypto Lending](#crypto-lending) - +STP is a mechanism that prevents traders from executing trades against their own [orders](#orders). STP helps avoid unintentional self-trading and ensures market integrity by automatically canceling or modifying orders that result in a self-match. + + + + +See [Crypto Lending](#crypto-lending) + + + + +See [Crypto Lending](#crypto-lending) + + + + +Buying and selling [assets](#assets) for immediate settlement. + + + + +An [asset](#assets) that you can trade on an exchange. + - - Self Trade Prevention (STP) is a mechanism that prevents traders from executing trades against their own [orders](#orders). This feature helps avoid unintentional self-trading and ensures market integrity by automatically canceling or modifying orders that would result in a self-match. - + - - Buying and selling [assets](#assets) for immediate settlement - +A stop-limit [order](#orders) has both the [stop](#stop-price) and the limit prices. When the market price at the [pair](#market) reaches the [stop price](#stop-price), the order activates and executes as a basic [limit order](#limit-order). + - - [Asset](#assets) that can be traded on an exchange. - + - - This [order](#orders) has both the [stop](#stop-price) and the limit prices. When the specified market price at this [pair](#market) is reached the order gets activated and is being completed as a basic [limit order](#limit-order). - +A stop-market [order](#orders) executes when the market price reaches the [stop price](#stop-price). Traders use stop-market orders to limit losses during market volatility. + - - This [order](#orders) is completed when the market price reaches a price set by you in advance (the [stop price](#stop-price)). This type of order is often used to prevent losses in the context of market volatility. - + - - A price set by you in advance - +A price that you set in advance to trigger a stop order. + - - A sub-account is an account managed by a main account. A main account assigns specific permissions to a sub-account (for example, a main account disables [margin trading](#margin-trading)). + - A sub-account can use a custom trading fee or rebate model defined for that sub-account. Use [`Query Market Fee`](/private/http-trade-v4/query-market-fee) and [`Query All Market Fees`](/private/http-trade-v4/query-all-market-fees) to retrieve effective fees when an API key belongs to a sub-account. +A sub-account is an account that a main account manages. A main account assigns specific permissions to a sub-account (for example, a main account disables [margin trading](#margin-trading)). - RPI trading uses account-specific fees or rebates. When a user places RPI orders through a sub-account, the system applies the effective sub-account fees. Use [`Query Market Fee`](/private/http-trade-v4/query-market-fee) and [`Query All Market Fees`](/private/http-trade-v4/query-all-market-fees) to verify fees for RPI executions. - +A sub-account can use a custom trading [fee](#fee) or rebate model defined for that sub-account. Use [`Query Market Fee`](/private/http-trade-v4/query-market-fee) and [`Query All Market Fees`](/private/http-trade-v4/query-all-market-fees) to retrieve effective fees when an API key belongs to a sub-account. + +[RPI](#retail-price-improvement-rpi) trading uses account-specific fees or rebates. When a user places RPI orders through a sub-account, the system applies the effective sub-account fees. Use [`Query Market Fee`](/private/http-trade-v4/query-market-fee) and [`Query All Market Fees`](/private/http-trade-v4/query-all-market-fees) to verify fees for RPI executions. + ## T + + +A risk management feature that automatically closes positions at predefined price levels. Take Profit (TP) closes at a higher price; Stop Loss (SL) closes at a lower price. These [orders](#orders) help traders manage risk and lock in profits automatically. + + -A trader who accepts an existing [order](#orders) from the [order book](#order-book), which means they take liquidity from the [market](#market) +A taker accepts an existing [order](#orders) from the [order book](#order-book), taking liquidity from the [market](#market). @@ -405,11 +422,6 @@ See [Deal](#deal-trade) See [Volume](#volumetrade-volume) - - - -A risk management feature that automatically closes positions at predefined price levels. Take Profit (TP) closes at a higher price; Stop Loss (SL) closes at a lower price. These orders help traders manage risk and lock in profits automatically. - ## U @@ -419,7 +431,7 @@ A risk management feature that automatically closes positions at predefined pric -The total number of shares or contracts that buyers and sellers exchange in a [market](#market) on a given day +The total number of shares or contracts that buyers and sellers exchange in a [market](#market) on a given day. @@ -427,12 +439,13 @@ The total number of shares or contracts that buyers and sellers exchange in a [m - WhiteBIT Codes let you turn your funds into a unique alphanumeric code. Easy and free to use. - + +WhiteBIT Codes let you turn your funds into a unique alphanumeric code. Easy and free to use. + ## X ## Y -## Z \ No newline at end of file +## Z diff --git a/openapi/private/http-trade-v4.yaml b/openapi/private/http-trade-v4.yaml index e0d1a2f..c206c78 100644 --- a/openapi/private/http-trade-v4.yaml +++ b/openapi/private/http-trade-v4.yaml @@ -254,10 +254,10 @@ paths: description: "Identifier should be unique and contain letters, dashes, numbers, dots or underscores." stopLoss: type: string - description: "Stop loss price, if exist create [OTO](/glossary#OTO) with stop loss" + description: "Stop loss price, if exist create [OTO](/glossary#one-triggers-the-other-oto) with stop loss" takeProfit: type: string - description: "Take profit price, if exist create [OTO](/glossary#OTO) with take profit" + description: "Take profit price, if exist create [OTO](/glossary#one-triggers-the-other-oto) with take profit" postOnly: type: boolean description: "Orders are guaranteed to be the [maker](/glossary#maker) order when [executed](/glossary#finished-orders)." @@ -334,10 +334,10 @@ paths: description: "Identifier must be unique and contain letters, numbers, dashes, dots, or underscores." stopLoss: type: string - description: "Stop loss price. Creates an [OTO](/glossary#OTO) order with stop loss." + description: "Stop loss price. Creates an [OTO](/glossary#one-triggers-the-other-oto) order with stop loss." takeProfit: type: string - description: "Take profit price. Creates an [OTO](/glossary#OTO) order with take profit." + description: "Take profit price. Creates an [OTO](/glossary#one-triggers-the-other-oto) order with take profit." postOnly: type: boolean description: "Ensures the order adds liquidity and executes as maker." diff --git a/openapi/private/main_api_v4.yaml b/openapi/private/main_api_v4.yaml index da0b957..3242c93 100644 --- a/openapi/private/main_api_v4.yaml +++ b/openapi/private/main_api_v4.yaml @@ -976,7 +976,7 @@ paths: description: | Travel Rule information data array. - ⚠️ Required if currency is crypto and you are from [EEA](/glossary#eea) + ⚠️ Required if currency is crypto and you are from [EEA](/glossary#european-economic-area-eea) properties: type: type: string @@ -984,25 +984,25 @@ paths: description: | Travel rule receiver type. Values: "individual" or "entity" - ⚠️ Required if currency is crypto and you are from [EEA](/glossary#eea) + ⚠️ Required if currency is crypto and you are from [EEA](/glossary#european-economic-area-eea) vasp: type: string description: | Travel rule destination platform (VASP) name. - ⚠️ Required if currency is crypto and you are from [EEA](/glossary#eea) + ⚠️ Required if currency is crypto and you are from [EEA](/glossary#european-economic-area-eea) name: type: string description: | Travel rule. If individual - first_name ; if entity - entity_name - ⚠️ Required if currency is crypto and you are from [EEA](/glossary#eea) + ⚠️ Required if currency is crypto and you are from [EEA](/glossary#european-economic-area-eea) address: type: string description: | Travel rule. If individual - last_name ; if entity - entity_address - ⚠️ Required if currency is crypto and you are from [EEA](/glossary#eea) + ⚠️ Required if currency is crypto and you are from [EEA](/glossary#european-economic-area-eea) paymentDescription: type: string description: | @@ -1547,7 +1547,7 @@ paths: - `Awaiting verification` - 27: The transaction has been frozen due to the lack of data required under the Travel Rule. The user is required to provide this data manually through the exchange interface. - `Confirmation in progress` - 28: The Travel Rule data provided by the user is currently being verified by WhiteBIT. - ⚠️ Due to regulatory requirements in Turkey and [EU](/glossary#eea), every inbound crypto deposit must be put on hold (frozen) until transaction's origin being confirmed. Must be provided certain details if the transaction is from another Virtual Asset Service Provider (VASP) or verify the address if it is from a self-hosted wallet. Only after successful verification can the deposited funds be credited to account. + ⚠️ Due to regulatory requirements in Turkey and [EU](/glossary#european-economic-area-eea), every inbound crypto deposit must be put on hold (frozen) until transaction's origin being confirmed. Must be provided certain details if the transaction is from another Virtual Asset Service Provider (VASP) or verify the address if it is from a self-hosted wallet. Only after successful verification can the deposited funds be credited to account. **Withdraw status codes:** - `Pending` - 1, 2, 6, 10, 11, 12, 13, 14, 15, 16, 17 @@ -4997,7 +4997,7 @@ components: description: "Beneficiary information data. Required if currency [ticker](/glossary#ticker) is one of: UAH_IBAN, USD_VISAMASTER, EUR_VISAMASTER, USD, EUR" travelRule: type: object - description: "Travel Rule information data. Required if currency is crypto and you are from [EEA](/glossary#eea)" + description: "Travel Rule information data. Required if currency is crypto and you are from [EEA](/glossary#european-economic-area-eea)" request: type: string description: "Request signature" From 28293c30e60c2a97f07b1c72a75dcd2d3ec89412 Mon Sep 17 00:00:00 2001 From: whitebit-robot Date: Mon, 16 Feb 2026 13:15:47 +0100 Subject: [PATCH 21/84] docs(faq): align FAQ page with style guide - Add documentation links to 7 answers missing them (7.2.3) - Rewrite 2 question titles: user-perspective pronouns (7.1.1), statement converted to question (7.1.2) - Merge compound question into single sentence (7.1.2) - Replace "our" with "the" for WebSocket feed (2.1.3) - Condense 4 verbose answers to summary + link format (7.2.3) - Remove internal duplication in security and API usage answers --- faq.mdx | 53 +++++++++++++++++++++++------------------------------ 1 file changed, 23 insertions(+), 30 deletions(-) diff --git a/faq.mdx b/faq.mdx index e08da35..8a92328 100644 --- a/faq.mdx +++ b/faq.mdx @@ -14,10 +14,12 @@ If the rate limit for an endpoint is exceeded, you will receive a 429 error. To - Wait for the rate limit window to reset - Check the specific rate limit value in the endpoint description - Consider implementing rate limiting in your code + +For more details, see the [API v4 overview](/public/http-v4). -CORS requests to this endpoint are forbidden for security reasons. Make the request from your backend instead of client-side. +CORS requests to this endpoint are forbidden for security reasons. Make the request from your backend instead of client-side. For endpoint details, see the [Market activity endpoint](/public/http-v4/market-activity). @@ -26,6 +28,8 @@ Nonce errors occur when timestamps or request ordering are invalid. To resolve: 1. Debug your code implementation 2. Recreate your API keys 3. Ensure your system time is properly synchronized + +For details on nonce requirements, see the [Authentication guide](/private/http-auth). @@ -34,6 +38,8 @@ These endpoints are restricted to B2B partner services only. To gain access: - Contact [support@whitebit.com](mailto:support@whitebit.com) - Request permissions for Smartplan endpoints - Provide your use case details + +For endpoint details, see the [Crypto Lending documentation](/private/http-main-v4/get-plans). @@ -52,24 +58,28 @@ For more details, see the [Kline documentation](/public/websocket/kline). The system only shows the last 100 deals by default. To see more: -- Subscribe to our WebSocket feed +- Subscribe to the WebSocket feed - Accumulate and store the data on your side - Process the data as needed for your use case + +For more details, see the [Trades channel documentation](/public/websocket/trades). ## Transfers and withdrawals - + Transfers may take up to 2 seconds to complete. When making transfers and withdrawals: - Wait for transfers to complete (approximately 2 seconds) - Don't initiate withdrawals before transfer completion - Implement proper error handling for transfer states + +For endpoint details, see the [Transfer between balances](/private/http-main-v4/transfer-between-balances) documentation. - + This occurs when the withdrawal amount plus the fee exceeds your available balance. Remember to: - Account for withdrawal fees in your calculations @@ -81,12 +91,14 @@ This occurs when the withdrawal amount plus the fee exceeds your available balan ## Webhooks - + Yes, HTTPS is required: - Communication occurs over port 443 - SSL/TLS encryption is mandatory - HTTP connections are not supported + +For more details, see the [Webhook documentation](/platform/webhook). @@ -99,6 +111,8 @@ You can check currency status through the assets endpoint: - URL: [https://whitebit.com/api/v4/public/assets](https://whitebit.com/api/v4/public/assets) - This endpoint provides real-time status of all currencies - Check the currency-specific enabled/disabled flags + +For endpoint details and response schema, see the [Asset status list](/public/http-v4/asset-status-list) documentation. @@ -106,24 +120,13 @@ You can check currency status through the assets endpoint: -Keep your keys private and never share them. To maintain API key security: - -- Never share your API keys -- Store keys securely (use environment variables) -- Restrict IP addresses when possible -- Use the minimum required permissions +Store your API keys securely using environment variables, restrict IP access, and use the minimum required permissions. Never share your keys. For details, see the [Authentication guide](/private/http-auth). -Immediately revoke the key and create new ones. If you suspect key compromise: - -1. Immediately delete the compromised key -2. Review account activity for unauthorized actions -3. Create new API keys with fresh permissions -4. Update your application with the new keys -5. Contact support if unauthorized activity is detected +Immediately delete the compromised key, review your account activity for unauthorized actions, and create new API keys. Contact support if you detect unauthorized activity. For details, see the [Authentication guide](/private/http-auth). @@ -133,23 +136,13 @@ For details, see the [Authentication guide](/private/http-auth). -Use WebSocket for real-time data, batch requests, and implement rate limiting. For optimal API performance: - -- Use WebSocket for real-time data -- Batch requests when possible -- Implement proper rate limiting -- Cache frequently accessed data +Use WebSocket for real-time data, batch requests when possible, implement proper rate limiting, and cache frequently accessed data. For details, see the [WebSocket API](/public/websocket). -Implement automatic reconnection with exponential backoff. To handle disconnections effectively: - -- Implement automatic reconnection logic -- Use exponential backoff for retries -- Maintain local order state -- Set up monitoring and alerts +Implement automatic reconnection with exponential backoff. Maintain local order state and set up monitoring and alerts for connection issues. For details, see the [WebSocket API](/public/websocket). From 950ff70bfc786f03835250bea22131981bc05c69 Mon Sep 17 00:00:00 2001 From: whitebit-robot Date: Mon, 16 Feb 2026 13:17:35 +0100 Subject: [PATCH 22/84] fix(api): simplify refund deposit endpoint description --- openapi/private/main_api_v4.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openapi/private/main_api_v4.yaml b/openapi/private/main_api_v4.yaml index 3242c93..84a0d36 100644 --- a/openapi/private/main_api_v4.yaml +++ b/openapi/private/main_api_v4.yaml @@ -751,7 +751,7 @@ paths: - Deposit summary: Refund a deposit description: | - Refund a deposit. Refund is available only for canceled deposits that support approves for refund. + Refund a deposit. Refund is available only for canceled deposits. Obtain `transactionId` from the `deposit.canceled` webhook (`uniqueId`) or from the deposit/withdraw history in the WhiteBIT interface after support confirms refund availability. @@ -786,7 +786,7 @@ paths: - The finance department processes refunds manually. Processing is not instant. Use webhooks to receive status updates. + Refund processing is not instant. Use webhooks to receive status updates. operationId: refundDeposit requestBody: From 476bbcd4ca64dd9b012756dfe9d7c53d4dacaf20 Mon Sep 17 00:00:00 2001 From: whitebit-robot Date: Mon, 16 Feb 2026 18:47:29 +0100 Subject: [PATCH 23/84] docs(api): improve parameter descriptions in OpenAPI specs --- openapi/private/http-trade-v4.yaml | 20 ++++++++++++++++---- openapi/private/main_api_v4.yaml | 4 +++- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/openapi/private/http-trade-v4.yaml b/openapi/private/http-trade-v4.yaml index c206c78..356a507 100644 --- a/openapi/private/http-trade-v4.yaml +++ b/openapi/private/http-trade-v4.yaml @@ -254,10 +254,16 @@ paths: description: "Identifier should be unique and contain letters, dashes, numbers, dots or underscores." stopLoss: type: string - description: "Stop loss price, if exist create [OTO](/glossary#one-triggers-the-other-oto) with stop loss" + description: | + Stop loss price. + + When provided, the system creates an [OTO](/glossary#one-triggers-the-other-oto) order with a stop loss condition. takeProfit: type: string - description: "Take profit price, if exist create [OTO](/glossary#one-triggers-the-other-oto) with take profit" + description: | + Take profit price. + + When provided, the system creates an [OTO](/glossary#one-triggers-the-other-oto) order with a take profit condition. postOnly: type: boolean description: "Orders are guaranteed to be the [maker](/glossary#maker) order when [executed](/glossary#finished-orders)." @@ -334,10 +340,16 @@ paths: description: "Identifier must be unique and contain letters, numbers, dashes, dots, or underscores." stopLoss: type: string - description: "Stop loss price. Creates an [OTO](/glossary#one-triggers-the-other-oto) order with stop loss." + description: | + Stop loss price. + + When provided, the system creates an [OTO](/glossary#one-triggers-the-other-oto) order with a stop loss condition. takeProfit: type: string - description: "Take profit price. Creates an [OTO](/glossary#one-triggers-the-other-oto) order with take profit." + description: | + Take profit price. + + When provided, the system creates an [OTO](/glossary#one-triggers-the-other-oto) order with a take profit condition. postOnly: type: boolean description: "Ensures the order adds liquidity and executes as maker." diff --git a/openapi/private/main_api_v4.yaml b/openapi/private/main_api_v4.yaml index 84a0d36..cd4c549 100644 --- a/openapi/private/main_api_v4.yaml +++ b/openapi/private/main_api_v4.yaml @@ -751,7 +751,9 @@ paths: - Deposit summary: Refund a deposit description: | - Refund a deposit. Refund is available only for canceled deposits. + Refund a deposit. + + The system processes refunds only for deposits with status `canceled`. Obtain `transactionId` from the `deposit.canceled` webhook (`uniqueId`) or from the deposit/withdraw history in the WhiteBIT interface after support confirms refund availability. From 90a8b2ca9de5f47f17d3384d9e0b4e8de33f0f19 Mon Sep 17 00:00:00 2001 From: whitebit-robot Date: Mon, 16 Feb 2026 18:59:39 +0100 Subject: [PATCH 24/84] docs(api): clarify fee selection logic for market fee endpoints - Document futures fee as minimum of custom and market fee - Add concrete example with fee values to POST endpoint - Clarify market parameter returns fees for specified market only - Expand response field descriptions with calculation logic - Restructure GET endpoint description for clarity --- openapi/private/http-trade-v4.yaml | 37 +++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/openapi/private/http-trade-v4.yaml b/openapi/private/http-trade-v4.yaml index 356a507..b73adcb 100644 --- a/openapi/private/http-trade-v4.yaml +++ b/openapi/private/http-trade-v4.yaml @@ -1585,13 +1585,15 @@ paths: post: summary: Query Market Fee description: | - This endpoint retrieves the effective maker and taker fees for the API key owner for a specific market. + This endpoint returns maker and taker fees for a specific market. - The `taker` and `maker` fields represent spot trading fees. The `futures_taker` and `futures_maker` fields represent futures trading fees. + The `maker` and `taker` fields represent spot trading fees. The `futures_maker` and `futures_taker` fields represent futures trading fees. - When called with a sub-account API key, the response reflects the effective sub-account fees, including custom overrides where applicable. + The system calculates the effective futures fee as the lower value between the user-specific custom fee and the market-specific fee. - RPI executions may apply custom fees or rebates. Use this endpoint to verify effective fees when using RPI via sub-accounts. + When the market fee is lower than the assigned custom fee, the system returns the market fee. + + Example: If the custom futures taker fee equals `0.026` and the market fee equals `0.02`, the response returns `0.02`. tags: - Market Fee security: @@ -1600,7 +1602,14 @@ paths: - name: market in: query required: true - description: "Available market. Example: BTC_USDT" + description: | + Market to query. + + If the request includes the `market` parameter, the system returns fees for the specified market only. + + When fee values are identical across markets, the response contains identical values regardless of the specified market. + + Example: BTC_USDT schema: type: string example: BTC_USDT @@ -1626,11 +1635,17 @@ paths: example: "0.1" futures_taker: type: string - description: "Futures taker fee rate (default or custom if set by user)" + description: | + Futures taker fee rate for the specified market. + + The system returns the lower value between the assigned custom fee and the market-specific fee. example: "0.0002" futures_maker: type: string - description: "Futures maker fee rate (default or custom if set by user)" + description: | + Futures maker fee rate for the specified market. + + The system returns the lower value between the assigned custom fee and the market-specific fee. example: "0.0001" '422': description: Validation failed @@ -1642,13 +1657,13 @@ paths: get: summary: Query All Market Fees description: | - This endpoint retrieves the effective maker and taker fees for the API key owner for all markets, including any custom fees. + This endpoint returns maker and taker fees for all markets, including assigned custom fees. - The `taker` and `maker` fields represent default spot trading fees. The `futures_taker` and `futures_maker` fields represent futures trading fees (default or custom if set by the user). The `custom_fee` object contains market-specific custom spot fees. + The `maker` and `taker` fields represent default spot trading fees. - When called with a sub-account API key, the response reflects the effective sub-account fees, including custom overrides where applicable. + The `futures_maker` and `futures_taker` fields represent effective futures fees. The effective futures fee equals the lower value between the assigned custom fee and the default market fee. - RPI executions may apply custom fees or rebates. Use this endpoint to verify effective fees when using RPI via sub-accounts. + The `custom_fee` object contains market-specific custom spot fees. tags: - Market Fee security: From 6695a030802cf32697da2deedd85cdb458cb2718 Mon Sep 17 00:00:00 2001 From: whitebit-robot Date: Tue, 17 Feb 2026 09:06:16 +0100 Subject: [PATCH 25/84] docs(api): add transactionId to sub-account transfer endpoints - Add transactionId field to transfer response for correlation - Add transactionId to transfer history schema - Deprecate id field in favor of transactionId - Add changelog entry for February 11, 2025 --- changelog.mdx | 16 ++++++++++++++++ openapi/private/main_api_v4.yaml | 8 ++++++++ 2 files changed, 24 insertions(+) diff --git a/changelog.mdx b/changelog.mdx index 64e67c7..fb9e0da 100644 --- a/changelog.mdx +++ b/changelog.mdx @@ -6,6 +6,22 @@ description: "Track all updates, improvements, and fixes to the WhiteBIT API Pla ## Previous Changes + +## API Documentation Updates +**Sub-account transfer endpoints: add transactionId for correlation** + +The response of `/api/v4/sub-account/transfer` and `/api/v4/sub-account/transfer/history` includes the `transactionId` field. + +Use `transactionId` to correlate transfer operations with transfer history records. + +The `id` field in transfer history is deprecated. Replace `id` with `transactionId`. + + + + + + + ## Documentation Updates **Clarified Book Ticker stream update interval** diff --git a/openapi/private/main_api_v4.yaml b/openapi/private/main_api_v4.yaml index cd4c549..6a8db2c 100644 --- a/openapi/private/main_api_v4.yaml +++ b/openapi/private/main_api_v4.yaml @@ -4083,6 +4083,10 @@ paths: application/json: schema: type: object + properties: + transactionId: + type: string + description: External identifier of the transaction. Use this value to correlate with transfer history responses. "400": description: Request validation failed content: @@ -5372,9 +5376,13 @@ components: SubAccountTransfer: type: object properties: + transactionId: + type: string + description: "Transaction identifier. Same value as id. Use this field to correlate with the transfer endpoint response." id: type: string description: "Transfer identifier" + deprecated: true direction: type: string description: "Transfer direction (main_to_sub or sub_to_main)" From 295fd199006f463a6445c1cf75f44231d153f94a Mon Sep 17 00:00:00 2001 From: whitebit-robot Date: Tue, 17 Feb 2026 09:35:54 +0100 Subject: [PATCH 26/84] docs(style): enforce universal pronoun prohibition across all doc types --- faq.mdx | 70 ++++++++++++++++++++++++++-------------------------- glossary.mdx | 36 +++++++++++++-------------- 2 files changed, 53 insertions(+), 53 deletions(-) diff --git a/faq.mdx b/faq.mdx index 8a92328..06d414e 100644 --- a/faq.mdx +++ b/faq.mdx @@ -8,36 +8,36 @@ import { RegionBaseUrl } from '/components/RegionBaseUrl.jsx'; ## Rate limits and errors - -If the rate limit for an endpoint is exceeded, you will receive a 429 error. To resolve this: + +Rate limit 429 errors occur when an endpoint exceeds its rate limit. To resolve: - Wait for the rate limit window to reset -- Check the specific rate limit value in the endpoint description -- Consider implementing rate limiting in your code +- Check the specific rate limit value in the endpoint documentation +- Implement rate limiting in code For more details, see the [API v4 overview](/public/http-v4). - -CORS requests to this endpoint are forbidden for security reasons. Make the request from your backend instead of client-side. For endpoint details, see the [Market activity endpoint](/public/http-v4/market-activity). + +CORS requests to the ticker endpoint are forbidden for security reasons. Make the request from a backend server instead of client-side code. For endpoint details, see the [Market activity endpoint](/public/http-v4/market-activity). - + Nonce errors occur when timestamps or request ordering are invalid. To resolve: -1. Debug your code implementation -2. Recreate your API keys -3. Ensure your system time is properly synchronized +1. Debug the code implementation +2. Recreate API keys +3. Ensure system time is properly synchronized For details on nonce requirements, see the [Authentication guide](/private/http-auth). - -These endpoints are restricted to B2B partner services only. To gain access: + +Smartplan endpoints are restricted to B2B partner services only. To gain access: - Contact [support@whitebit.com](mailto:support@whitebit.com) - Request permissions for Smartplan endpoints -- Provide your use case details +- Provide use case details For endpoint details, see the [Crypto Lending documentation](/private/http-main-v4/get-plans). @@ -46,8 +46,8 @@ For endpoint details, see the [Crypto Lending documentation](/private/http-main- ## WebSocket - -Yes, you can use multiple WebSocket connections or the HTTP method. There are two solutions: + +Multiple time periods for pairs are available through multiple WebSocket connections or the HTTP method. Two solutions: 1. Open multiple WebSocket connections 2. Use the equivalent HTTP method instead @@ -55,12 +55,12 @@ Yes, you can use multiple WebSocket connections or the HTTP method. There are tw For more details, see the [Kline documentation](/public/websocket/kline). - -The system only shows the last 100 deals by default. To see more: + +The system shows only the last 100 deals by default. To access more: - Subscribe to the WebSocket feed -- Accumulate and store the data on your side -- Process the data as needed for your use case +- Accumulate and store the data +- Process the data as needed For more details, see the [Trades channel documentation](/public/websocket/trades). @@ -69,20 +69,20 @@ For more details, see the [Trades channel documentation](/public/websocket/trade ## Transfers and withdrawals - + Transfers may take up to 2 seconds to complete. When making transfers and withdrawals: - Wait for transfers to complete (approximately 2 seconds) -- Don't initiate withdrawals before transfer completion +- Avoid initiating withdrawals before transfer completion - Implement proper error handling for transfer states For endpoint details, see the [Transfer between balances](/private/http-main-v4/transfer-between-balances) documentation. - -This occurs when the withdrawal amount plus the fee exceeds your available balance. Remember to: + +Insufficient funds errors occur when the withdrawal amount plus the fee exceeds available balance. Important considerations: -- Account for withdrawal fees in your calculations +- Account for withdrawal fees in calculations - Check the [fees documentation](/private/http-main-v4/get-fees) - Ensure sufficient balance for both amount and fees @@ -91,8 +91,8 @@ This occurs when the withdrawal amount plus the fee exceeds your available balan ## Webhooks - -Yes, HTTPS is required: + +HTTPS is required for Webhook API communication: - Communication occurs over port 443 - SSL/TLS encryption is mandatory @@ -105,11 +105,11 @@ For more details, see the [Webhook documentation](/platform/webhook). ## API and assets - -You can check currency status through the assets endpoint: + +Check currency status through the assets endpoint: - URL: [https://whitebit.com/api/v4/public/assets](https://whitebit.com/api/v4/public/assets) -- This endpoint provides real-time status of all currencies +- The endpoint provides real-time status of all currencies - Check the currency-specific enabled/disabled flags For endpoint details and response schema, see the [Asset status list](/public/http-v4/asset-status-list) documentation. @@ -119,14 +119,14 @@ For endpoint details and response schema, see the [Asset status list](/public/ht ## Security and API keys - -Store your API keys securely using environment variables, restrict IP access, and use the minimum required permissions. Never share your keys. + +Store API keys securely using environment variables, restrict IP access, and use minimum required permissions. Never commit keys to version control. For details, see the [Authentication guide](/private/http-auth). - -Immediately delete the compromised key, review your account activity for unauthorized actions, and create new API keys. Contact support if you detect unauthorized activity. + +Immediately delete the compromised key, review account activity for unauthorized actions, and create new API keys. Contact support if unauthorized activity is detected. For details, see the [Authentication guide](/private/http-auth). @@ -135,13 +135,13 @@ For details, see the [Authentication guide](/private/http-auth). ## API usage - + Use WebSocket for real-time data, batch requests when possible, implement proper rate limiting, and cache frequently accessed data. For details, see the [WebSocket API](/public/websocket). - + Implement automatic reconnection with exponential backoff. Maintain local order state and set up monitoring and alerts for connection issues. For details, see the [WebSocket API](/public/websocket). diff --git a/glossary.mdx b/glossary.mdx index 15e33e7..68974bb 100644 --- a/glossary.mdx +++ b/glossary.mdx @@ -17,7 +17,7 @@ Sell [order](#orders). -A digital representation of value that you can transfer, store, or [trade](#deal-trade) electronically. +A digital representation of value transferable, storable, or tradable electronically. @@ -80,7 +80,7 @@ The practice of placing trading servers in close physical proximity to an exchan -Crypto Lending lets you earn passive income by lending your funds to the exchange in a chosen cryptocurrency for a set period. +Crypto Lending enables earning passive income by lending funds to the exchange in a chosen cryptocurrency for a set period. @@ -119,7 +119,7 @@ The EEA is an international agreement that enables the extension of the European -The platform charges a fee when you perform crypto transactions. +The platform charges a fee for crypto transactions. @@ -139,7 +139,7 @@ See [Perpetual futures](#perpetual-futures) -You can open Long and Short positions and use [leverage](#leverage). You pay a [fee](#fee) for using borrowed funds to each other, not to the exchange. +Futures trading supports opening Long and Short positions and using [leverage](#leverage). Traders pay a [fee](#fee) for using borrowed funds to each other, not to the exchange. @@ -183,12 +183,12 @@ See [Crypto Lending](#crypto-lending) -The ratio of [margin](#margin-trading) to borrowed funds shows how many times the credit exceeds your [assets](#assets). +The ratio of [margin](#margin-trading) to borrowed funds shows how many times credit exceeds available [assets](#assets). -A limit order allows you to buy or sell an [asset](#assets) at a fixed price. +A limit order specifies a fixed price for buying or selling an [asset](#assets). @@ -208,7 +208,7 @@ The use of exchange's funds to trade [assets](#assets), which allows placing [or -[Assets](#assets) that you can trade for each other on an exchange. +[Assets](#assets) tradable for each other on an exchange. @@ -218,7 +218,7 @@ The use of exchange's funds to trade [assets](#assets), which allows placing [or -A market order allows you to buy or sell an [asset](#assets) immediately at the best available price. +A market order specifies an [asset](#assets) for immediate purchase or sale at the best available price. @@ -233,17 +233,17 @@ The core system of an exchange that pairs buy and sell [orders](#orders). In [co -A special identifier that some cryptocurrency networks require for transactions. To deposit and withdraw some cryptocurrencies, such as Ripple (XRP) and Stellar (XLM), you must specify a memo. +A special identifier that some cryptocurrency networks require for transactions. Depositing and withdrawing some cryptocurrencies, such as Ripple (XRP) and Stellar (XLM), requires specifying a memo. -The currency that you use to buy and sell [assets](#assets) on a trading platform. +The currency used to buy and sell [assets](#assets) on a trading platform. -Cryptocurrency like USDT that exists on different networks (e.g. OMNI, Tron, Ethereum). You select the network when making a deposit or withdrawal. +Cryptocurrency like USDT that exists on different networks (e.g. OMNI, Tron, Ethereum). Traders select the network when making a deposit or withdrawal. @@ -252,7 +252,7 @@ Cryptocurrency like USDT that exists on different networks (e.g. OMNI, Tron, Eth -An arbitrary number that you use only once in a request. +An arbitrary number used only once in a request. @@ -277,7 +277,7 @@ A separated list of buy (bids) and sell (asks) [active orders](#active-orders) f -Simple contracts that allow you to specify which crypto you want to buy or sell, how much of it and for what price. Orders consist of [trades (deals)](#deal-trade). The execution of all deals executes the order. There are different types of orders: [Market order](#market-order), [Limit order](#limit-order), [Stop market order](#stop-market-order), [Stop limit order](#stop-limit-order), [OCO order](#oco-orders). Orders have either [executed (finished)](#finished-orders) or [unexecuted (active)](#active-orders) status. +Simple contracts that specify which crypto to buy or sell, the quantity, and the price. Orders consist of [trades (deals)](#deal-trade). The execution of all deals executes the order. There are different types of orders: [Market order](#market-order), [Limit order](#limit-order), [Stop market order](#stop-market-order), [Stop limit order](#stop-limit-order), [OCO order](#oco-orders). Orders have either [executed (finished)](#finished-orders) or [unexecuted (active)](#active-orders) status. @@ -301,7 +301,7 @@ A type of [derivative](#derivative) contract for trading cryptocurrencies with n -Defines the position direction for a trade when you enable hedge mode, and only for [perpetual futures](#perpetual-futures) trading [Market](#market). +Defines the position direction for a trade when hedge mode is enabled, and only for [perpetual futures](#perpetual-futures) trading [Market](#market). "LONG": Represents a long (buy) position. "SHORT": Represents a short (sell) position. "BOTH": Applies to both long and short positions, typically used in query contexts. @@ -314,7 +314,7 @@ The number of digits to the right of the decimal point. -[Fiat](#fiat) currencies have different providers that help you make deposits and withdrawals by bank transfers. +[Fiat](#fiat) currencies have different providers that facilitate deposits and withdrawals by bank transfers. @@ -366,7 +366,7 @@ Buying and selling [assets](#assets) for immediate settlement. -An [asset](#assets) that you can trade on an exchange. +An [asset](#assets) tradable on an exchange. @@ -381,7 +381,7 @@ A stop-market [order](#orders) executes when the market price reaches the [stop -A price that you set in advance to trigger a stop order. +A price set in advance to trigger a stop order. @@ -440,7 +440,7 @@ The total number of shares or contracts that buyers and sellers exchange in a [m -WhiteBIT Codes let you turn your funds into a unique alphanumeric code. Easy and free to use. +WhiteBIT Codes enable converting funds into a unique alphanumeric code. Easy and free to use. From b5a19b2094451a47d36e58408a49084fdc0b8446 Mon Sep 17 00:00:00 2001 From: whitebit-robot Date: Tue, 17 Feb 2026 09:38:14 +0100 Subject: [PATCH 27/84] docs(api): add coming soon note to refund webhook reference --- openapi/private/main_api_v4.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openapi/private/main_api_v4.yaml b/openapi/private/main_api_v4.yaml index 6a8db2c..2f27984 100644 --- a/openapi/private/main_api_v4.yaml +++ b/openapi/private/main_api_v4.yaml @@ -788,7 +788,7 @@ paths: - Refund processing is not instant. Use webhooks to receive status updates. + Refund processing is not instant. Use webhooks to receive status updates (coming soon). operationId: refundDeposit requestBody: From 4d91aec8695515570bf6392076cf9d115fb596b4 Mon Sep 17 00:00:00 2001 From: whitebit-robot Date: Tue, 17 Feb 2026 12:08:52 +0100 Subject: [PATCH 28/84] docs(style): eliminate pronouns and improve clarity across documentation --- faq.mdx | 2 +- glossary.mdx | 48 +++++++++++++++--------------- openapi/private/http-trade-v4.yaml | 12 +++----- openapi/private/main_api_v4.yaml | 18 +++++------ 4 files changed, 38 insertions(+), 42 deletions(-) diff --git a/faq.mdx b/faq.mdx index 06d414e..f71389c 100644 --- a/faq.mdx +++ b/faq.mdx @@ -9,7 +9,7 @@ import { RegionBaseUrl } from '/components/RegionBaseUrl.jsx'; -Rate limit 429 errors occur when an endpoint exceeds its rate limit. To resolve: +Rate limit 429 errors occur when an endpoint exceeds the rate limit. To resolve: - Wait for the rate limit window to reset - Check the specific rate limit value in the endpoint documentation diff --git a/glossary.mdx b/glossary.mdx index 68974bb..e47ff0b 100644 --- a/glossary.mdx +++ b/glossary.mdx @@ -7,7 +7,7 @@ description: "Comprehensive glossary of trading terms, cryptocurrency concepts, -[Orders](#orders) that are running for the duration of the trading day. +[Orders](#orders) running for the duration of the trading day. @@ -31,7 +31,7 @@ Balance for [margin](#margin-trading) and [futures trading](#futures-trading) -A balance that accepts deposits and withdrawals of cryptocurrency and national currency. +A balance accepting deposits and withdrawals of cryptocurrency and national currency. @@ -55,7 +55,7 @@ Buy [order](#orders). -A unique identifier for a user's card that facilitates payments and manages subscriptions without exposing the actual card information. +A unique identifier for a user's card, used to facilitate payments and manage subscriptions without exposing the actual card information. @@ -65,7 +65,7 @@ See [WhiteBIT Codes](#whitebit-codes) -The cryptocurrency [asset](#assets) that the borrower pledges as a guarantee of loan repayment. +The cryptocurrency [asset](#assets) pledged by the borrower as a guarantee of loan repayment. @@ -95,7 +95,7 @@ A transaction where two parties buy or sell an [asset](#assets) at an agreed-upo -Crypto derivatives are contracts that derive their value from a primary underlying [asset](#assets). The primary asset is a cryptocurrency such as Bitcoin. +Crypto derivatives are contracts deriving value from a primary underlying [asset](#assets). The primary asset is a cryptocurrency such as Bitcoin. @@ -109,7 +109,7 @@ See [Order book](#order-book). -The EEA is an international agreement that enables the extension of the European Union's single market to non-EU member states. The EEA consists of the EU member states and three EFTA states (Iceland, Liechtenstein, and Norway). +The EEA is an international agreement enabling the extension of the European Union's single market to non-EU member states. The EEA consists of the EU member states and three EFTA states (Iceland, Liechtenstein, and Norway). @@ -124,12 +124,12 @@ The platform charges a fee for crypto transactions. -A currency (a medium of exchange) that government regulation establishes as [money](#money) but that does not have intrinsic value (value independent of the nominal value, such as a precious metal might have). +A currency (a medium of exchange) established by government regulation as [money](#money) but without intrinsic value (value independent of the nominal value, such as a precious metal might have). -A list of all completed (executed) [orders](#orders) that includes order ID, date, amount, price, conditions, and other relevant data. +A list of all completed (executed) [orders](#orders) including order ID, date, amount, price, conditions, and other relevant data. @@ -150,7 +150,7 @@ Futures trading supports opening Long and Short positions and using [leverage](# -An automated trading strategy that involves executing a large number of [orders](#orders) at extremely high speeds, typically utilizing [colocation](#colocation) services to minimize [latency](#latency). +An automated trading strategy involving executing a large number of [orders](#orders) at extremely high speeds, typically utilizing [colocation](#colocation) services to minimize [latency](#latency). @@ -163,7 +163,7 @@ An automated trading strategy that involves executing a large number of [orders] -A function that cancels all [orders](#orders) automatically when the timer expires. The kill-switch timer only cancels orders grouped by concrete [asset](#assets). +A function to cancel all [orders](#orders) automatically when the timer expires. The kill-switch timer only cancels orders grouped by concrete [asset](#assets). @@ -173,7 +173,7 @@ A function that cancels all [orders](#orders) automatically when the timer expir -The time delay between sending a trading order and its execution. In [high-frequency trading](#high-frequency-trading-hft), traders measure latency in milliseconds or microseconds. +The time delay between sending a trading order and order execution. In [high-frequency trading](#high-frequency-trading-hft), traders measure latency in milliseconds or microseconds. @@ -203,7 +203,7 @@ A maker is a trader who places [limit orders](#limit-order) on the [order book]( -The use of exchange's funds to trade [assets](#assets), which allows placing [orders](#orders) for sums exceeding the initial deposit several times. The initial deposit is called "margin," and the margin size depends on the [leverage](#leverage). +The use of exchange's funds to trade [assets](#assets) enables placing [orders](#orders) for sums exceeding the initial deposit several times. The initial deposit is called "margin," and the margin size depends on the [leverage](#leverage). @@ -228,12 +228,12 @@ See [Market](#market) -The core system of an exchange that pairs buy and sell [orders](#orders). In [colocation](#colocation) setups, exchanges position trading servers close to the matching engine to minimize execution time. +The core system of an exchange pairing buy and sell [orders](#orders). In [colocation](#colocation) setups, exchanges position trading servers close to the matching engine to minimize execution time. -A special identifier that some cryptocurrency networks require for transactions. Depositing and withdrawing some cryptocurrencies, such as Ripple (XRP) and Stellar (XLM), requires specifying a memo. +A special identifier some cryptocurrency networks require for transactions. Depositing and withdrawing some cryptocurrencies, such as Ripple (XRP) and Stellar (XLM), requires specifying a memo. @@ -243,7 +243,7 @@ The currency used to buy and sell [assets](#assets) on a trading platform. -Cryptocurrency like USDT that exists on different networks (e.g. OMNI, Tron, Ethereum). Traders select the network when making a deposit or withdrawal. +Cryptocurrency like USDT exists on different networks (e.g. OMNI, Tron, Ethereum). Traders select the network when making a deposit or withdrawal. @@ -277,12 +277,12 @@ A separated list of buy (bids) and sell (asks) [active orders](#active-orders) f -Simple contracts that specify which crypto to buy or sell, the quantity, and the price. Orders consist of [trades (deals)](#deal-trade). The execution of all deals executes the order. There are different types of orders: [Market order](#market-order), [Limit order](#limit-order), [Stop market order](#stop-market-order), [Stop limit order](#stop-limit-order), [OCO order](#oco-orders). Orders have either [executed (finished)](#finished-orders) or [unexecuted (active)](#active-orders) status. +Simple contracts specifying the crypto to buy or sell, the quantity, and the price. Orders consist of [trades (deals)](#deal-trade). The execution of all deals executes the order. There are different types of orders: [Market order](#market-order), [Limit order](#limit-order), [Stop market order](#stop-market-order), [Stop limit order](#stop-limit-order), [OCO order](#oco-orders). Orders have either [executed (finished)](#finished-orders) or [unexecuted (active)](#active-orders) status. -[Orders](#orders) that request an exchange to buy or sell an [asset](#assets) at a set price and conditions. +[Orders](#orders) requesting an exchange to buy or sell an [asset](#assets) at a set price and conditions. @@ -314,7 +314,7 @@ The number of digits to the right of the decimal point. -[Fiat](#fiat) currencies have different providers that facilitate deposits and withdrawals by bank transfers. +[Fiat](#fiat) currencies have different providers facilitating deposits and withdrawals by bank transfers. @@ -325,7 +325,7 @@ The number of digits to the right of the decimal point. -Retail Price Improvement (RPI) defines a [limit order](#limit-order) mode that improves execution for retail users and keeps the order out of public market data feeds. +Retail Price Improvement (RPI) defines a [limit order](#limit-order) mode improving execution for retail users and keeping the order out of public market data feeds. **Visibility** @@ -346,7 +346,7 @@ RPI executions apply a specific [fee](#fee) or rebate model defined for the acco -STP is a mechanism that prevents traders from executing trades against their own [orders](#orders). STP helps avoid unintentional self-trading and ensures market integrity by automatically canceling or modifying orders that result in a self-match. +STP is a mechanism preventing traders from executing trades against own [orders](#orders). STP helps avoid unintentional self-trading and ensures market integrity by automatically canceling or modifying orders resulting in a self-match. @@ -386,9 +386,9 @@ A price set in advance to trigger a stop order. -A sub-account is an account that a main account manages. A main account assigns specific permissions to a sub-account (for example, a main account disables [margin trading](#margin-trading)). +A main account manages a sub-account. The main account assigns specific permissions to the sub-account (for example, the main account disables [margin trading](#margin-trading)). -A sub-account can use a custom trading [fee](#fee) or rebate model defined for that sub-account. Use [`Query Market Fee`](/private/http-trade-v4/query-market-fee) and [`Query All Market Fees`](/private/http-trade-v4/query-all-market-fees) to retrieve effective fees when an API key belongs to a sub-account. +A sub-account can use a custom trading [fee](#fee) or rebate model defined for the sub-account. Use [`Query Market Fee`](/private/http-trade-v4/query-market-fee) and [`Query All Market Fees`](/private/http-trade-v4/query-all-market-fees) to retrieve effective fees when an API key belongs to a sub-account. [RPI](#retail-price-improvement-rpi) trading uses account-specific fees or rebates. When a user places RPI orders through a sub-account, the system applies the effective sub-account fees. Use [`Query Market Fee`](/private/http-trade-v4/query-market-fee) and [`Query All Market Fees`](/private/http-trade-v4/query-all-market-fees) to verify fees for RPI executions. @@ -400,7 +400,7 @@ A sub-account can use a custom trading [fee](#fee) or rebate model defined for t -A risk management feature that automatically closes positions at predefined price levels. Take Profit (TP) closes at a higher price; Stop Loss (SL) closes at a lower price. These [orders](#orders) help traders manage risk and lock in profits automatically. +A risk management feature to automatically close positions at predefined price levels. Take Profit (TP) closes at a higher price; Stop Loss (SL) closes at a lower price. These [orders](#orders) help traders manage risk and lock in profits automatically. @@ -431,7 +431,7 @@ See [Volume](#volumetrade-volume) -The total number of shares or contracts that buyers and sellers exchange in a [market](#market) on a given day. +The total number of shares or contracts buyers and sellers exchange in a [market](#market) on a given day. diff --git a/openapi/private/http-trade-v4.yaml b/openapi/private/http-trade-v4.yaml index b73adcb..28ec22a 100644 --- a/openapi/private/http-trade-v4.yaml +++ b/openapi/private/http-trade-v4.yaml @@ -1585,7 +1585,7 @@ paths: post: summary: Query Market Fee description: | - This endpoint returns maker and taker fees for a specific market. + Returns maker and taker fees for a specific market. The `maker` and `taker` fields represent spot trading fees. The `futures_maker` and `futures_taker` fields represent futures trading fees. @@ -1636,16 +1636,12 @@ paths: futures_taker: type: string description: | - Futures taker fee rate for the specified market. - - The system returns the lower value between the assigned custom fee and the market-specific fee. + Effective futures taker fee rate for the specified market. The system returns the lower value between the custom fee (if assigned) and the default market fee. example: "0.0002" futures_maker: type: string description: | - Futures maker fee rate for the specified market. - - The system returns the lower value between the assigned custom fee and the market-specific fee. + Effective futures maker fee rate for the specified market. The system returns the lower value between the custom fee (if assigned) and the default market fee. example: "0.0001" '422': description: Validation failed @@ -1657,7 +1653,7 @@ paths: get: summary: Query All Market Fees description: | - This endpoint returns maker and taker fees for all markets, including assigned custom fees. + Returns maker and taker fees for all markets, including assigned custom fees. The `maker` and `taker` fields represent default spot trading fees. diff --git a/openapi/private/main_api_v4.yaml b/openapi/private/main_api_v4.yaml index 2f27984..de03fe3 100644 --- a/openapi/private/main_api_v4.yaml +++ b/openapi/private/main_api_v4.yaml @@ -978,7 +978,7 @@ paths: description: | Travel Rule information data array. - ⚠️ Required if currency is crypto and you are from [EEA](/glossary#european-economic-area-eea) + ⚠️ Required if currency is crypto and the account is from [EEA](/glossary#european-economic-area-eea) properties: type: type: string @@ -986,25 +986,25 @@ paths: description: | Travel rule receiver type. Values: "individual" or "entity" - ⚠️ Required if currency is crypto and you are from [EEA](/glossary#european-economic-area-eea) + ⚠️ Required if currency is crypto and the account is from [EEA](/glossary#european-economic-area-eea) vasp: type: string description: | Travel rule destination platform (VASP) name. - ⚠️ Required if currency is crypto and you are from [EEA](/glossary#european-economic-area-eea) + ⚠️ Required if currency is crypto and the account is from [EEA](/glossary#european-economic-area-eea) name: type: string description: | Travel rule. If individual - first_name ; if entity - entity_name - ⚠️ Required if currency is crypto and you are from [EEA](/glossary#european-economic-area-eea) + ⚠️ Required if currency is crypto and the account is from [EEA](/glossary#european-economic-area-eea) address: type: string description: | Travel rule. If individual - last_name ; if entity - entity_address - ⚠️ Required if currency is crypto and you are from [EEA](/glossary#european-economic-area-eea) + ⚠️ Required if currency is crypto and the account is from [EEA](/glossary#european-economic-area-eea) paymentDescription: type: string description: | @@ -1549,7 +1549,7 @@ paths: - `Awaiting verification` - 27: The transaction has been frozen due to the lack of data required under the Travel Rule. The user is required to provide this data manually through the exchange interface. - `Confirmation in progress` - 28: The Travel Rule data provided by the user is currently being verified by WhiteBIT. - ⚠️ Due to regulatory requirements in Turkey and [EU](/glossary#european-economic-area-eea), every inbound crypto deposit must be put on hold (frozen) until transaction's origin being confirmed. Must be provided certain details if the transaction is from another Virtual Asset Service Provider (VASP) or verify the address if it is from a self-hosted wallet. Only after successful verification can the deposited funds be credited to account. + ⚠️ Due to regulatory requirements in Turkey and [EU](/glossary#european-economic-area-eea), the system places every inbound crypto deposit on hold (frozen) until confirming the transaction's origin. The sender must provide certain details if the transaction is from another Virtual Asset Service Provider (VASP) or verify the address if from a self-hosted wallet. The system credits deposited funds to the account only after successful verification. **Withdraw status codes:** - `Pending` - 1, 2, 6, 10, 11, 12, 13, 14, 15, 16, 17 @@ -4086,7 +4086,7 @@ paths: properties: transactionId: type: string - description: External identifier of the transaction. Use this value to correlate with transfer history responses. + description: External identifier of the transaction. Correlate transfer history responses using the transactionId value. "400": description: Request validation failed content: @@ -5003,7 +5003,7 @@ components: description: "Beneficiary information data. Required if currency [ticker](/glossary#ticker) is one of: UAH_IBAN, USD_VISAMASTER, EUR_VISAMASTER, USD, EUR" travelRule: type: object - description: "Travel Rule information data. Required if currency is crypto and you are from [EEA](/glossary#european-economic-area-eea)" + description: "Travel Rule information data. Required if currency is crypto and the account is from [EEA](/glossary#european-economic-area-eea)" request: type: string description: "Request signature" @@ -5378,7 +5378,7 @@ components: properties: transactionId: type: string - description: "Transaction identifier. Same value as id. Use this field to correlate with the transfer endpoint response." + description: "Transaction identifier. Same value as id. Correlate with the transfer endpoint response using the transactionId field." id: type: string description: "Transfer identifier" From 5498ef1018df58433308ac7ecc84f88d87dd489c Mon Sep 17 00:00:00 2001 From: whitebit-robot Date: Tue, 17 Feb 2026 16:51:07 +0100 Subject: [PATCH 29/84] chore(infra): add stage branch to mirror workflow From e3d2cad8dea1217476f175c6a4c8ff7dff7b6617 Mon Sep 17 00:00:00 2001 From: whitebit-robot Date: Tue, 17 Feb 2026 18:56:20 +0100 Subject: [PATCH 30/84] Navigation was changed; --- api-reference/overview.mdx | 86 +++ changelog.mdx | 3 - components/RegionBaseUrl.jsx | 18 +- docs.json | 627 +++++++++--------- index.mdx | 96 +-- platform/overview.mdx | 25 +- private/http-auth.mdx | 2 +- private/http-main-v4/overview.mdx | 103 +-- .../http-main-v4/sub-accounts-overview.mdx | 81 +++ private/http-trade-v4/collateral-overview.mdx | 100 +++ private/http-trade-v4/overview.mdx | 141 +--- private/websocket/balance-margin.mdx | 4 + private/websocket/balance-spot.mdx | 4 + private/websocket/borrows-events.mdx | 4 + private/websocket/borrows.mdx | 4 + private/websocket/deals.mdx | 4 + private/websocket/index.mdx | 231 +------ private/websocket/margin-positions-events.mdx | 4 + private/websocket/orders-executed.mdx | 5 + private/websocket/orders-pending.mdx | 5 + private/websocket/positions.mdx | 4 + public/http-v4/index.mdx | 31 +- public/websocket/index.mdx | 200 +----- snippets/api-monitor.jsx | 29 +- websocket/overview.mdx | 139 ++++ 25 files changed, 899 insertions(+), 1051 deletions(-) create mode 100644 api-reference/overview.mdx create mode 100644 private/http-main-v4/sub-accounts-overview.mdx create mode 100644 private/http-trade-v4/collateral-overview.mdx create mode 100644 websocket/overview.mdx diff --git a/api-reference/overview.mdx b/api-reference/overview.mdx new file mode 100644 index 0000000..c52a84f --- /dev/null +++ b/api-reference/overview.mdx @@ -0,0 +1,86 @@ +--- +title: API Reference +sidebarTitle: Overview +description: "WhiteBIT REST API overview — base URLs, rate limits, error formats, and quick links to all endpoint groups." +--- + +import { RegionBaseUrl } from '/components/RegionBaseUrl.jsx'; + + + +## Base URL + +All REST API endpoints are available at: + +``` +https://whitebit.com/api/v4/{endpoint} +``` + +- **Public endpoints** use the `GET` method. Parameters are sent as query strings. +- **Private endpoints** use the `POST` method. Parameters are sent as JSON in the request body. +- All endpoints return time in Unix-time format and respond with JSON. + +## Authentication + +Private endpoints require API key authentication with HMAC-SHA512 signed requests. See the [Authentication Guide](/private/http-auth) for setup instructions, header requirements, and code examples. + +## Rate Limits + +| Scope | Limit | +|-------|-------| +| Public REST endpoints | 2000 requests / 10 sec | +| Private REST endpoints | Varies per endpoint (see individual docs) | + +## Error Format + +All V4 endpoints return errors as JSON. The format differs slightly between public and private APIs: + +**Public endpoints:** + +```json +{ + "success": false, + "message": "ERROR MESSAGE", + "params": [] +} +``` + +**Private endpoints:** + +```json +{ + "code": 0, + "message": "MESSAGE", + "errors": { + "PARAM1": ["MESSAGE"], + "PARAM2": ["MESSAGE"] + } +} +``` + +For full details, see the [Market Data overview](/public/http-v4/index) and [Spot Trading overview](/private/http-trade-v4/overview). + +--- + +## Endpoint Groups + + + + Public market info, orderbook, trades, fees, server status, and more. No authentication required. + + + Place and manage spot orders, query execution history, and control kill-switch timers. + + + Manage collateral positions, leverage, hedge mode, and collateral order types (limit, market, OCO, OTO). + + + Estimate, confirm, and review currency conversion operations. + + + Main balance, deposits, withdrawals, transfers, codes, crypto lending, fees, and mining pool. + + + Create and manage sub-accounts, balances, transfers, and API keys. + + diff --git a/changelog.mdx b/changelog.mdx index fb9e0da..e6ab292 100644 --- a/changelog.mdx +++ b/changelog.mdx @@ -136,9 +136,6 @@ To enhance performance and focus on the most relevant data, our API limits data - - - diff --git a/components/RegionBaseUrl.jsx b/components/RegionBaseUrl.jsx index 5fce5e3..ae89eb6 100644 --- a/components/RegionBaseUrl.jsx +++ b/components/RegionBaseUrl.jsx @@ -95,9 +95,23 @@ export const RegionBaseUrl = ({ className = "", showBaseUrl = true }) => { const buttons = Array.from(document.querySelectorAll('button, [role="combobox"]')); const serverSelector = buttons.find(btn => { + // Skip if button is inside a link (Card component) or navigation element + if (btn.closest('a') || btn.closest('[class*="card"]') || btn.closest('nav')) { + return false; + } + const txt = btn.textContent || ""; - return (txt.includes('Server') || txt.includes('whitebit.com') || txt.includes('whitebit.eu')) - && !txt.includes('Run') && !txt.includes('Send'); + + // Only match actual server selector dropdowns, not card titles + // Must include full server description like "Production Server" or "EU Server" + // OR be a combobox role (API playground selector) + const isServerDropdown = ( + (txt.includes('Production Server') || txt.includes('EU Server') || + txt.includes('WhiteBIT Global Server') || txt.includes('WhiteBIT EU Server')) && + !txt.includes('Run') && !txt.includes('Send') + ) || btn.getAttribute('role') === 'combobox'; + + return isServerDropdown; }); if (serverSelector) { diff --git a/docs.json b/docs.json index f3209b9..2e85f4c 100644 --- a/docs.json +++ b/docs.json @@ -22,327 +22,358 @@ "navigation": { "tabs": [ { - "tab": "Home", - "pages": [ - "index" + "tab": "Docs", + "groups": [ + { + "group": " ", + "pages": [ + "index" + ] + }, + { + "group": "Getting Started", + "pages": [ + "platform/overview" + ] + }, + { + "group": "OAuth", + "pages": [ + "platform/oauth/overview", + "platform/oauth/usage/overview" + ] + }, + { + "group": " ", + "pages": [ + "platform/webhook", + "platform/colocation", + "platform/self-trade-prevention" + ] + }, + { + "group": "Guides", + "pages": [ + "guides/client-order-id", + "guides/fireblocks", + "guides/order-parameter-rules" + ] + }, + { + "group": " ", + "pages": [ + "sdks", + "changelog", + "glossary", + "faq" + ] + } ] }, { - "tab": "Guides", + "tab": "API Reference", "groups": [ { "group": " ", "pages": [ + "api-reference/overview", + "private/http-auth" + ] + }, + { + "group": "Market Data", + "pages": [ + "public/http-v4/index", { - "group": "Platform", + "group": "Server & Status", "pages": [ - "platform/overview", - "platform/self-trade-prevention", - "platform/colocation", - "platform/webhook", - { - "group": "OAuth", - "pages": [ - "platform/oauth/overview", - { - "group": "Usage", - "pages": [ - "platform/oauth/usage/overview", - "platform/oauth/usage/oauth", - "platform/oauth/usage/get-access-token", - "platform/oauth/usage/refresh-token", - { - "group": "Account Endpoints", - "pages": [ - "platform/oauth/usage/account-transactions", - "platform/oauth/usage/currency-conversions", - "platform/oauth/usage/orders-history", - "platform/oauth/usage/executed-deals", - "platform/oauth/usage/main-account-balance", - "platform/oauth/usage/spot-account-balance" - ] - } - ] - } - ] - } + "public/http-v4/server-status", + "public/http-v4/server-time", + "public/http-v4/maintenance-status" ] }, { - "group": "Public", + "group": "Markets & Assets", "pages": [ - { - "group": "API v1", - "pages": [ - "public/http-v1/market-info", - "public/http-v1/market-activity", - "public/http-v1/single-market-activity", - "public/http-v1/kline", - "public/http-v1/symbols", - "public/http-v1/order-depth", - "public/http-v1/trade-history" - ] - }, - { - "group": "API v2", - "pages": [ - "public/http-v2/market-info", - "public/http-v2/market-activity", - "public/http-v2/recent-trades", - "public/http-v2/fee", - "public/http-v2/asset-status-list", - "public/http-v2/orderbook" - ] - }, - { - "group": "API v4", - "pages": [ - "public/http-v4/index", - "public/http-v4/maintenance-status", - "public/http-v4/market-info", - "public/http-v4/market-activity", - "public/http-v4/asset-status-list", - "public/http-v4/orderbook", - "public/http-v4/depth", - "public/http-v4/recent-trades", - "public/http-v4/fee", - "public/http-v4/server-time", - "public/http-v4/server-status", - "public/http-v4/collateral-markets-list", - "public/http-v4/available-futures-markets-list", - "public/http-v4/funding-history", - "public/http-v4/mining-pool-overview" - ] - }, - { - "group": "WebSocket API", - "pages": [ - "public/websocket/index", - "public/websocket/service", - "public/websocket/kline", - "public/websocket/lastprice", - "public/websocket/market", - "public/websocket/market-today", - "public/websocket/trades", - "public/websocket/depth", - "public/websocket/book-ticker" - ] - } + "public/http-v4/market-info", + "public/http-v4/market-activity", + "public/http-v4/asset-status-list", + "public/http-v4/collateral-markets-list", + "public/http-v4/available-futures-markets-list" ] }, { - "group": "Private", + "group": "Order Book & Trades", "pages": [ - "private/http-auth", - { - "group": "Main API v4", - "pages": [ - "private/http-main-v4/overview", - { - "group": "Main Balance", - "pages": [ - "private/http-main-v4/main-balance", - "private/http-main-v4/get-cryptocurrency-deposit-address", - "private/http-main-v4/get-fiat-deposit-address", - "private/http-main-v4/refund-deposit", - "private/http-main-v4/issue-jwt-token", - "private/http-main-v4/profile-websocket-token", - "private/http-main-v4/issue-card-token", - "private/http-main-v4/create-withdraw-request", - "private/http-main-v4/create-withdraw-request-with-specific-amount", - "private/http-main-v4/transfer-between-balances", - "private/http-main-v4/get-deposit-withdraw-history", - "private/http-main-v4/create-new-address-for-deposit" - ] - }, - { - "group": "Codes", - "pages": [ - "private/http-main-v4/create-code", - "private/http-main-v4/apply-code", - "private/http-main-v4/get-my-codes", - "private/http-main-v4/get-codes-history" - ] - }, - { - "group": "Crypto Lending - Fixed", - "pages": [ - "private/http-main-v4/get-plans", - "private/http-main-v4/invest", - "private/http-main-v4/close-investment", - "private/http-main-v4/get-investments-history", - "private/http-main-v4/get-interest-payments-history" - ] - }, - { - "group": "Crypto Lending - Flex", - "pages": [ - "private/http-main-v4/get-flex-plans", - "private/http-main-v4/get-user-flex-investments", - "private/http-main-v4/get-flex-investment-history", - "private/http-main-v4/get-flex-payment-history", - "private/http-main-v4/create-flex-investment", - "private/http-main-v4/withdraw-from-flex-investment", - "private/http-main-v4/close-flex-investment", - "private/http-main-v4/update-flex-auto-reinvestment" - ] - }, - { - "group": "Fees", - "pages": [ - "private/http-main-v4/get-fees" - ] - }, - { - "group": "Sub Account", - "pages": [ - "private/http-main-v4/create-sub-account", - "private/http-main-v4/delete-sub-account", - "private/http-main-v4/edit-sub-account", - "private/http-main-v4/list-of-sub-accounts", - "private/http-main-v4/sub-account-transfer", - "private/http-main-v4/block-sub-account", - "private/http-main-v4/unblock-sub-account", - "private/http-main-v4/sub-account-balances", - "private/http-main-v4/get-sub-account-transfer-history", - "private/http-main-v4/create-sub-account-api-key", - "private/http-main-v4/edit-sub-account-api-key", - "private/http-main-v4/delete-sub-account-api-key", - "private/http-main-v4/list-sub-account-api-keys", - "private/http-main-v4/reset-sub-account-api-key", - "private/http-main-v4/list-sub-account-api-key-ip-addresses", - "private/http-main-v4/create-sub-account-api-key-ip-address", - "private/http-main-v4/delete-sub-account-api-key-ip-address" - ] - }, - { - "group": "Mining Pool", - "pages": [ - "private/http-main-v4/get-rewards", - "private/http-main-v4/get-mining-account-hashrate" - ] - }, - { - "group": "Credit Line", - "pages": [ - "private/http-main-v4/list-credit-lines" - ] - } - ] - }, - { - "group": "Trade API v1", - "pages": [ - "private/http-trade-v1/overview", - "private/http-trade-v1/trading-balance-by-currency", - "private/http-trade-v1/trading-balances", - "private/http-trade-v1/create-limit-order", - "private/http-trade-v1/cancel-order", - "private/http-trade-v1/query-unexecuted-active-orders", - "private/http-trade-v1/query-order-history", - "private/http-trade-v1/query-executed-order-history-by-single-market", - "private/http-trade-v1/query-executed-order-history-by-all-markets", - "private/http-trade-v1/query-executed-order-deals" - ] - }, - { - "group": "Trade API v4", - "pages": [ - "private/http-trade-v4/overview", - { - "group": "Market Fee", - "pages": [ - "private/http-trade-v4/query-market-fee", - "private/http-trade-v4/query-all-market-fees" - ] - }, - { - "group": "Spot Trading", - "pages": [ - "private/http-trade-v4/trading-balance", - "private/http-trade-v4/create-limit-order", - "private/http-trade-v4/bulk-limit-order", - "private/http-trade-v4/create-market-order", - "private/http-trade-v4/create-buy-stock-market-order", - "private/http-trade-v4/create-stop-limit-order", - "private/http-trade-v4/create-stop-market-order", - "private/http-trade-v4/cancel-order", - "private/http-trade-v4/cancel-all-orders", - "private/http-trade-v4/query-unexecuted-orders", - "private/http-trade-v4/query-executed-order-history", - "private/http-trade-v4/query-executed-order-deals", - "private/http-trade-v4/query-executed-orders", - "private/http-trade-v4/modify-order", - "private/http-trade-v4/sync-kill-switch-timer", - "private/http-trade-v4/status-kill-switch-timer" - ] - }, - { - "group": "Collateral Trading", - "pages": [ - "private/http-trade-v4/collateral-account-balance", - "private/http-trade-v4/collateral-account-balance-summary", - "private/http-trade-v4/collateral-limit-order", - "private/http-trade-v4/collateral-bulk-limit-order", - "private/http-trade-v4/collateral-market-order", - "private/http-trade-v4/collateral-stop-limit-order", - "private/http-trade-v4/collateral-trigger-market-order", - "private/http-trade-v4/collateral-account-summary", - "private/http-trade-v4/open-positions", - "private/http-trade-v4/close-position", - "private/http-trade-v4/positions-history", - "private/http-trade-v4/funding-history", - "private/http-trade-v4/change-collateral-account-leverage", - "private/http-trade-v4/collateral-account-hedge-mode", - "private/http-trade-v4/update-collateral-account-hedge-mode", - "private/http-trade-v4/query-unexecuted-conditional-orders", - "private/http-trade-v4/query-unexecuted-oco-orders", - "private/http-trade-v4/create-collateral-oco-order", - "private/http-trade-v4/cancel-conditional-order", - "private/http-trade-v4/cancel-oco-order", - "private/http-trade-v4/cancel-oto-order" - ] - }, - { - "group": "Convert", - "pages": [ - "private/http-trade-v4/convert-estimate", - "private/http-trade-v4/convert-confirm", - "private/http-trade-v4/convert-history" - ] - } - ] - }, - { - "group": "WebSocket API", - "pages": [ - "private/websocket/index", - "private/websocket/authorize", - "private/websocket/balance-spot", - "private/websocket/balance-margin", - "private/websocket/orders-pending", - "private/websocket/orders-executed", - "private/websocket/deals", - "private/websocket/positions", - "private/websocket/margin-positions-events", - "private/websocket/borrows", - "private/websocket/borrows-events" - ] - } + "public/http-v4/orderbook", + "public/http-v4/depth", + "public/http-v4/recent-trades" ] }, { - "group": "Guides", + "group": "Fees & Funding", "pages": [ - "guides/client-order-id", - "guides/fireblocks", - "guides/order-parameter-rules" + "public/http-v4/fee", + "public/http-v4/funding-history" ] }, - "sdks", - "changelog", - "glossary", - "faq" + "public/http-v4/mining-pool-overview" + ] + }, + { + "group": "Spot Trading", + "pages": [ + "private/http-trade-v4/overview", + { + "group": "Market Fee", + "pages": [ + "private/http-trade-v4/query-market-fee", + "private/http-trade-v4/query-all-market-fees" + ] + }, + { + "group": "Order Management", + "pages": [ + "private/http-trade-v4/trading-balance", + "private/http-trade-v4/create-limit-order", + "private/http-trade-v4/bulk-limit-order", + "private/http-trade-v4/create-market-order", + "private/http-trade-v4/create-buy-stock-market-order", + "private/http-trade-v4/create-stop-limit-order", + "private/http-trade-v4/create-stop-market-order", + "private/http-trade-v4/modify-order", + "private/http-trade-v4/cancel-order", + "private/http-trade-v4/cancel-all-orders" + ] + }, + { + "group": "Order Queries", + "pages": [ + "private/http-trade-v4/query-unexecuted-orders", + "private/http-trade-v4/query-executed-order-history", + "private/http-trade-v4/query-executed-order-deals", + "private/http-trade-v4/query-executed-orders" + ] + }, + { + "group": "Kill Switch", + "pages": [ + "private/http-trade-v4/sync-kill-switch-timer", + "private/http-trade-v4/status-kill-switch-timer" + ] + } + ] + }, + { + "group": "Collateral Trading", + "pages": [ + "private/http-trade-v4/collateral-overview", + { + "group": "Account & Balance", + "pages": [ + "private/http-trade-v4/collateral-account-balance", + "private/http-trade-v4/collateral-account-balance-summary", + "private/http-trade-v4/collateral-account-summary", + "private/http-trade-v4/change-collateral-account-leverage", + "private/http-trade-v4/collateral-account-hedge-mode", + "private/http-trade-v4/update-collateral-account-hedge-mode" + ] + }, + { + "group": "Order Management", + "pages": [ + "private/http-trade-v4/collateral-limit-order", + "private/http-trade-v4/collateral-bulk-limit-order", + "private/http-trade-v4/collateral-market-order", + "private/http-trade-v4/collateral-stop-limit-order", + "private/http-trade-v4/collateral-trigger-market-order", + "private/http-trade-v4/create-collateral-oco-order", + "private/http-trade-v4/cancel-oco-order", + "private/http-trade-v4/cancel-conditional-order", + "private/http-trade-v4/cancel-oto-order" + ] + }, + { + "group": "Order Queries", + "pages": [ + "private/http-trade-v4/query-unexecuted-conditional-orders", + "private/http-trade-v4/query-unexecuted-oco-orders" + ] + }, + { + "group": "Position Management", + "pages": [ + "private/http-trade-v4/open-positions", + "private/http-trade-v4/close-position", + "private/http-trade-v4/positions-history", + "private/http-trade-v4/funding-history" + ] + } + ] + }, + { + "group": "Convert", + "pages": [ + "private/http-trade-v4/convert-estimate", + "private/http-trade-v4/convert-confirm", + "private/http-trade-v4/convert-history" + ] + }, + { + "group": "Account & Wallet", + "pages": [ + "private/http-main-v4/overview", + { + "group": "Main Balance & Transfers", + "pages": [ + "private/http-main-v4/main-balance", + "private/http-main-v4/get-cryptocurrency-deposit-address", + "private/http-main-v4/get-fiat-deposit-address", + "private/http-main-v4/refund-deposit", + "private/http-main-v4/issue-jwt-token", + "private/http-main-v4/profile-websocket-token", + "private/http-main-v4/issue-card-token", + "private/http-main-v4/create-withdraw-request", + "private/http-main-v4/create-withdraw-request-with-specific-amount", + "private/http-main-v4/transfer-between-balances", + "private/http-main-v4/get-deposit-withdraw-history", + "private/http-main-v4/create-new-address-for-deposit" + ] + }, + { + "group": "Codes", + "pages": [ + "private/http-main-v4/create-code", + "private/http-main-v4/apply-code", + "private/http-main-v4/get-my-codes", + "private/http-main-v4/get-codes-history" + ] + }, + { + "group": "Crypto Lending - Fixed", + "pages": [ + "private/http-main-v4/get-plans", + "private/http-main-v4/invest", + "private/http-main-v4/close-investment", + "private/http-main-v4/get-investments-history", + "private/http-main-v4/get-interest-payments-history" + ] + }, + { + "group": "Crypto Lending - Flex", + "pages": [ + "private/http-main-v4/get-flex-plans", + "private/http-main-v4/get-user-flex-investments", + "private/http-main-v4/get-flex-investment-history", + "private/http-main-v4/get-flex-payment-history", + "private/http-main-v4/create-flex-investment", + "private/http-main-v4/withdraw-from-flex-investment", + "private/http-main-v4/close-flex-investment", + "private/http-main-v4/update-flex-auto-reinvestment" + ] + }, + { + "group": "Mining Pool", + "pages": [ + "private/http-main-v4/get-rewards", + "private/http-main-v4/get-mining-account-hashrate" + ] + }, + "private/http-main-v4/get-fees", + "private/http-main-v4/list-credit-lines" + ] + }, + { + "group": "Sub-Accounts", + "pages": [ + "private/http-main-v4/sub-accounts-overview", + { + "group": "Account Management", + "pages": [ + "private/http-main-v4/create-sub-account", + "private/http-main-v4/delete-sub-account", + "private/http-main-v4/edit-sub-account", + "private/http-main-v4/list-of-sub-accounts", + "private/http-main-v4/block-sub-account", + "private/http-main-v4/unblock-sub-account" + ] + }, + { + "group": "Balance & Transfers", + "pages": [ + "private/http-main-v4/sub-account-transfer", + "private/http-main-v4/sub-account-balances", + "private/http-main-v4/get-sub-account-transfer-history" + ] + }, + { + "group": "API Key Management", + "pages": [ + "private/http-main-v4/create-sub-account-api-key", + "private/http-main-v4/edit-sub-account-api-key", + "private/http-main-v4/delete-sub-account-api-key", + "private/http-main-v4/list-sub-account-api-keys", + "private/http-main-v4/reset-sub-account-api-key", + "private/http-main-v4/list-sub-account-api-key-ip-addresses", + "private/http-main-v4/create-sub-account-api-key-ip-address", + "private/http-main-v4/delete-sub-account-api-key-ip-address" + ] + } + ] + }, + { + "group": "OAuth", + "pages": [ + "platform/oauth/usage/oauth", + "platform/oauth/usage/get-access-token", + "platform/oauth/usage/refresh-token", + "platform/oauth/usage/account-transactions", + "platform/oauth/usage/currency-conversions", + "platform/oauth/usage/orders-history", + "platform/oauth/usage/executed-deals", + "platform/oauth/usage/main-account-balance", + "platform/oauth/usage/spot-account-balance" + ] + } + ] + }, + { + "tab": "WebSocket", + "groups": [ + { + "group": " ", + "pages": [ + "websocket/overview" + ] + }, + { + "group": "Market Streams", + "pages": [ + "public/websocket/index", + "public/websocket/service", + "public/websocket/kline", + "public/websocket/lastprice", + "public/websocket/market", + "public/websocket/market-today", + "public/websocket/trades", + "public/websocket/depth", + "public/websocket/book-ticker" + ] + }, + { + "group": "Account Streams", + "pages": [ + "private/websocket/index", + "private/websocket/authorize", + "private/websocket/balance-spot", + "private/websocket/balance-margin", + "private/websocket/orders-pending", + "private/websocket/orders-executed", + "private/websocket/deals", + "private/websocket/positions", + "private/websocket/margin-positions-events", + "private/websocket/borrows", + "private/websocket/borrows-events" ] } ] diff --git a/index.mdx b/index.mdx index 6be45ce..f5c219d 100644 --- a/index.mdx +++ b/index.mdx @@ -1,89 +1,43 @@ --- -mode: "custom" -title: "WhiteBIT Docs" +title: "Home" --- import {ApiMonitorTable} from '/snippets/api-monitor.jsx'; -
- -
- -
- - -
+

WhiteBIT API Platform

-

- Access the global cryptocurrency market with WhiteBIT's comprehensive trading APIs. Build powerful trading applications with our developer-friendly tools. -

- -
- - Low Latency - - - Global Access - - - 24/7 Support - -
- -
- -
- +

+ Access the global cryptocurrency market with WhiteBIT's comprehensive trading APIs. Build powerful trading applications with our developer-friendly tools. +

+ +
+ + Low Latency + + + Global Access + + + 24/7 Support +
-
+
-
-
+

API Activity

- +
Live Demo
-

Watch our high-performance API handle thousands of trading operations in real-time. From market orders to advanced trading strategies, see the full spectrum of what's possible.

-
+ +

Watch our high-performance API handle thousands of trading operations in real-time. From market orders to advanced trading strategies, see the full spectrum of what's possible.

@@ -146,9 +100,9 @@ Ready to Get Started? Join thousands of developers building with WhiteBIT's API platform

-
- - +
diff --git a/platform/overview.mdx b/platform/overview.mdx index 9dc2541..698159d 100644 --- a/platform/overview.mdx +++ b/platform/overview.mdx @@ -11,31 +11,22 @@ import { RegionBaseUrl } from '/components/RegionBaseUrl.jsx'; WhiteBIT API provides comprehensive access to our trading platform through both `public` and `private` endpoints. By using any WhiteBIT API endpoints, you confirm your agreement to the [Terms of Use](https://whitebit.com/terms/api). -## Public API Endpoints +## REST API -Public endpoints provide access to market data and other non-account-specific information: +The REST API provides access to market data, trading, account management, and more. See the [API Reference](/api-reference/overview) for full details. -- **Cache Policy**: All public endpoints return cached data with specific refresh intervals documented for each endpoint -- **HTTP Method**: Use `GET` for all public requests -- **Parameters**: Pass parameters via [query string](https://en.wikipedia.org/wiki/Query_string) -- **Documentation**: [Public HTTP API v4](/public/http-v4) | [Public HTTP API v2](/public/http-v2) | [Public HTTP API v1](/public/http-v1) - -## Private API Endpoints - -Private endpoints provide secure access to account-specific functions like trading and balance management: - -- **Authentication**: Required for all private endpoints - [Authentication Guide](/private/http-auth) +- **Market Data**: Public endpoints for market info, orderbook, trades, and statistics — use `GET` with [query string](https://en.wikipedia.org/wiki/Query_string) parameters +- **Trading & Account**: Private endpoints for spot trading, collateral trading, account management, and sub-accounts — use `POST` with appropriate Body data and Headers +- **Authentication**: Required for all private endpoints — [Authentication Guide](/private/http-auth) - **IP Restrictions**: Up to 5 trusted IPs can be configured for security -- **HTTP Method**: Use `POST` with appropriate Body data and Headers -- **Documentation**: [Private API v4 - Main](/private/http-main-v4) | [Private API v4 - Trade](/private/http-trade-v4) - **Helper Library**: [API Quick Start Helper](https://github.com/whitebit-exchange/api-quickstart) with examples in multiple languages ## WebSocket API -WebSocket connections provide real-time data streaming and interaction: +WebSocket connections provide real-time data streaming and interaction. See the [WebSocket Overview](/websocket/overview) for connection details. -- [Public WebSocket API](/public/websocket) - Market data, klines, order book, trades, and statistics -- [Private WebSocket API](/private/websocket) - Account data, balances, orders, and deals +- [Market Streams](/public/websocket) — Market data, klines, order book, trades, and statistics +- [Account Streams](/private/websocket) — Account data, balances, orders, and deals ## Other Integration Options diff --git a/private/http-auth.mdx b/private/http-auth.mdx index fef27af..172c5f3 100644 --- a/private/http-auth.mdx +++ b/private/http-auth.mdx @@ -1,6 +1,6 @@ --- title: "Private HTTP API Authentication" -sidebarTitle: "API Authentication" +sidebarTitle: "Authentication" --- ## Overview diff --git a/private/http-main-v4/overview.mdx b/private/http-main-v4/overview.mdx index 7fcaa78..c4b70c9 100644 --- a/private/http-main-v4/overview.mdx +++ b/private/http-main-v4/overview.mdx @@ -1,37 +1,12 @@ --- -title: "Private HTTP API V4 for Main balance changes" +title: "Account & Wallet" sidebarTitle: "Overview" -description: "Private HTTP API V4 endpoints for managing main balance, deposits, withdrawals, codes, crypto lending, fees, sub-accounts, mining pool, and credit lines" +description: "Endpoints for managing main balance, deposits, withdrawals, codes, crypto lending, fees, mining pool, and credit lines." --- -import { RegionBaseUrl } from '/components/RegionBaseUrl.jsx'; +Manage your main account balance, deposits, withdrawals, transfers, WhiteBIT codes, crypto lending, fees, mining pool, and credit lines. - - -## Introduction - -Base URL is https://whitebit.com - -Endpoint example: https://whitebit.com/api/v4/{endpoint} - -All endpoints return time in Unix-time format. - -All endpoints return either a **JSON** object or array. - -For receiving responses from API calls please use http method **POST** - -## Error messages V4 format - -```json -{ - "code": 0, - "message": "MESSAGE", - "errors": { - "PARAM1": ["MESSAGE"], - "PARAM2": ["MESSAGE"] - } -} -``` +For general API conventions (base URL, error format, rate limits), see the [API Reference Overview](/api-reference/overview). --- @@ -154,76 +129,6 @@ For receiving responses from API calls please use http method **POST** --- -## Sub Account - -### Account Management - - - - Create a new sub-account - - - Delete a sub-account - - - Edit sub-account details - - - Get list of all sub-accounts - - - Block a sub-account - - - Unblock a sub-account - - - -### Balance & Transfers - - - - Transfer funds to/from sub-account - - - Get sub-account balances - - - Get sub-account transfer history - - - -### API Key Management - - - - Create API key for sub-account - - - Edit sub-account API key - - - Delete sub-account API key - - - List all sub-account API keys - - - Reset sub-account API key - - - List IP addresses for API key - - - Add IP address to API key whitelist - - - Remove IP address from API key whitelist - - - ---- - ## Mining Pool diff --git a/private/http-main-v4/sub-accounts-overview.mdx b/private/http-main-v4/sub-accounts-overview.mdx new file mode 100644 index 0000000..10ba788 --- /dev/null +++ b/private/http-main-v4/sub-accounts-overview.mdx @@ -0,0 +1,81 @@ +--- +title: "Sub-Accounts" +sidebarTitle: "Overview" +description: "Overview of sub-account management endpoints for creating, managing, and configuring sub-accounts." +--- + +Sub-accounts let you create and manage separate trading accounts under your main account. Control access with dedicated API keys, transfer funds between accounts, and monitor balances. + +For general API conventions (base URL, error format, rate limits), see the [API Reference Overview](/api-reference/overview). + +--- + +## Account Management + + + + Create a new sub-account + + + Delete a sub-account + + + Edit sub-account details + + + Get list of all sub-accounts + + + Block a sub-account + + + Unblock a sub-account + + + +--- + +## Balance & Transfers + + + + Transfer funds to/from sub-account + + + Get sub-account balances + + + Get sub-account transfer history + + + +--- + +## API Key Management + + + + Create API key for sub-account + + + Edit sub-account API key + + + Delete sub-account API key + + + List all sub-account API keys + + + Reset sub-account API key + + + List IP addresses for API key + + + Add IP address to API key whitelist + + + Remove IP address from API key whitelist + + diff --git a/private/http-trade-v4/collateral-overview.mdx b/private/http-trade-v4/collateral-overview.mdx new file mode 100644 index 0000000..e84c1b8 --- /dev/null +++ b/private/http-trade-v4/collateral-overview.mdx @@ -0,0 +1,100 @@ +--- +title: "Collateral Trading" +sidebarTitle: "Overview" +description: "Overview of collateral (margin) trading endpoints for managing positions, leverage, and collateral orders." +--- + +Collateral trading allows you to trade with leverage using margin. Manage your collateral account balance, place various order types (limit, market, stop-limit, OCO, OTO), query open orders, and manage positions. + +For general API conventions (base URL, error format, rate limits), see the [API Reference Overview](/api-reference/overview). + +--- + +## Account & Balance + + + + Get collateral account balance + + + Get collateral account balance summary + + + Get complete collateral account summary + + + Change account leverage + + + Get hedge mode status + + + Update hedge mode settings + + + +--- + +## Order Management + + + + Create a collateral limit order + + + Create multiple collateral limit orders + + + Create a collateral market order + + + Create a collateral stop-limit order + + + Create a collateral trigger market order + + + Create OCO (One-Cancels-Other) order + + + Cancel an OCO order + + + Cancel a conditional order + + + Cancel an OTO (One-Triggers-Other) order + + + +--- + +## Order Queries + + + + Get active conditional orders + + + Get active OCO orders + + + +--- + +## Position Management + + + + Get all open positions + + + Close a specific position + + + Get positions history + + + Get funding history + + diff --git a/private/http-trade-v4/overview.mdx b/private/http-trade-v4/overview.mdx index 45e0ef7..11c87bf 100644 --- a/private/http-trade-v4/overview.mdx +++ b/private/http-trade-v4/overview.mdx @@ -1,36 +1,12 @@ --- -title: "Overview" -description: "Complete guide to WhiteBIT's Private HTTP API V4 for trading operations including spot, collateral, and convert endpoints." +title: "Spot Trading" +sidebarTitle: "Overview" +description: "Endpoints for spot trading operations including order management, order queries, market fees, and kill switch." --- -import { RegionBaseUrl } from '/components/RegionBaseUrl.jsx'; - +Manage spot trading on WhiteBIT — place and cancel orders, query execution history, check market fees, and control kill-switch timers. - -Base URL is https://whitebit.com - -Endpoint example: https://whitebit.com/api/v4/{endpoint} - -All endpoints return time in Unix-time format. - -All endpoints return either a **JSON** object or array. - -For receiving responses from API calls please use http method **POST** - -## Error messages V4 format - -All API V4 endpoints return errors in the following format: - -```json -{ - "code": 0, - "message": "MESSAGE", - "errors": { - "PARAM1": ["MESSAGE"], - "PARAM2": ["MESSAGE"] - } -} -``` +For general API conventions (base URL, error format, rate limits), see the [API Reference Overview](/api-reference/overview). --- @@ -120,110 +96,3 @@ Endpoints for spot trading operations: Get kill-switch timer status - ---- - -## Collateral Trading - -Endpoints for collateral (margin) trading operations: - -### Account & Balance - - - - Get collateral account balance - - - Get collateral account balance summary - - - Get complete collateral account summary - - - Change account leverage - - - Get hedge mode status - - - Update hedge mode settings - - - -### Order Management - - - - Create a collateral limit order - - - Create multiple collateral limit orders - - - Create a collateral market order - - - Create a collateral stop-limit order - - - Create a collateral trigger market order - - - Create OCO (One-Cancels-Other) order - - - Cancel an OCO order - - - Cancel a conditional order - - - Cancel an OTO (One-Triggers-Other) order - - - -### Order Queries - - - - Get active conditional orders - - - Get active OCO orders - - - -### Position Management - - - - Get all open positions - - - Close a specific position - - - Get positions history - - - Get funding history - - - ---- - -## Convert - -Endpoints for currency conversion operations: - - - - Get conversion estimate quote - - - Confirm and execute conversion - - - Get conversion history - - diff --git a/private/websocket/balance-margin.mdx b/private/websocket/balance-margin.mdx index 274fff4..df8256b 100644 --- a/private/websocket/balance-margin.mdx +++ b/private/websocket/balance-margin.mdx @@ -2,3 +2,7 @@ asyncapi: "/asyncapi/private/balance_margin.yaml /ws" title: Balance Margin --- + + +This is a private channel. You must [authorize](/private/websocket/authorize) your WebSocket connection before subscribing. + diff --git a/private/websocket/balance-spot.mdx b/private/websocket/balance-spot.mdx index 4754579..f027ecc 100644 --- a/private/websocket/balance-spot.mdx +++ b/private/websocket/balance-spot.mdx @@ -3,6 +3,10 @@ asyncapi: "/asyncapi/private/balance_spot.yaml /ws" title: Balance Spot --- + +This is a private channel. You must [authorize](/private/websocket/authorize) your WebSocket connection before subscribing. + + Get and subscribe to [spot balance](/glossary#balance-spotbalance-trade) updates. diff --git a/private/websocket/borrows-events.mdx b/private/websocket/borrows-events.mdx index 1ffede3..8b1c68e 100644 --- a/private/websocket/borrows-events.mdx +++ b/private/websocket/borrows-events.mdx @@ -2,3 +2,7 @@ asyncapi: "/asyncapi/private/borrows_events.yaml /ws" title: Borrows Events --- + + +This is a private channel. You must [authorize](/private/websocket/authorize) your WebSocket connection before subscribing. + diff --git a/private/websocket/borrows.mdx b/private/websocket/borrows.mdx index 959909a..65ef26c 100644 --- a/private/websocket/borrows.mdx +++ b/private/websocket/borrows.mdx @@ -2,3 +2,7 @@ asyncapi: "/asyncapi/private/borrows.yaml /ws" title: Borrows --- + + +This is a private channel. You must [authorize](/private/websocket/authorize) your WebSocket connection before subscribing. + diff --git a/private/websocket/deals.mdx b/private/websocket/deals.mdx index da96536..f73f4e1 100644 --- a/private/websocket/deals.mdx +++ b/private/websocket/deals.mdx @@ -2,3 +2,7 @@ asyncapi: "/asyncapi/private/deals.yaml /ws" title: Deals --- + + +This is a private channel. You must [authorize](/private/websocket/authorize) your WebSocket connection before subscribing. + diff --git a/private/websocket/index.mdx b/private/websocket/index.mdx index c4200e8..d49b390 100644 --- a/private/websocket/index.mdx +++ b/private/websocket/index.mdx @@ -1,204 +1,39 @@ --- +title: Account Streams sidebarTitle: Overview -title: Private WebSocket API --- +Browse the available private WebSocket channels below. For connection details, message format, and rate limits, see the [WebSocket Overview](/websocket/overview). + - - - - - - - - - - + + Authenticate your WebSocket connection to access private channels + + + Real-time spot balance updates for your account + + + Real-time margin balance updates for your account + + + Stream of pending (open) orders and their updates + + + Stream of executed orders and their updates + + + Real-time deal execution notifications + + + Real-time position updates for margin trading + + + Event notifications for margin position changes + + + Real-time borrow status updates for margin trading + + + Event notifications for borrow changes and liquidations + - -## WebSocket Connection Management - -WebSocket endpoint is **```wss://api.whitebit.com/ws```** - -The API is based on [JSON RPC](https://www.jsonrpc.org/specification) of WebSocket protocol. - -⚠️️ **Connection Timeout** ⚠️️ -- Server closes websocket connection after **60 seconds of inactivity** -- Inactivity is defined as no messages sent by the client - -### Maintaining Connection -To keep the websocket connection active: -- Send periodic ping messages every **50 seconds** -- Handle potential connection closures gracefully in your application logic - -### Example Implementation - -```javascript -// Establish websocket connection -const socket = new WebSocket("wss://api.whitebit.com/ws"); - -// Set up periodic ping -setInterval(() => { - if (socket.readyState === WebSocket.OPEN) { - socket.send(JSON.stringify({ - id: 0, - method: "ping", - params: [], - })); - } -}, 50000); // Every 50 seconds -``` - - - Rate limit 1000 ws connections per minute and 200 requests per minute in one connection. - - - - -**All endpoints return time in Unix-time format.** - -## Order types - -| Order type ID | Description | -| ------------- | -------------------------------------- | -| 1 | Limit | -| 2 | Market | -| 202 | Market [stock](/glossary#stock) | -| 3 | Stop limit | -| 4 | Stop market | -| 7 | Margin limit | -| 8 | Margin market | -| 9 | Margin stop limit | -| 10 | Margin trigger-stop market | -| 14 | Margin normalization | - -## ⤴️ Request message - -JSON Structure of request message: - -- `id` - **Integer**. Should be unique to handle response for your request. -- `method` - **String**. Name of request. -- `params` - **Array**. Here you pass params for method. - -🚫 WebSocket connection will be closed if invalid JSON was sent. - -### Types of request messages - -- Query (`balanceSpot_request`, `ordersPending_request`, etc) -- Subscription (`balanceSpot_subscribe`, `ordersPending_subscribe`, etc). Repeated subscription will be cancelled for the same data type. - -## ⤵️ Response message - -JSON Structure of response message: - -- `id` - **Integer**. Request ID. -- `result` - **Null** for failure, for success - look for responses below -- `error` - **Null** for success, **JSON Object** for failure: - - `message` - Detailed text - - `code` - Error code - -| Code | Message | -| ----- | ------------------- | -| **1** | invalid argument | -| **2** | internal error | -| **3** | service unavailable | -| **4** | method not found | -| **5** | service timeout | - -## Types of response messages - -- Query result -- Subscription status (success/failed) -- Update events - ---- - -## Examples - -**Example** messages for request with response: - -#### ⤴️ Request: - -```json -{ - "id": 0, - "method": "authorize", - "params": ["", ""] -} -``` - -#### ⤵️ Response: - -```json -{ - "id": 0, - "result": { - "status": "success" - }, - "error": null -} -``` - -**Example** subscription: - -#### ⤴️ Request: - -```json -{ - "id": 0, - "method": "balanceSpot_subscribe", - "params": [] -} -``` - -#### ⤵️ Response: - -```json -{ - "id": 0, - "result": { - "status": "success" - }, - "error": null -} -``` - -#### 🔄 Update events: - -```json -{ - "id": null, - "method": "balanceSpot_update", - "params": [] // look below for params -} -``` diff --git a/private/websocket/margin-positions-events.mdx b/private/websocket/margin-positions-events.mdx index e7a4140..1930deb 100644 --- a/private/websocket/margin-positions-events.mdx +++ b/private/websocket/margin-positions-events.mdx @@ -2,3 +2,7 @@ asyncapi: "/asyncapi/private/margin_positions_events.yaml /ws" title: Margin Positions Events --- + + +This is a private channel. You must [authorize](/private/websocket/authorize) your WebSocket connection before subscribing. + diff --git a/private/websocket/orders-executed.mdx b/private/websocket/orders-executed.mdx index 0fcdd78..43d3882 100644 --- a/private/websocket/orders-executed.mdx +++ b/private/websocket/orders-executed.mdx @@ -2,6 +2,11 @@ asyncapi: "/asyncapi/private/orders_executed.yaml /ws" title: Orders Executed --- + + +This is a private channel. You must [authorize](/private/websocket/authorize) your WebSocket connection before subscribing. + + This private stream returns executed orders, including orders that use Retail Price Improvement (RPI) mode. \ No newline at end of file diff --git a/private/websocket/orders-pending.mdx b/private/websocket/orders-pending.mdx index c2e3541..674a2c8 100644 --- a/private/websocket/orders-pending.mdx +++ b/private/websocket/orders-pending.mdx @@ -2,6 +2,11 @@ asyncapi: "/asyncapi/private/orders_pending.yaml /ws" title: Orders Pending --- + + +This is a private channel. You must [authorize](/private/websocket/authorize) your WebSocket connection before subscribing. + + This private stream returns active orders, including orders that use Retail Price Improvement (RPI) mode. \ No newline at end of file diff --git a/private/websocket/positions.mdx b/private/websocket/positions.mdx index 8bdd74b..5e5fbd3 100644 --- a/private/websocket/positions.mdx +++ b/private/websocket/positions.mdx @@ -3,6 +3,10 @@ asyncapi: "/asyncapi/private/positions.yaml /ws" title: Positions --- + +This is a private channel. You must [authorize](/private/websocket/authorize) your WebSocket connection before subscribing. + + Subscribe to positions updates. diff --git a/public/http-v4/index.mdx b/public/http-v4/index.mdx index ecfc942..757483b 100644 --- a/public/http-v4/index.mdx +++ b/public/http-v4/index.mdx @@ -1,36 +1,11 @@ --- -title: Public HTTP API V4 +title: Market Data sidebarTitle: Overview --- -import { RegionBaseUrl } from '/components/RegionBaseUrl.jsx'; - +Browse publicly available market data endpoints — no authentication required. -Endpoint example: `https://whitebit.com/api/v4/public/{endpoint}` - -All endpoints return time in Unix-time format. - -All endpoints return either a **JSON** object or array. - -For receiving responses from API calls please use http method **GET** - -If an endpoint requires parameters you should send them as `query string` - - -Rate limit: 2000 requests/10 sec for most endpoints (specific limits noted per endpoint). - - ---- - -## Error messages V4 format - -```json -{ - "success": false, - "message": "ERROR MESSAGE", - "params": [] -} -``` +For general API conventions (base URL, error format, rate limits), see the [API Reference Overview](/api-reference/overview). --- diff --git a/public/websocket/index.mdx b/public/websocket/index.mdx index bf3431b..da5ffc1 100644 --- a/public/websocket/index.mdx +++ b/public/websocket/index.mdx @@ -1,181 +1,33 @@ --- -title: Public WebSocket API +title: Market Streams sidebarTitle: Overview --- -import { RegionBaseUrl } from '/components/RegionBaseUrl.jsx'; - - +Browse the available public WebSocket channels below. For connection details, message format, and rate limits, see the [WebSocket Overview](/websocket/overview). - - - - - - - - + + Check API service status and health + + + Subscribe to candlestick (OHLCV) data for markets + + + Real-time last traded price updates for markets + + + 24-hour market statistics including volume and price changes + + + Current day market statistics based on UTC timezone + + + Stream of recent trades executed on the market + + + Order book depth updates with bids and asks + + + Best bid and ask prices in the order book + - -## WebSocket Connection Management - -WebSocket endpoint is **```wss://api.whitebit.com/ws```** - -The API is based on [JSON RPC](https://www.jsonrpc.org/specification) of WebSocket protocol. - -⚠️️ **Connection Timeout** ⚠️️ -- Server closes websocket connection after **60 seconds of inactivity** -- Inactivity is defined as no messages sent by the client - -### Maintaining Connection -To keep the websocket connection active: -- Send periodic ping messages every **50 seconds** -- Handle potential connection closures gracefully in your application logic - -### Example Implementation - -```javascript -// Establish websocket connection -const socket = new WebSocket("wss://api.whitebit.com/ws"); - -// Set up periodic ping -setInterval(() => { - if (socket.readyState === WebSocket.OPEN) { - socket.send(JSON.stringify({ - id: 0, - method: "ping", - params: [], - })); - } -}, 50000); // Every 50 seconds -``` - - - Rate limit 1000 ws connections per minute and 200 requests per minute in one connection. - - -**All endpoints return time in Unix-time format.** - -## ⤴️ Request message - -JSON Structure of request message: - -- `id` - **Integer**. Should be unique to handle response for your request. -- `method` - **String**. Name of request. -- `params` - **Array**. Here you pass params for method. - -🚫 WebSocket connection will be closed if invalid JSON was sent. - -### Types of request messages - -- Query (`ping`, `candles_request`, etc) -- Subscription (`candles_subscribe`, `lastprice_subscribe`, etc). Repeated subscription will be cancelled for the same data type. - -## ⤵️ Response message - -JSON Structure of response message: - -- `id` - **Integer**. Id of request. -- `result` - **Null** for failure, for success - look for responses below -- `error` - **Null** for success, **JSON Object** for failure: - - `message` - Detailed text - - `code` - Error code - -| Code | Message | -| ----- | ------------------- | -| **1** | invalid argument | -| **2** | internal error | -| **3** | service unavailable | -| **4** | method not found | -| **5** | service timeout | - -## Types of response messages - -- Query result -- Subscription status (success/failed) -- Update events - ---- - -## Examples - -**Example** messages for request with response: - -#### ⤴️ Request - -```json -{ - "id": 0, - "method": "ping", - "params": [] -} -``` - -#### ⤵️ Response - -```json -{ - "id": 0, - "result": "pong", - "error": null -} -``` - -**Example** subscription: - -#### ⤴️ Request - -```json -{ - "id": 0, - "method": "candles_subscribe", - "params": [] -} -``` - -#### ⤵️ Response - -```json -{ - "id": 0, - "result": { - "status": "success" - }, - "error": null -} -``` - -#### 🔄 Update events - -```json -{ - "id": null, - "method": "candles_update", - "params": [] // look below for params -} -``` diff --git a/snippets/api-monitor.jsx b/snippets/api-monitor.jsx index b82649c..d2be665 100644 --- a/snippets/api-monitor.jsx +++ b/snippets/api-monitor.jsx @@ -181,7 +181,7 @@ export const ApiMonitorTable = () => { }} > { {log.time} { { {log.endpoint} { { transform: translateY(0); } } - - /* Custom scrollbar */ - div::-webkit-scrollbar { - width: 8px; - height: 8px; - } - - div::-webkit-scrollbar-track { - background: #1a1d23; - } - - div::-webkit-scrollbar-thumb { - background: #3a3f4b; - border-radius: 4px; - } - - div::-webkit-scrollbar-thumb:hover { - background: #4a4f5b; - } `}
); diff --git a/websocket/overview.mdx b/websocket/overview.mdx new file mode 100644 index 0000000..6a72b7d --- /dev/null +++ b/websocket/overview.mdx @@ -0,0 +1,139 @@ +--- +title: WebSocket API +sidebarTitle: Overview +description: "WhiteBIT WebSocket API — connection details, message formats, rate limits, and links to all available channels." +--- + +import { RegionBaseUrl } from '/components/RegionBaseUrl.jsx'; + + + +## Connection + +WebSocket endpoint: **`wss://api.whitebit.com/ws`** + +The API is based on [JSON RPC](https://www.jsonrpc.org/specification) over the WebSocket protocol. + +All endpoints return time in Unix-time format. + +## Connection Timeout + +- The server closes the connection after **60 seconds of inactivity**. +- Inactivity means no messages sent by the client. +- Send a ping message every **50 seconds** to keep the connection alive. + +### Ping Example + +```javascript +const socket = new WebSocket("wss://api.whitebit.com/ws"); + +setInterval(() => { + if (socket.readyState === WebSocket.OPEN) { + socket.send(JSON.stringify({ + id: 0, + method: "ping", + params: [], + })); + } +}, 50000); +``` + +## Rate Limits + + + Rate limit: 1000 WebSocket connections per minute and 200 requests per minute per connection. + + +## Request Message + +JSON structure of a request message: + +| Field | Type | Description | +|-------|------|-------------| +| `id` | Integer | Unique identifier to match the response to your request | +| `method` | String | Name of the method to call | +| `params` | Array | Parameters for the method | + +🚫 The connection will be closed if invalid JSON is sent. + +### Types of Request Messages + +- **Query** — one-time requests (`ping`, `candles_request`, `balanceSpot_request`, etc.) +- **Subscription** — streaming updates (`candles_subscribe`, `lastprice_subscribe`, `balanceSpot_subscribe`, etc.). Repeating a subscription cancels the previous one for the same data type. + +## Response Message + +JSON structure of a response message: + +| Field | Type | Description | +|-------|------|-------------| +| `id` | Integer | ID of the original request | +| `result` | Object / null | `null` on failure; see channel docs for success payloads | +| `error` | Object / null | `null` on success; error object on failure | + +### Error Codes + +| Code | Message | +|------|---------| +| **1** | invalid argument | +| **2** | internal error | +| **3** | service unavailable | +| **4** | method not found | +| **5** | service timeout | + +### Types of Response Messages + +- **Query result** — direct response to a query request +- **Subscription status** — success or failure of a subscription request +- **Update events** — pushed by the server when subscribed data changes + +--- + +## Examples + +**Query — ping/pong:** + +```json +// ⤴️ Request +{ "id": 0, "method": "ping", "params": [] } + +// ⤵️ Response +{ "id": 0, "result": "pong", "error": null } +``` + +**Subscription:** + +```json +// ⤴️ Request +{ "id": 0, "method": "candles_subscribe", "params": [] } + +// ⤵️ Response +{ "id": 0, "result": { "status": "success" }, "error": null } +``` + +**Update event:** + +```json +{ "id": null, "method": "candles_update", "params": [] } +``` + +--- + +## Authentication + +Private channels (Account Streams) require authorization before you can subscribe. After connecting, send an `authorize` request with your API credentials to gain access to private data such as balances, orders, deals, and positions. + +See the [Authorize](/private/websocket/authorize) channel page for the full request format, parameters, and examples. + +--- + +## Channels + + + + Public channels for market data — kline, last price, trades, depth, book ticker, and more. + + + Private channels for account data — balances, orders, deals, positions, and borrows. Requires authorization. + + From 5a62f980268d552c2c9e1105b719cf91573e3d4f Mon Sep 17 00:00:00 2001 From: whitebit-robot Date: Tue, 17 Feb 2026 21:56:55 +0100 Subject: [PATCH 31/84] URLs were changed --- README.md | 7 +- .../account-wallet}/apply-code.mdx | 0 .../account-wallet}/close-flex-investment.mdx | 0 .../account-wallet}/close-investment.mdx | 0 .../account-wallet}/create-code.mdx | 0 .../create-flex-investment.mdx | 0 .../create-new-address-for-deposit.mdx | 0 ...-withdraw-request-with-specific-amount.mdx | 0 .../create-withdraw-request.mdx | 22 +- .../account-wallet}/get-codes-history.mdx | 0 .../get-cryptocurrency-deposit-address.mdx | 0 .../get-deposit-withdraw-history.mdx | 0 .../account-wallet}/get-fees.mdx | 0 .../get-fiat-deposit-address.mdx | 0 .../get-flex-investment-history.mdx | 0 .../get-flex-payment-history.mdx | 0 .../account-wallet}/get-flex-plans.mdx | 0 .../get-interest-payments-history.mdx | 0 .../get-investments-history.mdx | 0 .../get-mining-account-hashrate.mdx | 0 .../account-wallet}/get-my-codes.mdx | 0 .../account-wallet}/get-plans.mdx | 0 .../account-wallet}/get-rewards.mdx | 0 .../get-user-flex-investments.mdx | 0 .../account-wallet}/invest.mdx | 0 .../account-wallet}/issue-card-token.mdx | 0 .../account-wallet}/issue-jwt-token.mdx | 0 .../account-wallet}/list-credit-lines.mdx | 0 .../account-wallet}/main-balance.mdx | 0 .../account-wallet}/overview.mdx | 302 ++--- .../profile-websocket-token.mdx | 0 .../account-wallet}/refund-deposit.mdx | 8 +- .../transfer-between-balances.mdx | 0 .../update-flex-auto-reinvestment.mdx | 0 .../withdraw-from-flex-investment.mdx | 0 .../authentication.mdx | 222 ++-- .../cancel-conditional-order.mdx | 0 .../collateral-trading}/cancel-oco-order.mdx | 0 .../collateral-trading}/cancel-oto-order.mdx | 0 .../change-collateral-account-leverage.mdx | 0 .../collateral-trading}/close-position.mdx | 0 .../collateral-account-balance-summary.mdx | 0 .../collateral-account-balance.mdx | 0 .../collateral-account-hedge-mode.mdx | 0 .../collateral-account-summary.mdx | 0 .../collateral-bulk-limit-order.mdx | 0 .../collateral-limit-order.mdx | 0 .../collateral-market-order.mdx | 0 .../collateral-stop-limit-order.mdx | 0 .../collateral-trigger-market-order.mdx | 0 .../create-collateral-oco-order.mdx | 0 .../collateral-trading}/funding-history.mdx | 0 .../collateral-trading}/open-positions.mdx | 0 .../collateral-trading/overview.mdx | 42 +- .../collateral-trading}/positions-history.mdx | 0 .../query-unexecuted-conditional-orders.mdx | 0 .../query-unexecuted-oco-orders.mdx | 0 .../update-collateral-account-hedge-mode.mdx | 0 .../convert}/convert-confirm.mdx | 0 .../convert}/convert-estimate.mdx | 0 .../convert}/convert-history.mdx | 0 .../market-data}/asset-status-list.mdx | 2 +- .../available-futures-markets-list.mdx | 0 .../market-data}/collateral-markets-list.mdx | 0 .../market-data}/depth.mdx | 0 .../market-data}/fee.mdx | 2 +- .../market-data}/funding-history.mdx | 0 .../market-data}/maintenance-status.mdx | 0 .../market-data}/market-activity.mdx | 2 +- .../market-data}/market-info.mdx | 0 .../market-data}/mining-pool-overview.mdx | 0 .../market-data}/orderbook.mdx | 0 .../market-data/overview.mdx | 28 +- .../market-data}/recent-trades.mdx | 0 .../market-data}/server-status.mdx | 0 .../market-data}/server-time.mdx | 0 .../oauth/usage/account-transactions.mdx | 0 .../oauth/usage/currency-conversions.mdx | 0 .../oauth/usage/executed-deals.mdx | 0 .../oauth/usage/get-access-token.mdx | 0 .../oauth/usage/main-account-balance.mdx | 0 .../oauth/usage/oauth.mdx | 0 .../oauth/usage/orders-history.mdx | 0 .../oauth/usage/refresh-token.mdx | 0 .../oauth/usage/spot-account-balance.mdx | 0 api-reference/overview.mdx | 19 +- .../spot-trading}/bulk-limit-order.mdx | 0 .../spot-trading}/cancel-all-orders.mdx | 0 .../spot-trading}/cancel-order.mdx | 0 .../create-buy-stock-market-order.mdx | 0 .../spot-trading}/create-limit-order.mdx | 0 .../spot-trading}/create-market-order.mdx | 0 .../spot-trading}/create-stop-limit-order.mdx | 0 .../create-stop-market-order.mdx | 0 .../spot-trading}/modify-order.mdx | 0 .../spot-trading}/overview.mdx | 36 +- .../spot-trading}/query-all-market-fees.mdx | 0 .../query-executed-order-deals.mdx | 0 .../query-executed-order-history.mdx | 0 .../spot-trading}/query-executed-orders.mdx | 0 .../spot-trading}/query-market-fee.mdx | 0 .../spot-trading}/query-unexecuted-orders.mdx | 0 .../status-kill-switch-timer.mdx | 0 .../spot-trading}/sync-kill-switch-timer.mdx | 0 .../spot-trading}/trading-balance.mdx | 0 .../sub-accounts}/block-sub-account.mdx | 0 .../create-sub-account-api-key-ip-address.mdx | 0 .../create-sub-account-api-key.mdx | 0 .../sub-accounts}/create-sub-account.mdx | 0 .../delete-sub-account-api-key-ip-address.mdx | 0 .../delete-sub-account-api-key.mdx | 0 .../sub-accounts}/delete-sub-account.mdx | 0 .../edit-sub-account-api-key.mdx | 0 .../sub-accounts}/edit-sub-account.mdx | 0 .../get-sub-account-transfer-history.mdx | 0 .../sub-accounts}/list-of-sub-accounts.mdx | 0 .../list-sub-account-api-key-ip-addresses.mdx | 0 .../list-sub-account-api-keys.mdx | 0 .../sub-accounts/overview.mdx | 34 +- .../reset-sub-account-api-key.mdx | 0 .../sub-accounts}/sub-account-balances.mdx | 0 .../sub-accounts}/sub-account-transfer.mdx | 0 .../sub-accounts}/unblock-sub-account.mdx | 0 changelog.mdx | 366 +++--- docs.json | 800 +++++++++--- docs/reference/file-structure.md | 61 +- docs/reference/style-guide.md | 2 +- faq.mdx | 26 +- glossary.mdx | 4 +- guides/client-order-id.mdx | 1080 ++++++++--------- guides/fireblocks.mdx | 2 +- platform/oauth/overview.mdx | 4 +- platform/overview.mdx | 6 +- platform/self-trade-prevention.mdx | 18 +- private/http-trade-v1/overview.mdx | 158 +-- private/websocket/balance-margin.mdx | 8 - private/websocket/borrows-events.mdx | 8 - private/websocket/borrows.mdx | 8 - private/websocket/deals.mdx | 8 - private/websocket/index.mdx | 39 - private/websocket/margin-positions-events.mdx | 8 - .../account-streams}/authorize.mdx | 0 websocket/account-streams/balance-margin.mdx | 8 + .../account-streams}/balance-spot.mdx | 2 +- websocket/account-streams/borrows-events.mdx | 8 + websocket/account-streams/borrows.mdx | 8 + websocket/account-streams/deals.mdx | 8 + .../margin-positions-events.mdx | 8 + .../account-streams}/orders-executed.mdx | 2 +- .../account-streams}/orders-pending.mdx | 2 +- websocket/account-streams/overview.mdx | 39 + .../account-streams}/positions.mdx | 2 +- .../market-streams}/book-ticker.mdx | 50 +- .../market-streams}/depth.mdx | 740 +++++------ .../market-streams}/kline.mdx | 0 .../market-streams}/lastprice.mdx | 8 +- .../market-streams}/market-today.mdx | 0 .../market-streams}/market.mdx | 0 .../market-streams/overview.mdx | 16 +- .../market-streams}/service.mdx | 8 +- .../market-streams}/trades.mdx | 110 +- websocket/overview.mdx | 6 +- 162 files changed, 2444 insertions(+), 1913 deletions(-) rename {private/http-main-v4 => api-reference/account-wallet}/apply-code.mdx (100%) rename {private/http-main-v4 => api-reference/account-wallet}/close-flex-investment.mdx (100%) rename {private/http-main-v4 => api-reference/account-wallet}/close-investment.mdx (100%) rename {private/http-main-v4 => api-reference/account-wallet}/create-code.mdx (100%) rename {private/http-main-v4 => api-reference/account-wallet}/create-flex-investment.mdx (100%) rename {private/http-main-v4 => api-reference/account-wallet}/create-new-address-for-deposit.mdx (100%) rename {private/http-main-v4 => api-reference/account-wallet}/create-withdraw-request-with-specific-amount.mdx (100%) rename {private/http-main-v4 => api-reference/account-wallet}/create-withdraw-request.mdx (88%) rename {private/http-main-v4 => api-reference/account-wallet}/get-codes-history.mdx (100%) rename {private/http-main-v4 => api-reference/account-wallet}/get-cryptocurrency-deposit-address.mdx (100%) rename {private/http-main-v4 => api-reference/account-wallet}/get-deposit-withdraw-history.mdx (100%) rename {private/http-main-v4 => api-reference/account-wallet}/get-fees.mdx (100%) rename {private/http-main-v4 => api-reference/account-wallet}/get-fiat-deposit-address.mdx (100%) rename {private/http-main-v4 => api-reference/account-wallet}/get-flex-investment-history.mdx (100%) rename {private/http-main-v4 => api-reference/account-wallet}/get-flex-payment-history.mdx (100%) rename {private/http-main-v4 => api-reference/account-wallet}/get-flex-plans.mdx (100%) rename {private/http-main-v4 => api-reference/account-wallet}/get-interest-payments-history.mdx (100%) rename {private/http-main-v4 => api-reference/account-wallet}/get-investments-history.mdx (100%) rename {private/http-main-v4 => api-reference/account-wallet}/get-mining-account-hashrate.mdx (100%) rename {private/http-main-v4 => api-reference/account-wallet}/get-my-codes.mdx (100%) rename {private/http-main-v4 => api-reference/account-wallet}/get-plans.mdx (100%) rename {private/http-main-v4 => api-reference/account-wallet}/get-rewards.mdx (100%) rename {private/http-main-v4 => api-reference/account-wallet}/get-user-flex-investments.mdx (100%) rename {private/http-main-v4 => api-reference/account-wallet}/invest.mdx (100%) rename {private/http-main-v4 => api-reference/account-wallet}/issue-card-token.mdx (100%) rename {private/http-main-v4 => api-reference/account-wallet}/issue-jwt-token.mdx (100%) rename {private/http-main-v4 => api-reference/account-wallet}/list-credit-lines.mdx (100%) rename {private/http-main-v4 => api-reference/account-wallet}/main-balance.mdx (100%) rename {private/http-main-v4 => api-reference/account-wallet}/overview.mdx (53%) rename {private/http-main-v4 => api-reference/account-wallet}/profile-websocket-token.mdx (100%) rename {private/http-main-v4 => api-reference/account-wallet}/refund-deposit.mdx (96%) rename {private/http-main-v4 => api-reference/account-wallet}/transfer-between-balances.mdx (100%) rename {private/http-main-v4 => api-reference/account-wallet}/update-flex-auto-reinvestment.mdx (100%) rename {private/http-main-v4 => api-reference/account-wallet}/withdraw-from-flex-investment.mdx (100%) rename private/http-auth.mdx => api-reference/authentication.mdx (97%) rename {private/http-trade-v4 => api-reference/collateral-trading}/cancel-conditional-order.mdx (100%) rename {private/http-trade-v4 => api-reference/collateral-trading}/cancel-oco-order.mdx (100%) rename {private/http-trade-v4 => api-reference/collateral-trading}/cancel-oto-order.mdx (100%) rename {private/http-trade-v4 => api-reference/collateral-trading}/change-collateral-account-leverage.mdx (100%) rename {private/http-trade-v4 => api-reference/collateral-trading}/close-position.mdx (100%) rename {private/http-trade-v4 => api-reference/collateral-trading}/collateral-account-balance-summary.mdx (100%) rename {private/http-trade-v4 => api-reference/collateral-trading}/collateral-account-balance.mdx (100%) rename {private/http-trade-v4 => api-reference/collateral-trading}/collateral-account-hedge-mode.mdx (100%) rename {private/http-trade-v4 => api-reference/collateral-trading}/collateral-account-summary.mdx (100%) rename {private/http-trade-v4 => api-reference/collateral-trading}/collateral-bulk-limit-order.mdx (100%) rename {private/http-trade-v4 => api-reference/collateral-trading}/collateral-limit-order.mdx (100%) rename {private/http-trade-v4 => api-reference/collateral-trading}/collateral-market-order.mdx (100%) rename {private/http-trade-v4 => api-reference/collateral-trading}/collateral-stop-limit-order.mdx (100%) rename {private/http-trade-v4 => api-reference/collateral-trading}/collateral-trigger-market-order.mdx (100%) rename {private/http-trade-v4 => api-reference/collateral-trading}/create-collateral-oco-order.mdx (100%) rename {private/http-trade-v4 => api-reference/collateral-trading}/funding-history.mdx (100%) rename {private/http-trade-v4 => api-reference/collateral-trading}/open-positions.mdx (100%) rename private/http-trade-v4/collateral-overview.mdx => api-reference/collateral-trading/overview.mdx (59%) rename {private/http-trade-v4 => api-reference/collateral-trading}/positions-history.mdx (100%) rename {private/http-trade-v4 => api-reference/collateral-trading}/query-unexecuted-conditional-orders.mdx (100%) rename {private/http-trade-v4 => api-reference/collateral-trading}/query-unexecuted-oco-orders.mdx (100%) rename {private/http-trade-v4 => api-reference/collateral-trading}/update-collateral-account-hedge-mode.mdx (100%) rename {private/http-trade-v4 => api-reference/convert}/convert-confirm.mdx (100%) rename {private/http-trade-v4 => api-reference/convert}/convert-estimate.mdx (100%) rename {private/http-trade-v4 => api-reference/convert}/convert-history.mdx (100%) rename {public/http-v4 => api-reference/market-data}/asset-status-list.mdx (71%) rename {public/http-v4 => api-reference/market-data}/available-futures-markets-list.mdx (100%) rename {public/http-v4 => api-reference/market-data}/collateral-markets-list.mdx (100%) rename {public/http-v4 => api-reference/market-data}/depth.mdx (100%) rename {public/http-v4 => api-reference/market-data}/fee.mdx (69%) rename {public/http-v4 => api-reference/market-data}/funding-history.mdx (100%) rename {public/http-v4 => api-reference/market-data}/maintenance-status.mdx (100%) rename {public/http-v4 => api-reference/market-data}/market-activity.mdx (70%) rename {public/http-v4 => api-reference/market-data}/market-info.mdx (100%) rename {public/http-v4 => api-reference/market-data}/mining-pool-overview.mdx (100%) rename {public/http-v4 => api-reference/market-data}/orderbook.mdx (100%) rename public/http-v4/index.mdx => api-reference/market-data/overview.mdx (57%) rename {public/http-v4 => api-reference/market-data}/recent-trades.mdx (100%) rename {public/http-v4 => api-reference/market-data}/server-status.mdx (100%) rename {public/http-v4 => api-reference/market-data}/server-time.mdx (100%) rename {platform => api-reference}/oauth/usage/account-transactions.mdx (100%) rename {platform => api-reference}/oauth/usage/currency-conversions.mdx (100%) rename {platform => api-reference}/oauth/usage/executed-deals.mdx (100%) rename {platform => api-reference}/oauth/usage/get-access-token.mdx (100%) rename {platform => api-reference}/oauth/usage/main-account-balance.mdx (100%) rename {platform => api-reference}/oauth/usage/oauth.mdx (100%) rename {platform => api-reference}/oauth/usage/orders-history.mdx (100%) rename {platform => api-reference}/oauth/usage/refresh-token.mdx (100%) rename {platform => api-reference}/oauth/usage/spot-account-balance.mdx (100%) rename {private/http-trade-v4 => api-reference/spot-trading}/bulk-limit-order.mdx (100%) rename {private/http-trade-v4 => api-reference/spot-trading}/cancel-all-orders.mdx (100%) rename {private/http-trade-v4 => api-reference/spot-trading}/cancel-order.mdx (100%) rename {private/http-trade-v4 => api-reference/spot-trading}/create-buy-stock-market-order.mdx (100%) rename {private/http-trade-v4 => api-reference/spot-trading}/create-limit-order.mdx (100%) rename {private/http-trade-v4 => api-reference/spot-trading}/create-market-order.mdx (100%) rename {private/http-trade-v4 => api-reference/spot-trading}/create-stop-limit-order.mdx (100%) rename {private/http-trade-v4 => api-reference/spot-trading}/create-stop-market-order.mdx (100%) rename {private/http-trade-v4 => api-reference/spot-trading}/modify-order.mdx (100%) rename {private/http-trade-v4 => api-reference/spot-trading}/overview.mdx (52%) rename {private/http-trade-v4 => api-reference/spot-trading}/query-all-market-fees.mdx (100%) rename {private/http-trade-v4 => api-reference/spot-trading}/query-executed-order-deals.mdx (100%) rename {private/http-trade-v4 => api-reference/spot-trading}/query-executed-order-history.mdx (100%) rename {private/http-trade-v4 => api-reference/spot-trading}/query-executed-orders.mdx (100%) rename {private/http-trade-v4 => api-reference/spot-trading}/query-market-fee.mdx (100%) rename {private/http-trade-v4 => api-reference/spot-trading}/query-unexecuted-orders.mdx (100%) rename {private/http-trade-v4 => api-reference/spot-trading}/status-kill-switch-timer.mdx (100%) rename {private/http-trade-v4 => api-reference/spot-trading}/sync-kill-switch-timer.mdx (100%) rename {private/http-trade-v4 => api-reference/spot-trading}/trading-balance.mdx (100%) rename {private/http-main-v4 => api-reference/sub-accounts}/block-sub-account.mdx (100%) rename {private/http-main-v4 => api-reference/sub-accounts}/create-sub-account-api-key-ip-address.mdx (100%) rename {private/http-main-v4 => api-reference/sub-accounts}/create-sub-account-api-key.mdx (100%) rename {private/http-main-v4 => api-reference/sub-accounts}/create-sub-account.mdx (100%) rename {private/http-main-v4 => api-reference/sub-accounts}/delete-sub-account-api-key-ip-address.mdx (100%) rename {private/http-main-v4 => api-reference/sub-accounts}/delete-sub-account-api-key.mdx (100%) rename {private/http-main-v4 => api-reference/sub-accounts}/delete-sub-account.mdx (100%) rename {private/http-main-v4 => api-reference/sub-accounts}/edit-sub-account-api-key.mdx (100%) rename {private/http-main-v4 => api-reference/sub-accounts}/edit-sub-account.mdx (100%) rename {private/http-main-v4 => api-reference/sub-accounts}/get-sub-account-transfer-history.mdx (100%) rename {private/http-main-v4 => api-reference/sub-accounts}/list-of-sub-accounts.mdx (100%) rename {private/http-main-v4 => api-reference/sub-accounts}/list-sub-account-api-key-ip-addresses.mdx (100%) rename {private/http-main-v4 => api-reference/sub-accounts}/list-sub-account-api-keys.mdx (100%) rename private/http-main-v4/sub-accounts-overview.mdx => api-reference/sub-accounts/overview.mdx (51%) rename {private/http-main-v4 => api-reference/sub-accounts}/reset-sub-account-api-key.mdx (100%) rename {private/http-main-v4 => api-reference/sub-accounts}/sub-account-balances.mdx (100%) rename {private/http-main-v4 => api-reference/sub-accounts}/sub-account-transfer.mdx (100%) rename {private/http-main-v4 => api-reference/sub-accounts}/unblock-sub-account.mdx (100%) delete mode 100644 private/websocket/balance-margin.mdx delete mode 100644 private/websocket/borrows-events.mdx delete mode 100644 private/websocket/borrows.mdx delete mode 100644 private/websocket/deals.mdx delete mode 100644 private/websocket/index.mdx delete mode 100644 private/websocket/margin-positions-events.mdx rename {private/websocket => websocket/account-streams}/authorize.mdx (100%) create mode 100644 websocket/account-streams/balance-margin.mdx rename {private/websocket => websocket/account-streams}/balance-spot.mdx (63%) create mode 100644 websocket/account-streams/borrows-events.mdx create mode 100644 websocket/account-streams/borrows.mdx create mode 100644 websocket/account-streams/deals.mdx create mode 100644 websocket/account-streams/margin-positions-events.mdx rename {private/websocket => websocket/account-streams}/orders-executed.mdx (63%) rename {private/websocket => websocket/account-streams}/orders-pending.mdx (63%) create mode 100644 websocket/account-streams/overview.mdx rename {private/websocket => websocket/account-streams}/positions.mdx (67%) rename {public/websocket => websocket/market-streams}/book-ticker.mdx (96%) rename {public/websocket => websocket/market-streams}/depth.mdx (97%) rename {public/websocket => websocket/market-streams}/kline.mdx (100%) rename {public/websocket => websocket/market-streams}/lastprice.mdx (94%) rename {public/websocket => websocket/market-streams}/market-today.mdx (100%) rename {public/websocket => websocket/market-streams}/market.mdx (100%) rename public/websocket/index.mdx => websocket/market-streams/overview.mdx (58%) rename {public/websocket => websocket/market-streams}/service.mdx (94%) rename {public/websocket => websocket/market-streams}/trades.mdx (95%) diff --git a/README.md b/README.md index 8434d9e..a915ad5 100644 --- a/README.md +++ b/README.md @@ -61,8 +61,11 @@ mintlify-docs/ ├── asyncapi/ # AsyncAPI specifications (WebSocket) │ ├── public/ # Public channels │ └── private/ # Private channels -├── public/ # MDX docs for public APIs -├── private/ # MDX docs for private APIs +├── api-reference/ # REST API docs (market-data, spot-trading, collateral-trading, +│ # convert, account-wallet, sub-accounts, authentication, oauth) +├── websocket/ # WebSocket docs (overview, market-streams, account-streams) +├── platform/ # Platform feature docs (webhook, colocation, self-trade-prevention, +│ # oauth conceptual overview) └── docs.json # Navigation configuration ``` diff --git a/private/http-main-v4/apply-code.mdx b/api-reference/account-wallet/apply-code.mdx similarity index 100% rename from private/http-main-v4/apply-code.mdx rename to api-reference/account-wallet/apply-code.mdx diff --git a/private/http-main-v4/close-flex-investment.mdx b/api-reference/account-wallet/close-flex-investment.mdx similarity index 100% rename from private/http-main-v4/close-flex-investment.mdx rename to api-reference/account-wallet/close-flex-investment.mdx diff --git a/private/http-main-v4/close-investment.mdx b/api-reference/account-wallet/close-investment.mdx similarity index 100% rename from private/http-main-v4/close-investment.mdx rename to api-reference/account-wallet/close-investment.mdx diff --git a/private/http-main-v4/create-code.mdx b/api-reference/account-wallet/create-code.mdx similarity index 100% rename from private/http-main-v4/create-code.mdx rename to api-reference/account-wallet/create-code.mdx diff --git a/private/http-main-v4/create-flex-investment.mdx b/api-reference/account-wallet/create-flex-investment.mdx similarity index 100% rename from private/http-main-v4/create-flex-investment.mdx rename to api-reference/account-wallet/create-flex-investment.mdx diff --git a/private/http-main-v4/create-new-address-for-deposit.mdx b/api-reference/account-wallet/create-new-address-for-deposit.mdx similarity index 100% rename from private/http-main-v4/create-new-address-for-deposit.mdx rename to api-reference/account-wallet/create-new-address-for-deposit.mdx diff --git a/private/http-main-v4/create-withdraw-request-with-specific-amount.mdx b/api-reference/account-wallet/create-withdraw-request-with-specific-amount.mdx similarity index 100% rename from private/http-main-v4/create-withdraw-request-with-specific-amount.mdx rename to api-reference/account-wallet/create-withdraw-request-with-specific-amount.mdx diff --git a/private/http-main-v4/create-withdraw-request.mdx b/api-reference/account-wallet/create-withdraw-request.mdx similarity index 88% rename from private/http-main-v4/create-withdraw-request.mdx rename to api-reference/account-wallet/create-withdraw-request.mdx index 451df0d..4a9111f 100644 --- a/private/http-main-v4/create-withdraw-request.mdx +++ b/api-reference/account-wallet/create-withdraw-request.mdx @@ -21,7 +21,7 @@ For cryptocurrencies that exist on multiple blockchains. - **Use when**: Withdrawing tokens that exist on multiple chains -**Critical**: Ensure the `network` matches your destination address type. Sending ERC20 USDT to a TRC20 address will result in **permanent loss of funds**. Verify the network on [Asset Status endpoint](/public/http-v4/asset-status-list). +**Critical**: Ensure the `network` matches your destination address type. Sending ERC20 USDT to a TRC20 address will result in **permanent loss of funds**. Verify the network on [Asset Status endpoint](/api-reference/market-data/asset-status-list). #### **Scenario 3: Travel Rule Compliance (EEA Users)** @@ -87,10 +87,10 @@ The `amount` field in this endpoint **includes** the withdrawal fee. The recipie - **Result**: 102 USDT deducted from balance, recipient receives **98 USDT** -To specify the exact amount the recipient should receive (with fee added on top), use the [withdraw-pay endpoint](/private/http-main-v4/create-withdraw-request-with-specific-amount) instead. +To specify the exact amount the recipient should receive (with fee added on top), use the [withdraw-pay endpoint](/api-reference/account-wallet/create-withdraw-request-with-specific-amount) instead. -Check current fees via [Get Fees endpoint](/private/http-main-v4/get-fees) before creating withdrawals. +Check current fees via [Get Fees endpoint](/api-reference/account-wallet/get-fees) before creating withdrawals. --- @@ -135,13 +135,13 @@ Some currencies require a memo (destination tag): - **EOS**: Requires memo -Missing a required memo will result in **permanent loss of funds** or significant delays in recovery. Check currency requirements on [Asset Status endpoint](/public/http-v4/asset-status-list). +Missing a required memo will result in **permanent loss of funds** or significant delays in recovery. Check currency requirements on [Asset Status endpoint](/api-reference/market-data/asset-status-list). ### ⚠️ Provider Selection (Fiat) Fiat withdrawals require the correct provider: -- Check available providers via [Asset Status endpoint](/public/http-v4/asset-status-list) +- Check available providers via [Asset Status endpoint](/api-reference/market-data/asset-status-list) - Common providers: `VISAMASTER`, `VISAMASTER_PAYCORE`, `UAH_IBAN` - Provider availability depends on currency and region @@ -181,7 +181,7 @@ Search by your `uniqueId` to track the transaction. **Withdrawal status codes**: - **Successful**: 3, 7 - **Canceled**: 4, 9 -- **Pending**: Other codes (see [history endpoint](/private/http-main-v4/get-deposit-withdraw-history) for full list) +- **Pending**: Other codes (see [history endpoint](/api-reference/account-wallet/get-deposit-withdraw-history) for full list) Cryptocurrency withdrawals are typically processed within 15-60 minutes depending on network congestion. Fiat withdrawals may take 1-5 business days depending on the payment provider. @@ -299,8 +299,8 @@ For multi-network currencies (USDT, USDC, etc.), choosing the right network is c ## Related Endpoints -- [Create withdraw request with specific amount (fee not included)](/private/http-main-v4/create-withdraw-request-with-specific-amount) - Alternative endpoint where fee is added on top -- [Get deposit/withdraw history](/private/http-main-v4/get-deposit-withdraw-history) - Monitor withdrawal status -- [Get fees](/private/http-main-v4/get-fees) - Check current withdrawal fees -- [Main balance](/private/http-main-v4/main-balance) - Check available balance before withdrawal -- [Asset Status endpoint](/public/http-v4/asset-status-list) - Verify currency can be withdrawn and get network/provider info +- [Create withdraw request with specific amount (fee not included)](/api-reference/account-wallet/create-withdraw-request-with-specific-amount) - Alternative endpoint where fee is added on top +- [Get deposit/withdraw history](/api-reference/account-wallet/get-deposit-withdraw-history) - Monitor withdrawal status +- [Get fees](/api-reference/account-wallet/get-fees) - Check current withdrawal fees +- [Main balance](/api-reference/account-wallet/main-balance) - Check available balance before withdrawal +- [Asset Status endpoint](/api-reference/market-data/asset-status-list) - Verify currency can be withdrawn and get network/provider info diff --git a/private/http-main-v4/get-codes-history.mdx b/api-reference/account-wallet/get-codes-history.mdx similarity index 100% rename from private/http-main-v4/get-codes-history.mdx rename to api-reference/account-wallet/get-codes-history.mdx diff --git a/private/http-main-v4/get-cryptocurrency-deposit-address.mdx b/api-reference/account-wallet/get-cryptocurrency-deposit-address.mdx similarity index 100% rename from private/http-main-v4/get-cryptocurrency-deposit-address.mdx rename to api-reference/account-wallet/get-cryptocurrency-deposit-address.mdx diff --git a/private/http-main-v4/get-deposit-withdraw-history.mdx b/api-reference/account-wallet/get-deposit-withdraw-history.mdx similarity index 100% rename from private/http-main-v4/get-deposit-withdraw-history.mdx rename to api-reference/account-wallet/get-deposit-withdraw-history.mdx diff --git a/private/http-main-v4/get-fees.mdx b/api-reference/account-wallet/get-fees.mdx similarity index 100% rename from private/http-main-v4/get-fees.mdx rename to api-reference/account-wallet/get-fees.mdx diff --git a/private/http-main-v4/get-fiat-deposit-address.mdx b/api-reference/account-wallet/get-fiat-deposit-address.mdx similarity index 100% rename from private/http-main-v4/get-fiat-deposit-address.mdx rename to api-reference/account-wallet/get-fiat-deposit-address.mdx diff --git a/private/http-main-v4/get-flex-investment-history.mdx b/api-reference/account-wallet/get-flex-investment-history.mdx similarity index 100% rename from private/http-main-v4/get-flex-investment-history.mdx rename to api-reference/account-wallet/get-flex-investment-history.mdx diff --git a/private/http-main-v4/get-flex-payment-history.mdx b/api-reference/account-wallet/get-flex-payment-history.mdx similarity index 100% rename from private/http-main-v4/get-flex-payment-history.mdx rename to api-reference/account-wallet/get-flex-payment-history.mdx diff --git a/private/http-main-v4/get-flex-plans.mdx b/api-reference/account-wallet/get-flex-plans.mdx similarity index 100% rename from private/http-main-v4/get-flex-plans.mdx rename to api-reference/account-wallet/get-flex-plans.mdx diff --git a/private/http-main-v4/get-interest-payments-history.mdx b/api-reference/account-wallet/get-interest-payments-history.mdx similarity index 100% rename from private/http-main-v4/get-interest-payments-history.mdx rename to api-reference/account-wallet/get-interest-payments-history.mdx diff --git a/private/http-main-v4/get-investments-history.mdx b/api-reference/account-wallet/get-investments-history.mdx similarity index 100% rename from private/http-main-v4/get-investments-history.mdx rename to api-reference/account-wallet/get-investments-history.mdx diff --git a/private/http-main-v4/get-mining-account-hashrate.mdx b/api-reference/account-wallet/get-mining-account-hashrate.mdx similarity index 100% rename from private/http-main-v4/get-mining-account-hashrate.mdx rename to api-reference/account-wallet/get-mining-account-hashrate.mdx diff --git a/private/http-main-v4/get-my-codes.mdx b/api-reference/account-wallet/get-my-codes.mdx similarity index 100% rename from private/http-main-v4/get-my-codes.mdx rename to api-reference/account-wallet/get-my-codes.mdx diff --git a/private/http-main-v4/get-plans.mdx b/api-reference/account-wallet/get-plans.mdx similarity index 100% rename from private/http-main-v4/get-plans.mdx rename to api-reference/account-wallet/get-plans.mdx diff --git a/private/http-main-v4/get-rewards.mdx b/api-reference/account-wallet/get-rewards.mdx similarity index 100% rename from private/http-main-v4/get-rewards.mdx rename to api-reference/account-wallet/get-rewards.mdx diff --git a/private/http-main-v4/get-user-flex-investments.mdx b/api-reference/account-wallet/get-user-flex-investments.mdx similarity index 100% rename from private/http-main-v4/get-user-flex-investments.mdx rename to api-reference/account-wallet/get-user-flex-investments.mdx diff --git a/private/http-main-v4/invest.mdx b/api-reference/account-wallet/invest.mdx similarity index 100% rename from private/http-main-v4/invest.mdx rename to api-reference/account-wallet/invest.mdx diff --git a/private/http-main-v4/issue-card-token.mdx b/api-reference/account-wallet/issue-card-token.mdx similarity index 100% rename from private/http-main-v4/issue-card-token.mdx rename to api-reference/account-wallet/issue-card-token.mdx diff --git a/private/http-main-v4/issue-jwt-token.mdx b/api-reference/account-wallet/issue-jwt-token.mdx similarity index 100% rename from private/http-main-v4/issue-jwt-token.mdx rename to api-reference/account-wallet/issue-jwt-token.mdx diff --git a/private/http-main-v4/list-credit-lines.mdx b/api-reference/account-wallet/list-credit-lines.mdx similarity index 100% rename from private/http-main-v4/list-credit-lines.mdx rename to api-reference/account-wallet/list-credit-lines.mdx diff --git a/private/http-main-v4/main-balance.mdx b/api-reference/account-wallet/main-balance.mdx similarity index 100% rename from private/http-main-v4/main-balance.mdx rename to api-reference/account-wallet/main-balance.mdx diff --git a/private/http-main-v4/overview.mdx b/api-reference/account-wallet/overview.mdx similarity index 53% rename from private/http-main-v4/overview.mdx rename to api-reference/account-wallet/overview.mdx index c4b70c9..4b306f9 100644 --- a/private/http-main-v4/overview.mdx +++ b/api-reference/account-wallet/overview.mdx @@ -1,151 +1,151 @@ ---- -title: "Account & Wallet" -sidebarTitle: "Overview" -description: "Endpoints for managing main balance, deposits, withdrawals, codes, crypto lending, fees, mining pool, and credit lines." ---- - -Manage your main account balance, deposits, withdrawals, transfers, WhiteBIT codes, crypto lending, fees, mining pool, and credit lines. - -For general API conventions (base URL, error format, rate limits), see the [API Reference Overview](/api-reference/overview). - ---- - -## Main Balance & Transfers - - - - Get main account balance - - - Get deposit address for cryptocurrency - - - Get deposit address for fiat currency - - - Issue JWT token for authentication - - - Issue card token for payments - - - Create a withdrawal request - - - Create withdrawal with specific amount (fee not included) - - - Transfer funds between balances - - - Get deposit and withdrawal history - - - Create a new deposit address - - - ---- - -## Codes - - - - Create a new WhiteBIT code - - - Apply a WhiteBIT code - - - Get your created codes - - - Get codes history - - - ---- - -## Crypto Lending - -### Fixed Plans - - - - Get available fixed lending plans - - - Invest in a fixed plan - - - Close a fixed investment - - - Get fixed investments history - - - Get interest payments history - - - -### Flex Plans - - - - Get available flex lending plans - - - Get your flex investments - - - Get flex investment history - - - Get flex payment history - - - Create a new flex investment - - - Withdraw from flex investment - - - Close a flex investment - - - Update flex auto-reinvestment settings - - - ---- - -## Fees - - - - Get trading fees information - - - ---- - -## Mining Pool - - - - Get mining rewards - - - Get mining account hashrate - - - ---- - -## Credit Line - - - - Get list of credit lines - - +--- +title: "Account & Wallet" +sidebarTitle: "Overview" +description: "Endpoints for managing main balance, deposits, withdrawals, codes, crypto lending, fees, mining pool, and credit lines." +--- + +Manage your main account balance, deposits, withdrawals, transfers, WhiteBIT codes, crypto lending, fees, mining pool, and credit lines. + +For general API conventions (base URL, error format, rate limits), see the [API Reference Overview](/api-reference/overview). + +--- + +## Main Balance & Transfers + + + + Get main account balance + + + Get deposit address for cryptocurrency + + + Get deposit address for fiat currency + + + Issue JWT token for authentication + + + Issue card token for payments + + + Create a withdrawal request + + + Create withdrawal with specific amount (fee not included) + + + Transfer funds between balances + + + Get deposit and withdrawal history + + + Create a new deposit address + + + +--- + +## Codes + + + + Create a new WhiteBIT code + + + Apply a WhiteBIT code + + + Get your created codes + + + Get codes history + + + +--- + +## Crypto Lending + +### Fixed Plans + + + + Get available fixed lending plans + + + Invest in a fixed plan + + + Close a fixed investment + + + Get fixed investments history + + + Get interest payments history + + + +### Flex Plans + + + + Get available flex lending plans + + + Get your flex investments + + + Get flex investment history + + + Get flex payment history + + + Create a new flex investment + + + Withdraw from flex investment + + + Close a flex investment + + + Update flex auto-reinvestment settings + + + +--- + +## Fees + + + + Get trading fees information + + + +--- + +## Mining Pool + + + + Get mining rewards + + + Get mining account hashrate + + + +--- + +## Credit Line + + + + Get list of credit lines + + diff --git a/private/http-main-v4/profile-websocket-token.mdx b/api-reference/account-wallet/profile-websocket-token.mdx similarity index 100% rename from private/http-main-v4/profile-websocket-token.mdx rename to api-reference/account-wallet/profile-websocket-token.mdx diff --git a/private/http-main-v4/refund-deposit.mdx b/api-reference/account-wallet/refund-deposit.mdx similarity index 96% rename from private/http-main-v4/refund-deposit.mdx rename to api-reference/account-wallet/refund-deposit.mdx index 1eab207..d7e46d3 100644 --- a/private/http-main-v4/refund-deposit.mdx +++ b/api-reference/account-wallet/refund-deposit.mdx @@ -1,4 +1,4 @@ ---- -title: "Refund deposit" -openapi: /openapi/private/main_api_v4.yaml POST /api/v4/main-account/refund-deposit ---- +--- +title: "Refund deposit" +openapi: /openapi/private/main_api_v4.yaml POST /api/v4/main-account/refund-deposit +--- diff --git a/private/http-main-v4/transfer-between-balances.mdx b/api-reference/account-wallet/transfer-between-balances.mdx similarity index 100% rename from private/http-main-v4/transfer-between-balances.mdx rename to api-reference/account-wallet/transfer-between-balances.mdx diff --git a/private/http-main-v4/update-flex-auto-reinvestment.mdx b/api-reference/account-wallet/update-flex-auto-reinvestment.mdx similarity index 100% rename from private/http-main-v4/update-flex-auto-reinvestment.mdx rename to api-reference/account-wallet/update-flex-auto-reinvestment.mdx diff --git a/private/http-main-v4/withdraw-from-flex-investment.mdx b/api-reference/account-wallet/withdraw-from-flex-investment.mdx similarity index 100% rename from private/http-main-v4/withdraw-from-flex-investment.mdx rename to api-reference/account-wallet/withdraw-from-flex-investment.mdx diff --git a/private/http-auth.mdx b/api-reference/authentication.mdx similarity index 97% rename from private/http-auth.mdx rename to api-reference/authentication.mdx index 172c5f3..4b31c47 100644 --- a/private/http-auth.mdx +++ b/api-reference/authentication.mdx @@ -1,112 +1,112 @@ ---- -title: "Private HTTP API Authentication" -sidebarTitle: "Authentication" ---- - -## Overview - -This guide explains how to authenticate with WhiteBit’s private HTTP API endpoints, which require authentication for security purposes. - -## Getting Started - -### Setting Up API Keys - - - Navigate to [WhiteBit API Settings](https://whitebit.com/settings/api) - - - Select the appropriate configuration tab for your API keys - - Different API keys provide access to different API endpoints - - - -Generate a new API key - - - **Recommended Security Measures:** - - Enable IP restrictions (specify up to 50 trusted IPs) - - Enable Endpoint access restrictions (select only necessary endpoints) - - -## Authentication Requirements - -All authenticated requests must: - -1. Use the `POST` HTTP method -2. Include specific body data -3. Contain required headers - -### Body Data Format - -Your request body must be a JSON object containing: - -| Field | Description | Example | -| --- | --- | --- | -| `request` | Request path without domain name | `'/api/v4/trade-account/balance'` | -| `nonce` | An incrementing number larger than previous requests | `'1594297865'` | -| `nonceWindow` | Optional boolean to enable time-based nonce validation | `true` | -| Request-specific parameters | Additional parameters required by the endpoint | `"ticker": "BTC"` | - -**Example Request Body:** - -```bash -{ - "request": "/api/v4/trade-account/balance", - "nonce": 1594297865, - "nonceWindow": true, - "ticker": "BTC" -} -``` - -#### About Nonce Values - -- A good practice is to use the Unix timestamp in milliseconds -- Ensure each nonce is larger than previous requests -- When `nonceWindow` is enabled: - - Provide Unix timestamp in milliseconds as the nonce - - Timestamp must be within ±5 seconds of server time - - Each nonce must be unique to prevent double processing - - Useful for high-frequency trading systems with concurrent requests - -### Required Headers - -Every authenticated request requires these headers: - -| Header | Value | Description | -| --- | --- | --- | -| `Content-type` | `application/json` | Specifies JSON format | -| `X-TXC-APIKEY` | `your_api_key` | Your public WhiteBit API key | -| `X-TXC-PAYLOAD` | `base64_encoded_payload` | Base64-encoded request body | -| `X-TXC-SIGNATURE` | `signature` | HMAC-SHA512 signature (hex encoded) | - -The signature is created using: `hex(HMAC_SHA512(payload, key=api_secret))` - -## Implementation Examples - -We provide the [API Quick Start Helper](https://github.com/whitebit-exchange/api-quickstart) library with examples in multiple languages: - -- Python -- PHP -- NodeJS -- Go -- JavaScript -- Kotlin -- DotNet -- Ruby -- C++ -- Rust - -## Common Errors - -| Error Message | Cause | Solution | -| --- | --- | --- | -| ”Too many requests.” | Nonce value is not greater than previous request | Use incrementing nonce values | -| ”This action is unauthorized. Enable your key in API settings” | Using disabled API key | Enable key in API settings or check IP restrictions | -| ”You don’t have permission to use this endpoint.” | Endpoint access is restricted | Update endpoint access in API key settings | -| ”Invalid payload” | Payload doesn’t match decoded value | Ensure proper base64 encoding of request body | -| ”Unauthorized request.” | Request signed incorrectly | Verify signature creation process | -| ”Nonce not provided.” | Missing nonce in request body | Include nonce in all requests | -| ”Your nonce is more than 5 seconds lesser than the current nonce” | Invalid timestamp when using nonceWindow | Use current timestamp in milliseconds | -| ”Invalid nonceWindow.” | nonceWindow is not a boolean | Ensure nonceWindow is set to true or false | +--- +title: "Private HTTP API Authentication" +sidebarTitle: "Authentication" +--- + +## Overview + +This guide explains how to authenticate with WhiteBit’s private HTTP API endpoints, which require authentication for security purposes. + +## Getting Started + +### Setting Up API Keys + + + Navigate to [WhiteBit API Settings](https://whitebit.com/settings/api) + + + Select the appropriate configuration tab for your API keys + + Different API keys provide access to different API endpoints + + + +Generate a new API key + + + **Recommended Security Measures:** + - Enable IP restrictions (specify up to 50 trusted IPs) + - Enable Endpoint access restrictions (select only necessary endpoints) + + +## Authentication Requirements + +All authenticated requests must: + +1. Use the `POST` HTTP method +2. Include specific body data +3. Contain required headers + +### Body Data Format + +Your request body must be a JSON object containing: + +| Field | Description | Example | +| --- | --- | --- | +| `request` | Request path without domain name | `'/api/v4/trade-account/balance'` | +| `nonce` | An incrementing number larger than previous requests | `'1594297865'` | +| `nonceWindow` | Optional boolean to enable time-based nonce validation | `true` | +| Request-specific parameters | Additional parameters required by the endpoint | `"ticker": "BTC"` | + +**Example Request Body:** + +```bash +{ + "request": "/api/v4/trade-account/balance", + "nonce": 1594297865, + "nonceWindow": true, + "ticker": "BTC" +} +``` + +#### About Nonce Values + +- A good practice is to use the Unix timestamp in milliseconds +- Ensure each nonce is larger than previous requests +- When `nonceWindow` is enabled: + - Provide Unix timestamp in milliseconds as the nonce + - Timestamp must be within ±5 seconds of server time + - Each nonce must be unique to prevent double processing + - Useful for high-frequency trading systems with concurrent requests + +### Required Headers + +Every authenticated request requires these headers: + +| Header | Value | Description | +| --- | --- | --- | +| `Content-type` | `application/json` | Specifies JSON format | +| `X-TXC-APIKEY` | `your_api_key` | Your public WhiteBit API key | +| `X-TXC-PAYLOAD` | `base64_encoded_payload` | Base64-encoded request body | +| `X-TXC-SIGNATURE` | `signature` | HMAC-SHA512 signature (hex encoded) | + +The signature is created using: `hex(HMAC_SHA512(payload, key=api_secret))` + +## Implementation Examples + +We provide the [API Quick Start Helper](https://github.com/whitebit-exchange/api-quickstart) library with examples in multiple languages: + +- Python +- PHP +- NodeJS +- Go +- JavaScript +- Kotlin +- DotNet +- Ruby +- C++ +- Rust + +## Common Errors + +| Error Message | Cause | Solution | +| --- | --- | --- | +| ”Too many requests.” | Nonce value is not greater than previous request | Use incrementing nonce values | +| ”This action is unauthorized. Enable your key in API settings” | Using disabled API key | Enable key in API settings or check IP restrictions | +| ”You don’t have permission to use this endpoint.” | Endpoint access is restricted | Update endpoint access in API key settings | +| ”Invalid payload” | Payload doesn’t match decoded value | Ensure proper base64 encoding of request body | +| ”Unauthorized request.” | Request signed incorrectly | Verify signature creation process | +| ”Nonce not provided.” | Missing nonce in request body | Include nonce in all requests | +| ”Your nonce is more than 5 seconds lesser than the current nonce” | Invalid timestamp when using nonceWindow | Use current timestamp in milliseconds | +| ”Invalid nonceWindow.” | nonceWindow is not a boolean | Ensure nonceWindow is set to true or false | | ”Request not provided.” | Missing request path in body | Include request path in all requests | \ No newline at end of file diff --git a/private/http-trade-v4/cancel-conditional-order.mdx b/api-reference/collateral-trading/cancel-conditional-order.mdx similarity index 100% rename from private/http-trade-v4/cancel-conditional-order.mdx rename to api-reference/collateral-trading/cancel-conditional-order.mdx diff --git a/private/http-trade-v4/cancel-oco-order.mdx b/api-reference/collateral-trading/cancel-oco-order.mdx similarity index 100% rename from private/http-trade-v4/cancel-oco-order.mdx rename to api-reference/collateral-trading/cancel-oco-order.mdx diff --git a/private/http-trade-v4/cancel-oto-order.mdx b/api-reference/collateral-trading/cancel-oto-order.mdx similarity index 100% rename from private/http-trade-v4/cancel-oto-order.mdx rename to api-reference/collateral-trading/cancel-oto-order.mdx diff --git a/private/http-trade-v4/change-collateral-account-leverage.mdx b/api-reference/collateral-trading/change-collateral-account-leverage.mdx similarity index 100% rename from private/http-trade-v4/change-collateral-account-leverage.mdx rename to api-reference/collateral-trading/change-collateral-account-leverage.mdx diff --git a/private/http-trade-v4/close-position.mdx b/api-reference/collateral-trading/close-position.mdx similarity index 100% rename from private/http-trade-v4/close-position.mdx rename to api-reference/collateral-trading/close-position.mdx diff --git a/private/http-trade-v4/collateral-account-balance-summary.mdx b/api-reference/collateral-trading/collateral-account-balance-summary.mdx similarity index 100% rename from private/http-trade-v4/collateral-account-balance-summary.mdx rename to api-reference/collateral-trading/collateral-account-balance-summary.mdx diff --git a/private/http-trade-v4/collateral-account-balance.mdx b/api-reference/collateral-trading/collateral-account-balance.mdx similarity index 100% rename from private/http-trade-v4/collateral-account-balance.mdx rename to api-reference/collateral-trading/collateral-account-balance.mdx diff --git a/private/http-trade-v4/collateral-account-hedge-mode.mdx b/api-reference/collateral-trading/collateral-account-hedge-mode.mdx similarity index 100% rename from private/http-trade-v4/collateral-account-hedge-mode.mdx rename to api-reference/collateral-trading/collateral-account-hedge-mode.mdx diff --git a/private/http-trade-v4/collateral-account-summary.mdx b/api-reference/collateral-trading/collateral-account-summary.mdx similarity index 100% rename from private/http-trade-v4/collateral-account-summary.mdx rename to api-reference/collateral-trading/collateral-account-summary.mdx diff --git a/private/http-trade-v4/collateral-bulk-limit-order.mdx b/api-reference/collateral-trading/collateral-bulk-limit-order.mdx similarity index 100% rename from private/http-trade-v4/collateral-bulk-limit-order.mdx rename to api-reference/collateral-trading/collateral-bulk-limit-order.mdx diff --git a/private/http-trade-v4/collateral-limit-order.mdx b/api-reference/collateral-trading/collateral-limit-order.mdx similarity index 100% rename from private/http-trade-v4/collateral-limit-order.mdx rename to api-reference/collateral-trading/collateral-limit-order.mdx diff --git a/private/http-trade-v4/collateral-market-order.mdx b/api-reference/collateral-trading/collateral-market-order.mdx similarity index 100% rename from private/http-trade-v4/collateral-market-order.mdx rename to api-reference/collateral-trading/collateral-market-order.mdx diff --git a/private/http-trade-v4/collateral-stop-limit-order.mdx b/api-reference/collateral-trading/collateral-stop-limit-order.mdx similarity index 100% rename from private/http-trade-v4/collateral-stop-limit-order.mdx rename to api-reference/collateral-trading/collateral-stop-limit-order.mdx diff --git a/private/http-trade-v4/collateral-trigger-market-order.mdx b/api-reference/collateral-trading/collateral-trigger-market-order.mdx similarity index 100% rename from private/http-trade-v4/collateral-trigger-market-order.mdx rename to api-reference/collateral-trading/collateral-trigger-market-order.mdx diff --git a/private/http-trade-v4/create-collateral-oco-order.mdx b/api-reference/collateral-trading/create-collateral-oco-order.mdx similarity index 100% rename from private/http-trade-v4/create-collateral-oco-order.mdx rename to api-reference/collateral-trading/create-collateral-oco-order.mdx diff --git a/private/http-trade-v4/funding-history.mdx b/api-reference/collateral-trading/funding-history.mdx similarity index 100% rename from private/http-trade-v4/funding-history.mdx rename to api-reference/collateral-trading/funding-history.mdx diff --git a/private/http-trade-v4/open-positions.mdx b/api-reference/collateral-trading/open-positions.mdx similarity index 100% rename from private/http-trade-v4/open-positions.mdx rename to api-reference/collateral-trading/open-positions.mdx diff --git a/private/http-trade-v4/collateral-overview.mdx b/api-reference/collateral-trading/overview.mdx similarity index 59% rename from private/http-trade-v4/collateral-overview.mdx rename to api-reference/collateral-trading/overview.mdx index e84c1b8..d8bd6fd 100644 --- a/private/http-trade-v4/collateral-overview.mdx +++ b/api-reference/collateral-trading/overview.mdx @@ -13,22 +13,22 @@ For general API conventions (base URL, error format, rate limits), see the [API ## Account & Balance - + Get collateral account balance - + Get collateral account balance summary - + Get complete collateral account summary - + Change account leverage - + Get hedge mode status - + Update hedge mode settings @@ -38,31 +38,31 @@ For general API conventions (base URL, error format, rate limits), see the [API ## Order Management - + Create a collateral limit order - + Create multiple collateral limit orders - + Create a collateral market order - + Create a collateral stop-limit order - + Create a collateral trigger market order - + Create OCO (One-Cancels-Other) order - + Cancel an OCO order - + Cancel a conditional order - + Cancel an OTO (One-Triggers-Other) order @@ -72,10 +72,10 @@ For general API conventions (base URL, error format, rate limits), see the [API ## Order Queries - + Get active conditional orders - + Get active OCO orders @@ -85,16 +85,16 @@ For general API conventions (base URL, error format, rate limits), see the [API ## Position Management - + Get all open positions - + Close a specific position - + Get positions history - + Get funding history diff --git a/private/http-trade-v4/positions-history.mdx b/api-reference/collateral-trading/positions-history.mdx similarity index 100% rename from private/http-trade-v4/positions-history.mdx rename to api-reference/collateral-trading/positions-history.mdx diff --git a/private/http-trade-v4/query-unexecuted-conditional-orders.mdx b/api-reference/collateral-trading/query-unexecuted-conditional-orders.mdx similarity index 100% rename from private/http-trade-v4/query-unexecuted-conditional-orders.mdx rename to api-reference/collateral-trading/query-unexecuted-conditional-orders.mdx diff --git a/private/http-trade-v4/query-unexecuted-oco-orders.mdx b/api-reference/collateral-trading/query-unexecuted-oco-orders.mdx similarity index 100% rename from private/http-trade-v4/query-unexecuted-oco-orders.mdx rename to api-reference/collateral-trading/query-unexecuted-oco-orders.mdx diff --git a/private/http-trade-v4/update-collateral-account-hedge-mode.mdx b/api-reference/collateral-trading/update-collateral-account-hedge-mode.mdx similarity index 100% rename from private/http-trade-v4/update-collateral-account-hedge-mode.mdx rename to api-reference/collateral-trading/update-collateral-account-hedge-mode.mdx diff --git a/private/http-trade-v4/convert-confirm.mdx b/api-reference/convert/convert-confirm.mdx similarity index 100% rename from private/http-trade-v4/convert-confirm.mdx rename to api-reference/convert/convert-confirm.mdx diff --git a/private/http-trade-v4/convert-estimate.mdx b/api-reference/convert/convert-estimate.mdx similarity index 100% rename from private/http-trade-v4/convert-estimate.mdx rename to api-reference/convert/convert-estimate.mdx diff --git a/private/http-trade-v4/convert-history.mdx b/api-reference/convert/convert-history.mdx similarity index 100% rename from private/http-trade-v4/convert-history.mdx rename to api-reference/convert/convert-history.mdx diff --git a/public/http-v4/asset-status-list.mdx b/api-reference/market-data/asset-status-list.mdx similarity index 71% rename from public/http-v4/asset-status-list.mdx rename to api-reference/market-data/asset-status-list.mdx index dfdb7b7..07959cc 100644 --- a/public/http-v4/asset-status-list.mdx +++ b/api-reference/market-data/asset-status-list.mdx @@ -9,4 +9,4 @@ openapi: "/openapi/public/http-v4.yaml GET /api/v4/public/assets" ## Error codes -This endpoint uses standard error codes. See [Error messages V4 format](/public/http-v4/index#error-messages-v4-format) for the response structure. +This endpoint uses standard error codes. See [Error messages V4 format](/api-reference/market-data/overview#error-messages-v4-format) for the response structure. diff --git a/public/http-v4/available-futures-markets-list.mdx b/api-reference/market-data/available-futures-markets-list.mdx similarity index 100% rename from public/http-v4/available-futures-markets-list.mdx rename to api-reference/market-data/available-futures-markets-list.mdx diff --git a/public/http-v4/collateral-markets-list.mdx b/api-reference/market-data/collateral-markets-list.mdx similarity index 100% rename from public/http-v4/collateral-markets-list.mdx rename to api-reference/market-data/collateral-markets-list.mdx diff --git a/public/http-v4/depth.mdx b/api-reference/market-data/depth.mdx similarity index 100% rename from public/http-v4/depth.mdx rename to api-reference/market-data/depth.mdx diff --git a/public/http-v4/fee.mdx b/api-reference/market-data/fee.mdx similarity index 69% rename from public/http-v4/fee.mdx rename to api-reference/market-data/fee.mdx index ee70d99..237783f 100644 --- a/public/http-v4/fee.mdx +++ b/api-reference/market-data/fee.mdx @@ -9,4 +9,4 @@ openapi: "/openapi/public/http-v4.yaml GET /api/v4/public/fee" ## Error codes -This endpoint uses standard error codes. See [Error messages V4 format](/public/http-v4/index#error-messages-v4-format) for the response structure. +This endpoint uses standard error codes. See [Error messages V4 format](/api-reference/market-data/overview#error-messages-v4-format) for the response structure. diff --git a/public/http-v4/funding-history.mdx b/api-reference/market-data/funding-history.mdx similarity index 100% rename from public/http-v4/funding-history.mdx rename to api-reference/market-data/funding-history.mdx diff --git a/public/http-v4/maintenance-status.mdx b/api-reference/market-data/maintenance-status.mdx similarity index 100% rename from public/http-v4/maintenance-status.mdx rename to api-reference/market-data/maintenance-status.mdx diff --git a/public/http-v4/market-activity.mdx b/api-reference/market-data/market-activity.mdx similarity index 70% rename from public/http-v4/market-activity.mdx rename to api-reference/market-data/market-activity.mdx index 0a1bb35..96b8937 100644 --- a/public/http-v4/market-activity.mdx +++ b/api-reference/market-data/market-activity.mdx @@ -9,4 +9,4 @@ openapi: "/openapi/public/http-v4.yaml GET /api/v4/public/ticker" ## Error codes -This endpoint uses standard error codes. See [Error messages V4 format](/public/http-v4/index#error-messages-v4-format) for the response structure. +This endpoint uses standard error codes. See [Error messages V4 format](/api-reference/market-data/overview#error-messages-v4-format) for the response structure. diff --git a/public/http-v4/market-info.mdx b/api-reference/market-data/market-info.mdx similarity index 100% rename from public/http-v4/market-info.mdx rename to api-reference/market-data/market-info.mdx diff --git a/public/http-v4/mining-pool-overview.mdx b/api-reference/market-data/mining-pool-overview.mdx similarity index 100% rename from public/http-v4/mining-pool-overview.mdx rename to api-reference/market-data/mining-pool-overview.mdx diff --git a/public/http-v4/orderbook.mdx b/api-reference/market-data/orderbook.mdx similarity index 100% rename from public/http-v4/orderbook.mdx rename to api-reference/market-data/orderbook.mdx diff --git a/public/http-v4/index.mdx b/api-reference/market-data/overview.mdx similarity index 57% rename from public/http-v4/index.mdx rename to api-reference/market-data/overview.mdx index 757483b..61a6879 100644 --- a/public/http-v4/index.mdx +++ b/api-reference/market-data/overview.mdx @@ -14,13 +14,13 @@ For general API conventions (base URL, error format, rate limits), see the [API Endpoints for checking server health and status: - + Check current API life-state - + Get current server time - + Check platform maintenance status @@ -32,19 +32,19 @@ Endpoints for checking server health and status: Endpoints for retrieving market and asset information: - + Get information about spot and futures markets - + Get 24-hour pricing and volume summary - + Get asset withdrawal and deposit status - + Get markets available for collateral trading - + Get available futures markets list @@ -56,13 +56,13 @@ Endpoints for retrieving market and asset information: Endpoints for order book data and recent trading activity: - + Get current order book with bids and asks - + Get depth price levels within ±2% of market price - + Get recently executed trades for a market @@ -74,10 +74,10 @@ Endpoints for order book data and recent trading activity: Endpoints for fee information and funding rates: - + Get deposit and withdrawal fees and limits - + Get funding rate history for futures markets @@ -89,7 +89,7 @@ Endpoints for fee information and funding rates: Endpoint for mining pool information: - + Get overall mining pool state and hashrate info diff --git a/public/http-v4/recent-trades.mdx b/api-reference/market-data/recent-trades.mdx similarity index 100% rename from public/http-v4/recent-trades.mdx rename to api-reference/market-data/recent-trades.mdx diff --git a/public/http-v4/server-status.mdx b/api-reference/market-data/server-status.mdx similarity index 100% rename from public/http-v4/server-status.mdx rename to api-reference/market-data/server-status.mdx diff --git a/public/http-v4/server-time.mdx b/api-reference/market-data/server-time.mdx similarity index 100% rename from public/http-v4/server-time.mdx rename to api-reference/market-data/server-time.mdx diff --git a/platform/oauth/usage/account-transactions.mdx b/api-reference/oauth/usage/account-transactions.mdx similarity index 100% rename from platform/oauth/usage/account-transactions.mdx rename to api-reference/oauth/usage/account-transactions.mdx diff --git a/platform/oauth/usage/currency-conversions.mdx b/api-reference/oauth/usage/currency-conversions.mdx similarity index 100% rename from platform/oauth/usage/currency-conversions.mdx rename to api-reference/oauth/usage/currency-conversions.mdx diff --git a/platform/oauth/usage/executed-deals.mdx b/api-reference/oauth/usage/executed-deals.mdx similarity index 100% rename from platform/oauth/usage/executed-deals.mdx rename to api-reference/oauth/usage/executed-deals.mdx diff --git a/platform/oauth/usage/get-access-token.mdx b/api-reference/oauth/usage/get-access-token.mdx similarity index 100% rename from platform/oauth/usage/get-access-token.mdx rename to api-reference/oauth/usage/get-access-token.mdx diff --git a/platform/oauth/usage/main-account-balance.mdx b/api-reference/oauth/usage/main-account-balance.mdx similarity index 100% rename from platform/oauth/usage/main-account-balance.mdx rename to api-reference/oauth/usage/main-account-balance.mdx diff --git a/platform/oauth/usage/oauth.mdx b/api-reference/oauth/usage/oauth.mdx similarity index 100% rename from platform/oauth/usage/oauth.mdx rename to api-reference/oauth/usage/oauth.mdx diff --git a/platform/oauth/usage/orders-history.mdx b/api-reference/oauth/usage/orders-history.mdx similarity index 100% rename from platform/oauth/usage/orders-history.mdx rename to api-reference/oauth/usage/orders-history.mdx diff --git a/platform/oauth/usage/refresh-token.mdx b/api-reference/oauth/usage/refresh-token.mdx similarity index 100% rename from platform/oauth/usage/refresh-token.mdx rename to api-reference/oauth/usage/refresh-token.mdx diff --git a/platform/oauth/usage/spot-account-balance.mdx b/api-reference/oauth/usage/spot-account-balance.mdx similarity index 100% rename from platform/oauth/usage/spot-account-balance.mdx rename to api-reference/oauth/usage/spot-account-balance.mdx diff --git a/api-reference/overview.mdx b/api-reference/overview.mdx index c52a84f..6804454 100644 --- a/api-reference/overview.mdx +++ b/api-reference/overview.mdx @@ -22,7 +22,7 @@ https://whitebit.com/api/v4/{endpoint} ## Authentication -Private endpoints require API key authentication with HMAC-SHA512 signed requests. See the [Authentication Guide](/private/http-auth) for setup instructions, header requirements, and code examples. +Private endpoints require API key authentication with HMAC-SHA512 signed requests. See the [Authentication Guide](/api-reference/authentication) for setup instructions, header requirements, and code examples. ## Rate Limits @@ -58,29 +58,32 @@ All V4 endpoints return errors as JSON. The format differs slightly between publ } ``` -For full details, see the [Market Data overview](/public/http-v4/index) and [Spot Trading overview](/private/http-trade-v4/overview). +For full details, see the [Market Data overview](/api-reference/market-data/overview) and [Spot Trading overview](/api-reference/spot-trading/overview). --- ## Endpoint Groups - + Public market info, orderbook, trades, fees, server status, and more. No authentication required. - + Place and manage spot orders, query execution history, and control kill-switch timers. - + Manage collateral positions, leverage, hedge mode, and collateral order types (limit, market, OCO, OTO). - + Estimate, confirm, and review currency conversion operations. - + Main balance, deposits, withdrawals, transfers, codes, crypto lending, fees, and mining pool. - + Create and manage sub-accounts, balances, transfers, and API keys. + + Third-party authorization: token exchange, refresh, and account endpoints. + diff --git a/private/http-trade-v4/bulk-limit-order.mdx b/api-reference/spot-trading/bulk-limit-order.mdx similarity index 100% rename from private/http-trade-v4/bulk-limit-order.mdx rename to api-reference/spot-trading/bulk-limit-order.mdx diff --git a/private/http-trade-v4/cancel-all-orders.mdx b/api-reference/spot-trading/cancel-all-orders.mdx similarity index 100% rename from private/http-trade-v4/cancel-all-orders.mdx rename to api-reference/spot-trading/cancel-all-orders.mdx diff --git a/private/http-trade-v4/cancel-order.mdx b/api-reference/spot-trading/cancel-order.mdx similarity index 100% rename from private/http-trade-v4/cancel-order.mdx rename to api-reference/spot-trading/cancel-order.mdx diff --git a/private/http-trade-v4/create-buy-stock-market-order.mdx b/api-reference/spot-trading/create-buy-stock-market-order.mdx similarity index 100% rename from private/http-trade-v4/create-buy-stock-market-order.mdx rename to api-reference/spot-trading/create-buy-stock-market-order.mdx diff --git a/private/http-trade-v4/create-limit-order.mdx b/api-reference/spot-trading/create-limit-order.mdx similarity index 100% rename from private/http-trade-v4/create-limit-order.mdx rename to api-reference/spot-trading/create-limit-order.mdx diff --git a/private/http-trade-v4/create-market-order.mdx b/api-reference/spot-trading/create-market-order.mdx similarity index 100% rename from private/http-trade-v4/create-market-order.mdx rename to api-reference/spot-trading/create-market-order.mdx diff --git a/private/http-trade-v4/create-stop-limit-order.mdx b/api-reference/spot-trading/create-stop-limit-order.mdx similarity index 100% rename from private/http-trade-v4/create-stop-limit-order.mdx rename to api-reference/spot-trading/create-stop-limit-order.mdx diff --git a/private/http-trade-v4/create-stop-market-order.mdx b/api-reference/spot-trading/create-stop-market-order.mdx similarity index 100% rename from private/http-trade-v4/create-stop-market-order.mdx rename to api-reference/spot-trading/create-stop-market-order.mdx diff --git a/private/http-trade-v4/modify-order.mdx b/api-reference/spot-trading/modify-order.mdx similarity index 100% rename from private/http-trade-v4/modify-order.mdx rename to api-reference/spot-trading/modify-order.mdx diff --git a/private/http-trade-v4/overview.mdx b/api-reference/spot-trading/overview.mdx similarity index 52% rename from private/http-trade-v4/overview.mdx rename to api-reference/spot-trading/overview.mdx index 11c87bf..52b67d4 100644 --- a/private/http-trade-v4/overview.mdx +++ b/api-reference/spot-trading/overview.mdx @@ -15,10 +15,10 @@ For general API conventions (base URL, error format, rate limits), see the [API Endpoints for querying market fees: - + Retrieve maker and taker fees for a specific market - + Retrieve maker and taker fees for all markets @@ -32,7 +32,7 @@ Endpoints for spot trading operations: ### Account & Balance - + Get trade balance by currency ticker or all balances @@ -40,31 +40,31 @@ Endpoints for spot trading operations: ### Order Management - + Create a limit trading order - + Create multiple limit orders (1-20 orders) - + Create a market trading order - + Create buy stock market trading order - + Create a stop-limit trading order - + Create a stop-market trading order - + Modify an existing order - + Cancel a specific order - + Cancel all orders in a market @@ -72,16 +72,16 @@ Endpoints for spot trading operations: ### Order Queries - + Get active/unexecuted orders - + Get executed order history - + Get executed order deals - + Get all executed orders @@ -89,10 +89,10 @@ Endpoints for spot trading operations: ### Kill Switch - + Synchronize kill-switch timer - + Get kill-switch timer status diff --git a/private/http-trade-v4/query-all-market-fees.mdx b/api-reference/spot-trading/query-all-market-fees.mdx similarity index 100% rename from private/http-trade-v4/query-all-market-fees.mdx rename to api-reference/spot-trading/query-all-market-fees.mdx diff --git a/private/http-trade-v4/query-executed-order-deals.mdx b/api-reference/spot-trading/query-executed-order-deals.mdx similarity index 100% rename from private/http-trade-v4/query-executed-order-deals.mdx rename to api-reference/spot-trading/query-executed-order-deals.mdx diff --git a/private/http-trade-v4/query-executed-order-history.mdx b/api-reference/spot-trading/query-executed-order-history.mdx similarity index 100% rename from private/http-trade-v4/query-executed-order-history.mdx rename to api-reference/spot-trading/query-executed-order-history.mdx diff --git a/private/http-trade-v4/query-executed-orders.mdx b/api-reference/spot-trading/query-executed-orders.mdx similarity index 100% rename from private/http-trade-v4/query-executed-orders.mdx rename to api-reference/spot-trading/query-executed-orders.mdx diff --git a/private/http-trade-v4/query-market-fee.mdx b/api-reference/spot-trading/query-market-fee.mdx similarity index 100% rename from private/http-trade-v4/query-market-fee.mdx rename to api-reference/spot-trading/query-market-fee.mdx diff --git a/private/http-trade-v4/query-unexecuted-orders.mdx b/api-reference/spot-trading/query-unexecuted-orders.mdx similarity index 100% rename from private/http-trade-v4/query-unexecuted-orders.mdx rename to api-reference/spot-trading/query-unexecuted-orders.mdx diff --git a/private/http-trade-v4/status-kill-switch-timer.mdx b/api-reference/spot-trading/status-kill-switch-timer.mdx similarity index 100% rename from private/http-trade-v4/status-kill-switch-timer.mdx rename to api-reference/spot-trading/status-kill-switch-timer.mdx diff --git a/private/http-trade-v4/sync-kill-switch-timer.mdx b/api-reference/spot-trading/sync-kill-switch-timer.mdx similarity index 100% rename from private/http-trade-v4/sync-kill-switch-timer.mdx rename to api-reference/spot-trading/sync-kill-switch-timer.mdx diff --git a/private/http-trade-v4/trading-balance.mdx b/api-reference/spot-trading/trading-balance.mdx similarity index 100% rename from private/http-trade-v4/trading-balance.mdx rename to api-reference/spot-trading/trading-balance.mdx diff --git a/private/http-main-v4/block-sub-account.mdx b/api-reference/sub-accounts/block-sub-account.mdx similarity index 100% rename from private/http-main-v4/block-sub-account.mdx rename to api-reference/sub-accounts/block-sub-account.mdx diff --git a/private/http-main-v4/create-sub-account-api-key-ip-address.mdx b/api-reference/sub-accounts/create-sub-account-api-key-ip-address.mdx similarity index 100% rename from private/http-main-v4/create-sub-account-api-key-ip-address.mdx rename to api-reference/sub-accounts/create-sub-account-api-key-ip-address.mdx diff --git a/private/http-main-v4/create-sub-account-api-key.mdx b/api-reference/sub-accounts/create-sub-account-api-key.mdx similarity index 100% rename from private/http-main-v4/create-sub-account-api-key.mdx rename to api-reference/sub-accounts/create-sub-account-api-key.mdx diff --git a/private/http-main-v4/create-sub-account.mdx b/api-reference/sub-accounts/create-sub-account.mdx similarity index 100% rename from private/http-main-v4/create-sub-account.mdx rename to api-reference/sub-accounts/create-sub-account.mdx diff --git a/private/http-main-v4/delete-sub-account-api-key-ip-address.mdx b/api-reference/sub-accounts/delete-sub-account-api-key-ip-address.mdx similarity index 100% rename from private/http-main-v4/delete-sub-account-api-key-ip-address.mdx rename to api-reference/sub-accounts/delete-sub-account-api-key-ip-address.mdx diff --git a/private/http-main-v4/delete-sub-account-api-key.mdx b/api-reference/sub-accounts/delete-sub-account-api-key.mdx similarity index 100% rename from private/http-main-v4/delete-sub-account-api-key.mdx rename to api-reference/sub-accounts/delete-sub-account-api-key.mdx diff --git a/private/http-main-v4/delete-sub-account.mdx b/api-reference/sub-accounts/delete-sub-account.mdx similarity index 100% rename from private/http-main-v4/delete-sub-account.mdx rename to api-reference/sub-accounts/delete-sub-account.mdx diff --git a/private/http-main-v4/edit-sub-account-api-key.mdx b/api-reference/sub-accounts/edit-sub-account-api-key.mdx similarity index 100% rename from private/http-main-v4/edit-sub-account-api-key.mdx rename to api-reference/sub-accounts/edit-sub-account-api-key.mdx diff --git a/private/http-main-v4/edit-sub-account.mdx b/api-reference/sub-accounts/edit-sub-account.mdx similarity index 100% rename from private/http-main-v4/edit-sub-account.mdx rename to api-reference/sub-accounts/edit-sub-account.mdx diff --git a/private/http-main-v4/get-sub-account-transfer-history.mdx b/api-reference/sub-accounts/get-sub-account-transfer-history.mdx similarity index 100% rename from private/http-main-v4/get-sub-account-transfer-history.mdx rename to api-reference/sub-accounts/get-sub-account-transfer-history.mdx diff --git a/private/http-main-v4/list-of-sub-accounts.mdx b/api-reference/sub-accounts/list-of-sub-accounts.mdx similarity index 100% rename from private/http-main-v4/list-of-sub-accounts.mdx rename to api-reference/sub-accounts/list-of-sub-accounts.mdx diff --git a/private/http-main-v4/list-sub-account-api-key-ip-addresses.mdx b/api-reference/sub-accounts/list-sub-account-api-key-ip-addresses.mdx similarity index 100% rename from private/http-main-v4/list-sub-account-api-key-ip-addresses.mdx rename to api-reference/sub-accounts/list-sub-account-api-key-ip-addresses.mdx diff --git a/private/http-main-v4/list-sub-account-api-keys.mdx b/api-reference/sub-accounts/list-sub-account-api-keys.mdx similarity index 100% rename from private/http-main-v4/list-sub-account-api-keys.mdx rename to api-reference/sub-accounts/list-sub-account-api-keys.mdx diff --git a/private/http-main-v4/sub-accounts-overview.mdx b/api-reference/sub-accounts/overview.mdx similarity index 51% rename from private/http-main-v4/sub-accounts-overview.mdx rename to api-reference/sub-accounts/overview.mdx index 10ba788..aac6396 100644 --- a/private/http-main-v4/sub-accounts-overview.mdx +++ b/api-reference/sub-accounts/overview.mdx @@ -13,22 +13,22 @@ For general API conventions (base URL, error format, rate limits), see the [API ## Account Management - + Create a new sub-account - + Delete a sub-account - + Edit sub-account details - + Get list of all sub-accounts - + Block a sub-account - + Unblock a sub-account @@ -38,13 +38,13 @@ For general API conventions (base URL, error format, rate limits), see the [API ## Balance & Transfers - + Transfer funds to/from sub-account - + Get sub-account balances - + Get sub-account transfer history @@ -54,28 +54,28 @@ For general API conventions (base URL, error format, rate limits), see the [API ## API Key Management - + Create API key for sub-account - + Edit sub-account API key - + Delete sub-account API key - + List all sub-account API keys - + Reset sub-account API key - + List IP addresses for API key - + Add IP address to API key whitelist - + Remove IP address from API key whitelist diff --git a/private/http-main-v4/reset-sub-account-api-key.mdx b/api-reference/sub-accounts/reset-sub-account-api-key.mdx similarity index 100% rename from private/http-main-v4/reset-sub-account-api-key.mdx rename to api-reference/sub-accounts/reset-sub-account-api-key.mdx diff --git a/private/http-main-v4/sub-account-balances.mdx b/api-reference/sub-accounts/sub-account-balances.mdx similarity index 100% rename from private/http-main-v4/sub-account-balances.mdx rename to api-reference/sub-accounts/sub-account-balances.mdx diff --git a/private/http-main-v4/sub-account-transfer.mdx b/api-reference/sub-accounts/sub-account-transfer.mdx similarity index 100% rename from private/http-main-v4/sub-account-transfer.mdx rename to api-reference/sub-accounts/sub-account-transfer.mdx diff --git a/private/http-main-v4/unblock-sub-account.mdx b/api-reference/sub-accounts/unblock-sub-account.mdx similarity index 100% rename from private/http-main-v4/unblock-sub-account.mdx rename to api-reference/sub-accounts/unblock-sub-account.mdx diff --git a/changelog.mdx b/changelog.mdx index e6ab292..a3c0fa7 100644 --- a/changelog.mdx +++ b/changelog.mdx @@ -1,183 +1,183 @@ ---- -title: "WhiteBIT API Changelog" -sidebarTitle: "Changelog" -description: "Track all updates, improvements, and fixes to the WhiteBIT API Platform. This page documents both upcoming and previous changes to help you stay informed about our platform's evolution." ---- - -## Previous Changes - - -## API Documentation Updates -**Sub-account transfer endpoints: add transactionId for correlation** - -The response of `/api/v4/sub-account/transfer` and `/api/v4/sub-account/transfer/history` includes the `transactionId` field. - -Use `transactionId` to correlate transfer operations with transfer history records. - -The `id` field in transfer history is deprecated. Replace `id` with `transactionId`. - - - - - - - - -## Documentation Updates -**Clarified Book Ticker stream update interval** - -Refined the description of the Book Ticker WebSocket stream to explicitly state instant BBO snapshot with incremental updates. - - - - - -## Flex Earn Endpoints -**Introduced Smart Flex private endpoints** - -Added documentation for Smart Flex (Flex Earn) endpoints: list plans, manage investments, view histories, and configure auto-reinvestment. - - - - - - - - - - - - - - -## API Documentation Updates -**Enhanced Query executed orders documentation** - -Updated documentation for `/api/v4/trade-account/order/history` endpoint to clarify date range filtering capabilities with `startDate` and `endDate` parameters. - - - - - -## Public API Update -**New Funding History endpoint** - -Added new endpoint `/api/v4/public/funding-history/{market}` to retrieve funding rate history for futures markets. - - - - - -## Private API Update - -**Issue JWT Token for Private API** - -New endpoint to issue JWT token for private API access. - - - -**Issue card token using JWT** - -New endpoint to issue a card token using JWT for secure transactions. - - - -**Withdraw endpoint update** - -Address now accepts card tokens for withdrawals. - - - - - -## Public WebSocket Update -**Added BookTicker WebSocket stream** - -New bookTicker stream added to WebSocket API, providing real-time updates of best bid/ask prices and quantities for markets. Includes subscription (bookTicker_subscribe) and unsubscription (bookTicker_unsubscribe) methods for managing the data feed. - - - - - -## Trade Engine Update - -**Event time and update id introduced in WebSocket events** - -WebSocket events now include `event_time` and `update_id` fields. The `event_time` field provides the timestamp of the event, while the `update_id` field is a unique identifier for each update, allowing for better tracking and synchronization of events. - - - -**Hedge mode support** - -The Hedge mode is now available for all users. This mode allows you to hold both long and short positions in the same asset simultaneously, providing greater flexibility in managing your trades. - - - - - - - - - - - - - - -**Queries Limited to the Last 6 Months** - -To enhance performance and focus on the most relevant data, our API limits data queries to the past 6 months. This means you will be able to retrieve data up to six months old from the current date. - - - - - - - - - - - - - -## Withdraw update - -**HTTP Main V4 API - Withdraw** - -The `paymentDescription` field is now mandatory for withdrawal requests from whitebit-tr.com. - - - - - -## Travel Rule Update - -**HTTP Main V4 API - Travel Rule** - -Added new statuses DEPOSIT_TRAVEL_RULE_FROZEN (27) and DEPOSIT_TRAVEL_RULE_FROZEN_PROCESSING (28) to the deposit endpoint. - - - - - -## Convert History Update - -**HTTP Trade V4 API - Convert** - -Added 30 days date range limit for convert history and default values for `from` and `to` parameters. - - - - - -## Deposit and Withdrawal Updates - -**HTTP Main V4 API - Birth Date Addition** - -Added beneficiary.birthDate field (Format: YYYY-MM-DD) to withdrawal requests and customer.birthDate (Format: YYYY-MM-DD) to deposit requests. - - - - - - +--- +title: "WhiteBIT API Changelog" +sidebarTitle: "Changelog" +description: "Track all updates, improvements, and fixes to the WhiteBIT API Platform. This page documents both upcoming and previous changes to help you stay informed about our platform's evolution." +--- + +## Previous Changes + + +## API Documentation Updates +**Sub-account transfer endpoints: add transactionId for correlation** + +The response of `/api/v4/sub-account/transfer` and `/api/v4/sub-account/transfer/history` includes the `transactionId` field. + +Use `transactionId` to correlate transfer operations with transfer history records. + +The `id` field in transfer history is deprecated. Replace `id` with `transactionId`. + + + + + + + + +## Documentation Updates +**Clarified Book Ticker stream update interval** + +Refined the description of the Book Ticker WebSocket stream to explicitly state instant BBO snapshot with incremental updates. + + + + + +## Flex Earn Endpoints +**Introduced Smart Flex private endpoints** + +Added documentation for Smart Flex (Flex Earn) endpoints: list plans, manage investments, view histories, and configure auto-reinvestment. + + + + + + + + + + + + + + +## API Documentation Updates +**Enhanced Query executed orders documentation** + +Updated documentation for `/api/v4/trade-account/order/history` endpoint to clarify date range filtering capabilities with `startDate` and `endDate` parameters. + + + + + +## Public API Update +**New Funding History endpoint** + +Added new endpoint `/api/v4/public/funding-history/{market}` to retrieve funding rate history for futures markets. + + + + + +## Private API Update + +**Issue JWT Token for Private API** + +New endpoint to issue JWT token for private API access. + + + +**Issue card token using JWT** + +New endpoint to issue a card token using JWT for secure transactions. + + + +**Withdraw endpoint update** + +Address now accepts card tokens for withdrawals. + + + + + +## Public WebSocket Update +**Added BookTicker WebSocket stream** + +New bookTicker stream added to WebSocket API, providing real-time updates of best bid/ask prices and quantities for markets. Includes subscription (bookTicker_subscribe) and unsubscription (bookTicker_unsubscribe) methods for managing the data feed. + + + + + +## Trade Engine Update + +**Event time and update id introduced in WebSocket events** + +WebSocket events now include `event_time` and `update_id` fields. The `event_time` field provides the timestamp of the event, while the `update_id` field is a unique identifier for each update, allowing for better tracking and synchronization of events. + + + +**Hedge mode support** + +The Hedge mode is now available for all users. This mode allows you to hold both long and short positions in the same asset simultaneously, providing greater flexibility in managing your trades. + + + + + + + + + + + + + + +**Queries Limited to the Last 6 Months** + +To enhance performance and focus on the most relevant data, our API limits data queries to the past 6 months. This means you will be able to retrieve data up to six months old from the current date. + + + + + + + + + + + + + +## Withdraw update + +**HTTP Main V4 API - Withdraw** + +The `paymentDescription` field is now mandatory for withdrawal requests from whitebit-tr.com. + + + + + +## Travel Rule Update + +**HTTP Main V4 API - Travel Rule** + +Added new statuses DEPOSIT_TRAVEL_RULE_FROZEN (27) and DEPOSIT_TRAVEL_RULE_FROZEN_PROCESSING (28) to the deposit endpoint. + + + + + +## Convert History Update + +**HTTP Trade V4 API - Convert** + +Added 30 days date range limit for convert history and default values for `from` and `to` parameters. + + + + + +## Deposit and Withdrawal Updates + +**HTTP Main V4 API - Birth Date Addition** + +Added beneficiary.birthDate field (Format: YYYY-MM-DD) to withdrawal requests and customer.birthDate (Format: YYYY-MM-DD) to deposit requests. + + + + + + diff --git a/docs.json b/docs.json index 2e85f4c..391b92c 100644 --- a/docs.json +++ b/docs.json @@ -77,89 +77,89 @@ "group": " ", "pages": [ "api-reference/overview", - "private/http-auth" + "api-reference/authentication" ] }, { "group": "Market Data", "pages": [ - "public/http-v4/index", + "api-reference/market-data/overview", { "group": "Server & Status", "pages": [ - "public/http-v4/server-status", - "public/http-v4/server-time", - "public/http-v4/maintenance-status" + "api-reference/market-data/server-status", + "api-reference/market-data/server-time", + "api-reference/market-data/maintenance-status" ] }, { "group": "Markets & Assets", "pages": [ - "public/http-v4/market-info", - "public/http-v4/market-activity", - "public/http-v4/asset-status-list", - "public/http-v4/collateral-markets-list", - "public/http-v4/available-futures-markets-list" + "api-reference/market-data/market-info", + "api-reference/market-data/market-activity", + "api-reference/market-data/asset-status-list", + "api-reference/market-data/collateral-markets-list", + "api-reference/market-data/available-futures-markets-list" ] }, { "group": "Order Book & Trades", "pages": [ - "public/http-v4/orderbook", - "public/http-v4/depth", - "public/http-v4/recent-trades" + "api-reference/market-data/orderbook", + "api-reference/market-data/depth", + "api-reference/market-data/recent-trades" ] }, { "group": "Fees & Funding", "pages": [ - "public/http-v4/fee", - "public/http-v4/funding-history" + "api-reference/market-data/fee", + "api-reference/market-data/funding-history" ] }, - "public/http-v4/mining-pool-overview" + "api-reference/market-data/mining-pool-overview" ] }, { "group": "Spot Trading", "pages": [ - "private/http-trade-v4/overview", + "api-reference/spot-trading/overview", { "group": "Market Fee", "pages": [ - "private/http-trade-v4/query-market-fee", - "private/http-trade-v4/query-all-market-fees" + "api-reference/spot-trading/query-market-fee", + "api-reference/spot-trading/query-all-market-fees" ] }, { "group": "Order Management", "pages": [ - "private/http-trade-v4/trading-balance", - "private/http-trade-v4/create-limit-order", - "private/http-trade-v4/bulk-limit-order", - "private/http-trade-v4/create-market-order", - "private/http-trade-v4/create-buy-stock-market-order", - "private/http-trade-v4/create-stop-limit-order", - "private/http-trade-v4/create-stop-market-order", - "private/http-trade-v4/modify-order", - "private/http-trade-v4/cancel-order", - "private/http-trade-v4/cancel-all-orders" + "api-reference/spot-trading/trading-balance", + "api-reference/spot-trading/create-limit-order", + "api-reference/spot-trading/bulk-limit-order", + "api-reference/spot-trading/create-market-order", + "api-reference/spot-trading/create-buy-stock-market-order", + "api-reference/spot-trading/create-stop-limit-order", + "api-reference/spot-trading/create-stop-market-order", + "api-reference/spot-trading/modify-order", + "api-reference/spot-trading/cancel-order", + "api-reference/spot-trading/cancel-all-orders" ] }, { "group": "Order Queries", "pages": [ - "private/http-trade-v4/query-unexecuted-orders", - "private/http-trade-v4/query-executed-order-history", - "private/http-trade-v4/query-executed-order-deals", - "private/http-trade-v4/query-executed-orders" + "api-reference/spot-trading/query-unexecuted-orders", + "api-reference/spot-trading/query-executed-order-history", + "api-reference/spot-trading/query-executed-order-deals", + "api-reference/spot-trading/query-executed-orders" ] }, { "group": "Kill Switch", "pages": [ - "private/http-trade-v4/sync-kill-switch-timer", - "private/http-trade-v4/status-kill-switch-timer" + "api-reference/spot-trading/sync-kill-switch-timer", + "api-reference/spot-trading/status-kill-switch-timer" ] } ] @@ -167,46 +167,46 @@ { "group": "Collateral Trading", "pages": [ - "private/http-trade-v4/collateral-overview", + "api-reference/collateral-trading/overview", { "group": "Account & Balance", "pages": [ - "private/http-trade-v4/collateral-account-balance", - "private/http-trade-v4/collateral-account-balance-summary", - "private/http-trade-v4/collateral-account-summary", - "private/http-trade-v4/change-collateral-account-leverage", - "private/http-trade-v4/collateral-account-hedge-mode", - "private/http-trade-v4/update-collateral-account-hedge-mode" + "api-reference/collateral-trading/collateral-account-balance", + "api-reference/collateral-trading/collateral-account-balance-summary", + "api-reference/collateral-trading/collateral-account-summary", + "api-reference/collateral-trading/change-collateral-account-leverage", + "api-reference/collateral-trading/collateral-account-hedge-mode", + "api-reference/collateral-trading/update-collateral-account-hedge-mode" ] }, { "group": "Order Management", "pages": [ - "private/http-trade-v4/collateral-limit-order", - "private/http-trade-v4/collateral-bulk-limit-order", - "private/http-trade-v4/collateral-market-order", - "private/http-trade-v4/collateral-stop-limit-order", - "private/http-trade-v4/collateral-trigger-market-order", - "private/http-trade-v4/create-collateral-oco-order", - "private/http-trade-v4/cancel-oco-order", - "private/http-trade-v4/cancel-conditional-order", - "private/http-trade-v4/cancel-oto-order" + "api-reference/collateral-trading/collateral-limit-order", + "api-reference/collateral-trading/collateral-bulk-limit-order", + "api-reference/collateral-trading/collateral-market-order", + "api-reference/collateral-trading/collateral-stop-limit-order", + "api-reference/collateral-trading/collateral-trigger-market-order", + "api-reference/collateral-trading/create-collateral-oco-order", + "api-reference/collateral-trading/cancel-oco-order", + "api-reference/collateral-trading/cancel-conditional-order", + "api-reference/collateral-trading/cancel-oto-order" ] }, { "group": "Order Queries", "pages": [ - "private/http-trade-v4/query-unexecuted-conditional-orders", - "private/http-trade-v4/query-unexecuted-oco-orders" + "api-reference/collateral-trading/query-unexecuted-conditional-orders", + "api-reference/collateral-trading/query-unexecuted-oco-orders" ] }, { "group": "Position Management", "pages": [ - "private/http-trade-v4/open-positions", - "private/http-trade-v4/close-position", - "private/http-trade-v4/positions-history", - "private/http-trade-v4/funding-history" + "api-reference/collateral-trading/open-positions", + "api-reference/collateral-trading/close-position", + "api-reference/collateral-trading/positions-history", + "api-reference/collateral-trading/funding-history" ] } ] @@ -214,109 +214,109 @@ { "group": "Convert", "pages": [ - "private/http-trade-v4/convert-estimate", - "private/http-trade-v4/convert-confirm", - "private/http-trade-v4/convert-history" + "api-reference/convert/convert-estimate", + "api-reference/convert/convert-confirm", + "api-reference/convert/convert-history" ] }, { "group": "Account & Wallet", "pages": [ - "private/http-main-v4/overview", + "api-reference/account-wallet/overview", { "group": "Main Balance & Transfers", "pages": [ - "private/http-main-v4/main-balance", - "private/http-main-v4/get-cryptocurrency-deposit-address", - "private/http-main-v4/get-fiat-deposit-address", - "private/http-main-v4/refund-deposit", - "private/http-main-v4/issue-jwt-token", - "private/http-main-v4/profile-websocket-token", - "private/http-main-v4/issue-card-token", - "private/http-main-v4/create-withdraw-request", - "private/http-main-v4/create-withdraw-request-with-specific-amount", - "private/http-main-v4/transfer-between-balances", - "private/http-main-v4/get-deposit-withdraw-history", - "private/http-main-v4/create-new-address-for-deposit" + "api-reference/account-wallet/main-balance", + "api-reference/account-wallet/get-cryptocurrency-deposit-address", + "api-reference/account-wallet/get-fiat-deposit-address", + "api-reference/account-wallet/refund-deposit", + "api-reference/account-wallet/issue-jwt-token", + "api-reference/account-wallet/profile-websocket-token", + "api-reference/account-wallet/issue-card-token", + "api-reference/account-wallet/create-withdraw-request", + "api-reference/account-wallet/create-withdraw-request-with-specific-amount", + "api-reference/account-wallet/transfer-between-balances", + "api-reference/account-wallet/get-deposit-withdraw-history", + "api-reference/account-wallet/create-new-address-for-deposit" ] }, { "group": "Codes", "pages": [ - "private/http-main-v4/create-code", - "private/http-main-v4/apply-code", - "private/http-main-v4/get-my-codes", - "private/http-main-v4/get-codes-history" + "api-reference/account-wallet/create-code", + "api-reference/account-wallet/apply-code", + "api-reference/account-wallet/get-my-codes", + "api-reference/account-wallet/get-codes-history" ] }, { "group": "Crypto Lending - Fixed", "pages": [ - "private/http-main-v4/get-plans", - "private/http-main-v4/invest", - "private/http-main-v4/close-investment", - "private/http-main-v4/get-investments-history", - "private/http-main-v4/get-interest-payments-history" + "api-reference/account-wallet/get-plans", + "api-reference/account-wallet/invest", + "api-reference/account-wallet/close-investment", + "api-reference/account-wallet/get-investments-history", + "api-reference/account-wallet/get-interest-payments-history" ] }, { "group": "Crypto Lending - Flex", "pages": [ - "private/http-main-v4/get-flex-plans", - "private/http-main-v4/get-user-flex-investments", - "private/http-main-v4/get-flex-investment-history", - "private/http-main-v4/get-flex-payment-history", - "private/http-main-v4/create-flex-investment", - "private/http-main-v4/withdraw-from-flex-investment", - "private/http-main-v4/close-flex-investment", - "private/http-main-v4/update-flex-auto-reinvestment" + "api-reference/account-wallet/get-flex-plans", + "api-reference/account-wallet/get-user-flex-investments", + "api-reference/account-wallet/get-flex-investment-history", + "api-reference/account-wallet/get-flex-payment-history", + "api-reference/account-wallet/create-flex-investment", + "api-reference/account-wallet/withdraw-from-flex-investment", + "api-reference/account-wallet/close-flex-investment", + "api-reference/account-wallet/update-flex-auto-reinvestment" ] }, { "group": "Mining Pool", "pages": [ - "private/http-main-v4/get-rewards", - "private/http-main-v4/get-mining-account-hashrate" + "api-reference/account-wallet/get-rewards", + "api-reference/account-wallet/get-mining-account-hashrate" ] }, - "private/http-main-v4/get-fees", - "private/http-main-v4/list-credit-lines" + "api-reference/account-wallet/get-fees", + "api-reference/account-wallet/list-credit-lines" ] }, { "group": "Sub-Accounts", "pages": [ - "private/http-main-v4/sub-accounts-overview", + "api-reference/sub-accounts/overview", { "group": "Account Management", "pages": [ - "private/http-main-v4/create-sub-account", - "private/http-main-v4/delete-sub-account", - "private/http-main-v4/edit-sub-account", - "private/http-main-v4/list-of-sub-accounts", - "private/http-main-v4/block-sub-account", - "private/http-main-v4/unblock-sub-account" + "api-reference/sub-accounts/create-sub-account", + "api-reference/sub-accounts/delete-sub-account", + "api-reference/sub-accounts/edit-sub-account", + "api-reference/sub-accounts/list-of-sub-accounts", + "api-reference/sub-accounts/block-sub-account", + "api-reference/sub-accounts/unblock-sub-account" ] }, { "group": "Balance & Transfers", "pages": [ - "private/http-main-v4/sub-account-transfer", - "private/http-main-v4/sub-account-balances", - "private/http-main-v4/get-sub-account-transfer-history" + "api-reference/sub-accounts/sub-account-transfer", + "api-reference/sub-accounts/sub-account-balances", + "api-reference/sub-accounts/get-sub-account-transfer-history" ] }, { "group": "API Key Management", "pages": [ - "private/http-main-v4/create-sub-account-api-key", - "private/http-main-v4/edit-sub-account-api-key", - "private/http-main-v4/delete-sub-account-api-key", - "private/http-main-v4/list-sub-account-api-keys", - "private/http-main-v4/reset-sub-account-api-key", - "private/http-main-v4/list-sub-account-api-key-ip-addresses", - "private/http-main-v4/create-sub-account-api-key-ip-address", - "private/http-main-v4/delete-sub-account-api-key-ip-address" + "api-reference/sub-accounts/create-sub-account-api-key", + "api-reference/sub-accounts/edit-sub-account-api-key", + "api-reference/sub-accounts/delete-sub-account-api-key", + "api-reference/sub-accounts/list-sub-account-api-keys", + "api-reference/sub-accounts/reset-sub-account-api-key", + "api-reference/sub-accounts/list-sub-account-api-key-ip-addresses", + "api-reference/sub-accounts/create-sub-account-api-key-ip-address", + "api-reference/sub-accounts/delete-sub-account-api-key-ip-address" ] } ] @@ -324,15 +324,15 @@ { "group": "OAuth", "pages": [ - "platform/oauth/usage/oauth", - "platform/oauth/usage/get-access-token", - "platform/oauth/usage/refresh-token", - "platform/oauth/usage/account-transactions", - "platform/oauth/usage/currency-conversions", - "platform/oauth/usage/orders-history", - "platform/oauth/usage/executed-deals", - "platform/oauth/usage/main-account-balance", - "platform/oauth/usage/spot-account-balance" + "api-reference/oauth/usage/oauth", + "api-reference/oauth/usage/get-access-token", + "api-reference/oauth/usage/refresh-token", + "api-reference/oauth/usage/account-transactions", + "api-reference/oauth/usage/currency-conversions", + "api-reference/oauth/usage/orders-history", + "api-reference/oauth/usage/executed-deals", + "api-reference/oauth/usage/main-account-balance", + "api-reference/oauth/usage/spot-account-balance" ] } ] @@ -349,31 +349,31 @@ { "group": "Market Streams", "pages": [ - "public/websocket/index", - "public/websocket/service", - "public/websocket/kline", - "public/websocket/lastprice", - "public/websocket/market", - "public/websocket/market-today", - "public/websocket/trades", - "public/websocket/depth", - "public/websocket/book-ticker" + "websocket/market-streams/overview", + "websocket/market-streams/service", + "websocket/market-streams/kline", + "websocket/market-streams/lastprice", + "websocket/market-streams/market", + "websocket/market-streams/market-today", + "websocket/market-streams/trades", + "websocket/market-streams/depth", + "websocket/market-streams/book-ticker" ] }, { "group": "Account Streams", "pages": [ - "private/websocket/index", - "private/websocket/authorize", - "private/websocket/balance-spot", - "private/websocket/balance-margin", - "private/websocket/orders-pending", - "private/websocket/orders-executed", - "private/websocket/deals", - "private/websocket/positions", - "private/websocket/margin-positions-events", - "private/websocket/borrows", - "private/websocket/borrows-events" + "websocket/account-streams/overview", + "websocket/account-streams/authorize", + "websocket/account-streams/balance-spot", + "websocket/account-streams/balance-margin", + "websocket/account-streams/orders-pending", + "websocket/account-streams/orders-executed", + "websocket/account-streams/deals", + "websocket/account-streams/positions", + "websocket/account-streams/margin-positions-events", + "websocket/account-streams/borrows", + "websocket/account-streams/borrows-events" ] } ] @@ -421,5 +421,519 @@ "discord": "https://discord.com/invite/DuNSzgf6bU", "youtube": "https://www.youtube.com/channel/UCPtyKYMGGJKXAHOLKqGJyAQ" } - } -} \ No newline at end of file + }, + "redirects": [ + { + "source": "/private/http-auth", + "destination": "/api-reference/authentication" + }, + { + "source": "/private/http-main-v4/apply-code", + "destination": "/api-reference/account-wallet/apply-code" + }, + { + "source": "/private/http-main-v4/block-sub-account", + "destination": "/api-reference/sub-accounts/block-sub-account" + }, + { + "source": "/private/http-main-v4/close-flex-investment", + "destination": "/api-reference/account-wallet/close-flex-investment" + }, + { + "source": "/private/http-main-v4/close-investment", + "destination": "/api-reference/account-wallet/close-investment" + }, + { + "source": "/private/http-main-v4/create-code", + "destination": "/api-reference/account-wallet/create-code" + }, + { + "source": "/private/http-main-v4/create-flex-investment", + "destination": "/api-reference/account-wallet/create-flex-investment" + }, + { + "source": "/private/http-main-v4/create-new-address-for-deposit", + "destination": "/api-reference/account-wallet/create-new-address-for-deposit" + }, + { + "source": "/private/http-main-v4/create-sub-account", + "destination": "/api-reference/sub-accounts/create-sub-account" + }, + { + "source": "/private/http-main-v4/create-sub-account-api-key", + "destination": "/api-reference/sub-accounts/create-sub-account-api-key" + }, + { + "source": "/private/http-main-v4/create-sub-account-api-key-ip-address", + "destination": "/api-reference/sub-accounts/create-sub-account-api-key-ip-address" + }, + { + "source": "/private/http-main-v4/create-withdraw-request", + "destination": "/api-reference/account-wallet/create-withdraw-request" + }, + { + "source": "/private/http-main-v4/delete-sub-account", + "destination": "/api-reference/sub-accounts/delete-sub-account" + }, + { + "source": "/private/http-main-v4/delete-sub-account-api-key", + "destination": "/api-reference/sub-accounts/delete-sub-account-api-key" + }, + { + "source": "/private/http-main-v4/delete-sub-account-api-key-ip-address", + "destination": "/api-reference/sub-accounts/delete-sub-account-api-key-ip-address" + }, + { + "source": "/private/http-main-v4/edit-sub-account", + "destination": "/api-reference/sub-accounts/edit-sub-account" + }, + { + "source": "/private/http-main-v4/edit-sub-account-api-key", + "destination": "/api-reference/sub-accounts/edit-sub-account-api-key" + }, + { + "source": "/private/http-main-v4/get-codes-history", + "destination": "/api-reference/account-wallet/get-codes-history" + }, + { + "source": "/private/http-main-v4/get-cryptocurrency-deposit-address", + "destination": "/api-reference/account-wallet/get-cryptocurrency-deposit-address" + }, + { + "source": "/private/http-main-v4/get-fees", + "destination": "/api-reference/account-wallet/get-fees" + }, + { + "source": "/private/http-main-v4/get-fiat-deposit-address", + "destination": "/api-reference/account-wallet/get-fiat-deposit-address" + }, + { + "source": "/private/http-main-v4/get-flex-investment-history", + "destination": "/api-reference/account-wallet/get-flex-investment-history" + }, + { + "source": "/private/http-main-v4/get-flex-payment-history", + "destination": "/api-reference/account-wallet/get-flex-payment-history" + }, + { + "source": "/private/http-main-v4/get-flex-plans", + "destination": "/api-reference/account-wallet/get-flex-plans" + }, + { + "source": "/private/http-main-v4/get-interest-payments-history", + "destination": "/api-reference/account-wallet/get-interest-payments-history" + }, + { + "source": "/private/http-main-v4/get-investments-history", + "destination": "/api-reference/account-wallet/get-investments-history" + }, + { + "source": "/private/http-main-v4/get-mining-account-hashrate", + "destination": "/api-reference/account-wallet/get-mining-account-hashrate" + }, + { + "source": "/private/http-main-v4/get-my-codes", + "destination": "/api-reference/account-wallet/get-my-codes" + }, + { + "source": "/private/http-main-v4/get-plans", + "destination": "/api-reference/account-wallet/get-plans" + }, + { + "source": "/private/http-main-v4/get-rewards", + "destination": "/api-reference/account-wallet/get-rewards" + }, + { + "source": "/private/http-main-v4/get-sub-account-transfer-history", + "destination": "/api-reference/sub-accounts/get-sub-account-transfer-history" + }, + { + "source": "/private/http-main-v4/get-user-flex-investments", + "destination": "/api-reference/account-wallet/get-user-flex-investments" + }, + { + "source": "/private/http-main-v4/invest", + "destination": "/api-reference/account-wallet/invest" + }, + { + "source": "/private/http-main-v4/issue-card-token", + "destination": "/api-reference/account-wallet/issue-card-token" + }, + { + "source": "/private/http-main-v4/issue-jwt-token", + "destination": "/api-reference/account-wallet/issue-jwt-token" + }, + { + "source": "/private/http-main-v4/list-credit-lines", + "destination": "/api-reference/account-wallet/list-credit-lines" + }, + { + "source": "/private/http-main-v4/list-of-sub-accounts", + "destination": "/api-reference/sub-accounts/list-of-sub-accounts" + }, + { + "source": "/private/http-main-v4/list-sub-account-api-key-ip-addresses", + "destination": "/api-reference/sub-accounts/list-sub-account-api-key-ip-addresses" + }, + { + "source": "/private/http-main-v4/list-sub-account-api-keys", + "destination": "/api-reference/sub-accounts/list-sub-account-api-keys" + }, + { + "source": "/private/http-main-v4/main-balance", + "destination": "/api-reference/account-wallet/main-balance" + }, + { + "source": "/private/http-main-v4/reset-sub-account-api-key", + "destination": "/api-reference/sub-accounts/reset-sub-account-api-key" + }, + { + "source": "/private/http-main-v4/sub-account-balances", + "destination": "/api-reference/sub-accounts/sub-account-balances" + }, + { + "source": "/private/http-main-v4/sub-account-transfer", + "destination": "/api-reference/sub-accounts/sub-account-transfer" + }, + { + "source": "/private/http-main-v4/transfer-between-balances", + "destination": "/api-reference/account-wallet/transfer-between-balances" + }, + { + "source": "/private/http-main-v4/unblock-sub-account", + "destination": "/api-reference/sub-accounts/unblock-sub-account" + }, + { + "source": "/private/http-main-v4/update-flex-auto-reinvestment", + "destination": "/api-reference/account-wallet/update-flex-auto-reinvestment" + }, + { + "source": "/private/http-main-v4/withdraw-from-flex-investment", + "destination": "/api-reference/account-wallet/withdraw-from-flex-investment" + }, + { + "source": "/private/http-trade-v4/bulk-limit-order", + "destination": "/api-reference/spot-trading/bulk-limit-order" + }, + { + "source": "/private/http-trade-v4/cancel-all-orders", + "destination": "/api-reference/spot-trading/cancel-all-orders" + }, + { + "source": "/private/http-trade-v4/cancel-conditional-order", + "destination": "/api-reference/collateral-trading/cancel-conditional-order" + }, + { + "source": "/private/http-trade-v4/cancel-oco-order", + "destination": "/api-reference/collateral-trading/cancel-oco-order" + }, + { + "source": "/private/http-trade-v4/cancel-order", + "destination": "/api-reference/spot-trading/cancel-order" + }, + { + "source": "/private/http-trade-v4/cancel-oto-order", + "destination": "/api-reference/collateral-trading/cancel-oto-order" + }, + { + "source": "/private/http-trade-v4/change-collateral-account-leverage", + "destination": "/api-reference/collateral-trading/change-collateral-account-leverage" + }, + { + "source": "/private/http-trade-v4/close-position", + "destination": "/api-reference/collateral-trading/close-position" + }, + { + "source": "/private/http-trade-v4/collateral-account-balance", + "destination": "/api-reference/collateral-trading/collateral-account-balance" + }, + { + "source": "/private/http-trade-v4/collateral-account-balance-summary", + "destination": "/api-reference/collateral-trading/collateral-account-balance-summary" + }, + { + "source": "/private/http-trade-v4/collateral-account-hedge-mode", + "destination": "/api-reference/collateral-trading/collateral-account-hedge-mode" + }, + { + "source": "/private/http-trade-v4/collateral-account-summary", + "destination": "/api-reference/collateral-trading/collateral-account-summary" + }, + { + "source": "/private/http-trade-v4/collateral-bulk-limit-order", + "destination": "/api-reference/collateral-trading/collateral-bulk-limit-order" + }, + { + "source": "/private/http-trade-v4/collateral-limit-order", + "destination": "/api-reference/collateral-trading/collateral-limit-order" + }, + { + "source": "/private/http-trade-v4/collateral-market-order", + "destination": "/api-reference/collateral-trading/collateral-market-order" + }, + { + "source": "/private/http-trade-v4/collateral-stop-limit-order", + "destination": "/api-reference/collateral-trading/collateral-stop-limit-order" + }, + { + "source": "/private/http-trade-v4/collateral-trigger-market-order", + "destination": "/api-reference/collateral-trading/collateral-trigger-market-order" + }, + { + "source": "/private/http-trade-v4/convert-confirm", + "destination": "/api-reference/convert/convert-confirm" + }, + { + "source": "/private/http-trade-v4/convert-estimate", + "destination": "/api-reference/convert/convert-estimate" + }, + { + "source": "/private/http-trade-v4/convert-history", + "destination": "/api-reference/convert/convert-history" + }, + { + "source": "/private/http-trade-v4/create-buy-stock-market-order", + "destination": "/api-reference/spot-trading/create-buy-stock-market-order" + }, + { + "source": "/private/http-trade-v4/create-collateral-oco-order", + "destination": "/api-reference/collateral-trading/create-collateral-oco-order" + }, + { + "source": "/private/http-trade-v4/create-limit-order", + "destination": "/api-reference/spot-trading/create-limit-order" + }, + { + "source": "/private/http-trade-v4/create-market-order", + "destination": "/api-reference/spot-trading/create-market-order" + }, + { + "source": "/private/http-trade-v4/create-stop-limit-order", + "destination": "/api-reference/spot-trading/create-stop-limit-order" + }, + { + "source": "/private/http-trade-v4/create-stop-market-order", + "destination": "/api-reference/spot-trading/create-stop-market-order" + }, + { + "source": "/private/http-trade-v4/funding-history", + "destination": "/api-reference/collateral-trading/funding-history" + }, + { + "source": "/private/http-trade-v4/modify-order", + "destination": "/api-reference/spot-trading/modify-order" + }, + { + "source": "/private/http-trade-v4/open-positions", + "destination": "/api-reference/collateral-trading/open-positions" + }, + { + "source": "/private/http-trade-v4/positions-history", + "destination": "/api-reference/collateral-trading/positions-history" + }, + { + "source": "/private/http-trade-v4/query-all-market-fees", + "destination": "/api-reference/spot-trading/query-all-market-fees" + }, + { + "source": "/private/http-trade-v4/query-executed-order-deals", + "destination": "/api-reference/spot-trading/query-executed-order-deals" + }, + { + "source": "/private/http-trade-v4/query-executed-order-history", + "destination": "/api-reference/spot-trading/query-executed-order-history" + }, + { + "source": "/private/http-trade-v4/query-executed-orders", + "destination": "/api-reference/spot-trading/query-executed-orders" + }, + { + "source": "/private/http-trade-v4/query-market-fee", + "destination": "/api-reference/spot-trading/query-market-fee" + }, + { + "source": "/private/http-trade-v4/status-kill-switch-timer", + "destination": "/api-reference/spot-trading/status-kill-switch-timer" + }, + { + "source": "/private/http-trade-v4/sync-kill-switch-timer", + "destination": "/api-reference/spot-trading/sync-kill-switch-timer" + }, + { + "source": "/private/http-trade-v4/trading-balance", + "destination": "/api-reference/spot-trading/trading-balance" + }, + { + "source": "/private/http-trade-v4/update-collateral-account-hedge-mode", + "destination": "/api-reference/collateral-trading/update-collateral-account-hedge-mode" + }, + { + "source": "/private/websocket/authorize", + "destination": "/websocket/account-streams/authorize" + }, + { + "source": "/private/websocket/balance-spot", + "destination": "/websocket/account-streams/balance-spot" + }, + { + "source": "/private/websocket/orders-executed", + "destination": "/websocket/account-streams/orders-executed" + }, + { + "source": "/private/websocket/positions", + "destination": "/websocket/account-streams/positions" + }, + { + "source": "/private/websocket/balance-margin", + "destination": "/websocket/account-streams/balance-margin" + }, + { + "source": "/private/websocket/deals", + "destination": "/websocket/account-streams/deals" + }, + { + "source": "/private/websocket/borrows", + "destination": "/websocket/account-streams/borrows" + }, + { + "source": "/public/http-v4/asset-status-list", + "destination": "/api-reference/market-data/asset-status-list" + }, + { + "source": "/public/http-v4/available-futures-markets-list", + "destination": "/api-reference/market-data/available-futures-markets-list" + }, + { + "source": "/public/http-v4/collateral-markets-list", + "destination": "/api-reference/market-data/collateral-markets-list" + }, + { + "source": "/public/http-v4/depth", + "destination": "/api-reference/market-data/depth" + }, + { + "source": "/public/http-v4/fee", + "destination": "/api-reference/market-data/fee" + }, + { + "source": "/public/http-v4/funding-history", + "destination": "/api-reference/market-data/funding-history" + }, + { + "source": "/public/http-v4/maintenance-status", + "destination": "/api-reference/market-data/maintenance-status" + }, + { + "source": "/public/http-v4/market-activity", + "destination": "/api-reference/market-data/market-activity" + }, + { + "source": "/public/http-v4/market-info", + "destination": "/api-reference/market-data/market-info" + }, + { + "source": "/public/http-v4/mining-pool-overview", + "destination": "/api-reference/market-data/mining-pool-overview" + }, + { + "source": "/public/http-v4/orderbook", + "destination": "/api-reference/market-data/orderbook" + }, + { + "source": "/public/http-v4/recent-trades", + "destination": "/api-reference/market-data/recent-trades" + }, + { + "source": "/public/http-v4/server-status", + "destination": "/api-reference/market-data/server-status" + }, + { + "source": "/public/http-v4/server-time", + "destination": "/api-reference/market-data/server-time" + }, + { + "source": "/public/websocket/book-ticker", + "destination": "/websocket/market-streams/book-ticker" + }, + { + "source": "/public/websocket/kline", + "destination": "/websocket/market-streams/kline" + }, + { + "source": "/public/websocket/service", + "destination": "/websocket/market-streams/service" + }, + { + "source": "/platform/oauth/usage/get-access-token", + "destination": "/api-reference/oauth/usage/get-access-token" + }, + { + "source": "/platform/oauth/usage/refresh-token", + "destination": "/api-reference/oauth/usage/refresh-token" + }, + { + "source": "/public/http-v4", + "destination": "/api-reference/market-data/overview" + }, + { + "source": "/public/websocket", + "destination": "/websocket/market-streams/overview" + }, + { + "source": "/private/http-main-v4", + "destination": "/api-reference/account-wallet/overview" + }, + { + "source": "/private/http-trade-v4", + "destination": "/api-reference/spot-trading/overview" + }, + { + "source": "/private/websocket", + "destination": "/websocket/account-streams/overview" + }, + { + "source": "/platform/oauth/usage", + "destination": "/platform/oauth/usage/overview" + }, + { + "source": "/private/http-trade-v4/query-active-orders", + "destination": "/api-reference/spot-trading/query-unexecuted-orders" + }, + { + "source": "/private/http-trade-v4/query-active-conditional-orders", + "destination": "/api-reference/collateral-trading/query-unexecuted-conditional-orders" + }, + { + "source": "/private/http-trade-v4/query-active-oco-orders", + "destination": "/api-reference/collateral-trading/query-unexecuted-oco-orders" + }, + { + "source": "/private/http-main-v4/create-withdraw-request-with-the-specific-withdraw-amount-fee-is-not-included", + "destination": "/api-reference/account-wallet/create-withdraw-request-with-specific-amount" + }, + { + "source": "/private/websocket/active-orders", + "destination": "/websocket/account-streams/orders-pending" + }, + { + "source": "/private/websocket/account-margin-positions-events", + "destination": "/websocket/account-streams/margin-positions-events" + }, + { + "source": "/private/websocket/account-borrows-events", + "destination": "/websocket/account-streams/borrows-events" + }, + { + "source": "/private/websocket/websocket-token", + "destination": "/websocket/account-streams/authorize" + }, + { + "source": "/public/websocket/market-statistics", + "destination": "/websocket/market-streams/market" + }, + { + "source": "/public/websocket/market-statistics-for-current-day-utc", + "destination": "/websocket/market-streams/market-today" + } + ] +} diff --git a/docs/reference/file-structure.md b/docs/reference/file-structure.md index 6751d54..9617ceb 100644 --- a/docs/reference/file-structure.md +++ b/docs/reference/file-structure.md @@ -44,18 +44,17 @@ Creating new WebSocket feature? ### REST API -- **Public**: `public/http-v{N}/.mdx` - - Example: `public/http-v4/market-info.mdx` - -- **Private**: `private/http-{api}-v{N}/.mdx` - - Example: `private/http-trade-v4/create-limit-order.mdx` - - Example: `private/http-main-v4/create-withdraw-request.mdx` +- **api-reference/**: `api-reference//.mdx` + - Example: `api-reference/market-data/market-info.mdx` + - Example: `api-reference/spot-trading/create-limit-order.mdx` + - Example: `api-reference/account-wallet/create-withdraw-request.mdx` ### WebSocket API -- **Public/Private**: `{public|private}/websocket/.mdx` - - Example: `public/websocket/depth.mdx` - - Example: `private/websocket/balance-spot.mdx` +- **Market Streams** (public): `websocket/market-streams/.mdx` + - Example: `websocket/market-streams/depth.mdx` +- **Account Streams** (private): `websocket/account-streams/.mdx` + - Example: `websocket/account-streams/balance-spot.mdx` ## Navigation Configuration @@ -63,22 +62,34 @@ All page references go in `docs.json` at the root: ```json { - "navigation": [ - { - "group": "REST API v4", - "pages": [ - "private/http-trade-v4/create-limit-order", - "private/http-trade-v4/cancel-order" - ] - }, - { - "group": "WebSocket API", - "pages": [ - "public/websocket/depth", - "public/websocket/trades" - ] - } - ] + "navigation": { + "tabs": [ + { + "tab": "API Reference", + "groups": [ + { + "group": "Spot Trading", + "pages": [ + "api-reference/spot-trading/create-limit-order", + "api-reference/spot-trading/cancel-order" + ] + } + ] + }, + { + "tab": "WebSocket", + "groups": [ + { + "group": "Market Streams", + "pages": [ + "websocket/market-streams/depth", + "websocket/market-streams/trades" + ] + } + ] + } + ] + } } ``` diff --git a/docs/reference/style-guide.md b/docs/reference/style-guide.md index 2c890d9..a862a46 100644 --- a/docs/reference/style-guide.md +++ b/docs/reference/style-guide.md @@ -31,7 +31,7 @@ Check `/glossary.mdx` for correct terms: | `` | Rate limits, security warnings, breaking changes, data loss risks | Minor notes, helpful tips | | `` | Caching behavior, response formats, update intervals | Critical warnings | | `` | Performance optimization, recommended patterns | Required information | -| `` | Error codes (>5), multiple examples, long specifications | Short lists (<5 items) | +| `` | Error codes (>5), multiple examples, long specifications | Short lists (<5 items) | ## Content Guidelines diff --git a/faq.mdx b/faq.mdx index f71389c..f7698c1 100644 --- a/faq.mdx +++ b/faq.mdx @@ -15,11 +15,11 @@ Rate limit 429 errors occur when an endpoint exceeds the rate limit. To resolve: - Check the specific rate limit value in the endpoint documentation - Implement rate limiting in code -For more details, see the [API v4 overview](/public/http-v4). +For more details, see the [API v4 overview](/api-reference/market-data/overview). -CORS requests to the ticker endpoint are forbidden for security reasons. Make the request from a backend server instead of client-side code. For endpoint details, see the [Market activity endpoint](/public/http-v4/market-activity). +CORS requests to the ticker endpoint are forbidden for security reasons. Make the request from a backend server instead of client-side code. For endpoint details, see the [Market activity endpoint](/api-reference/market-data/market-activity). @@ -29,7 +29,7 @@ Nonce errors occur when timestamps or request ordering are invalid. To resolve: 2. Recreate API keys 3. Ensure system time is properly synchronized -For details on nonce requirements, see the [Authentication guide](/private/http-auth). +For details on nonce requirements, see the [Authentication guide](/api-reference/authentication). @@ -39,7 +39,7 @@ Smartplan endpoints are restricted to B2B partner services only. To gain access: - Request permissions for Smartplan endpoints - Provide use case details -For endpoint details, see the [Crypto Lending documentation](/private/http-main-v4/get-plans). +For endpoint details, see the [Crypto Lending documentation](/api-reference/account-wallet/get-plans). @@ -52,7 +52,7 @@ Multiple time periods for pairs are available through multiple WebSocket connect 1. Open multiple WebSocket connections 2. Use the equivalent HTTP method instead -For more details, see the [Kline documentation](/public/websocket/kline). +For more details, see the [Kline documentation](/websocket/market-streams/kline). @@ -62,7 +62,7 @@ The system shows only the last 100 deals by default. To access more: - Accumulate and store the data - Process the data as needed -For more details, see the [Trades channel documentation](/public/websocket/trades). +For more details, see the [Trades channel documentation](/websocket/market-streams/trades). @@ -76,14 +76,14 @@ Transfers may take up to 2 seconds to complete. When making transfers and withdr - Avoid initiating withdrawals before transfer completion - Implement proper error handling for transfer states -For endpoint details, see the [Transfer between balances](/private/http-main-v4/transfer-between-balances) documentation. +For endpoint details, see the [Transfer between balances](/api-reference/account-wallet/transfer-between-balances) documentation. Insufficient funds errors occur when the withdrawal amount plus the fee exceeds available balance. Important considerations: - Account for withdrawal fees in calculations -- Check the [fees documentation](/private/http-main-v4/get-fees) +- Check the [fees documentation](/api-reference/account-wallet/get-fees) - Ensure sufficient balance for both amount and fees @@ -112,7 +112,7 @@ Check currency status through the assets endpoint: - The endpoint provides real-time status of all currencies - Check the currency-specific enabled/disabled flags -For endpoint details and response schema, see the [Asset status list](/public/http-v4/asset-status-list) documentation. +For endpoint details and response schema, see the [Asset status list](/api-reference/market-data/asset-status-list) documentation. @@ -122,13 +122,13 @@ For endpoint details and response schema, see the [Asset status list](/public/ht Store API keys securely using environment variables, restrict IP access, and use minimum required permissions. Never commit keys to version control. -For details, see the [Authentication guide](/private/http-auth). +For details, see the [Authentication guide](/api-reference/authentication). Immediately delete the compromised key, review account activity for unauthorized actions, and create new API keys. Contact support if unauthorized activity is detected. -For details, see the [Authentication guide](/private/http-auth). +For details, see the [Authentication guide](/api-reference/authentication). @@ -138,12 +138,12 @@ For details, see the [Authentication guide](/private/http-auth). Use WebSocket for real-time data, batch requests when possible, implement proper rate limiting, and cache frequently accessed data. -For details, see the [WebSocket API](/public/websocket). +For details, see the [WebSocket API](/websocket/market-streams/overview). Implement automatic reconnection with exponential backoff. Maintain local order state and set up monitoring and alerts for connection issues. -For details, see the [WebSocket API](/public/websocket). +For details, see the [WebSocket API](/websocket/market-streams/overview). diff --git a/glossary.mdx b/glossary.mdx index e47ff0b..ce8cb87 100644 --- a/glossary.mdx +++ b/glossary.mdx @@ -388,9 +388,9 @@ A price set in advance to trigger a stop order. A main account manages a sub-account. The main account assigns specific permissions to the sub-account (for example, the main account disables [margin trading](#margin-trading)). -A sub-account can use a custom trading [fee](#fee) or rebate model defined for the sub-account. Use [`Query Market Fee`](/private/http-trade-v4/query-market-fee) and [`Query All Market Fees`](/private/http-trade-v4/query-all-market-fees) to retrieve effective fees when an API key belongs to a sub-account. +A sub-account can use a custom trading [fee](#fee) or rebate model defined for the sub-account. Use [`Query Market Fee`](/api-reference/spot-trading/query-market-fee) and [`Query All Market Fees`](/api-reference/spot-trading/query-all-market-fees) to retrieve effective fees when an API key belongs to a sub-account. -[RPI](#retail-price-improvement-rpi) trading uses account-specific fees or rebates. When a user places RPI orders through a sub-account, the system applies the effective sub-account fees. Use [`Query Market Fee`](/private/http-trade-v4/query-market-fee) and [`Query All Market Fees`](/private/http-trade-v4/query-all-market-fees) to verify fees for RPI executions. +[RPI](#retail-price-improvement-rpi) trading uses account-specific fees or rebates. When a user places RPI orders through a sub-account, the system applies the effective sub-account fees. Use [`Query Market Fee`](/api-reference/spot-trading/query-market-fee) and [`Query All Market Fees`](/api-reference/spot-trading/query-all-market-fees) to verify fees for RPI executions. diff --git a/guides/client-order-id.mdx b/guides/client-order-id.mdx index 43b1b65..73a538d 100644 --- a/guides/client-order-id.mdx +++ b/guides/client-order-id.mdx @@ -1,540 +1,540 @@ ---- -title: "Client Order ID" -description: "This guide provides information about using `clientOrderId` in your trading operations, including best practices and common use cases." ---- - -## Overview - -The `clientOrderId` is an optional identifier that allows you to track and manage your orders with your own custom identifiers. It provides an additional layer of order management and tracking capabilities alongside the exchange-provided `orderId`. - -## Specifications - - -- Type: String -- Mandatory: No -- Uniqueness: Must be unique per account - - -- Latin letters -- Numbers -- Dashes (-) -- Dots (.) -- Underscores (\_) - - - - -- Recommended length: 32 characters -- Case-sensitive: “Order1” and “order1” are different IDs -- Leading/trailing spaces are not allowed -- Cannot be an empty string if provided - -## Best Practices - - -**Structured Naming Convention** - -```javascript -// Format: strategy-pair-type-timestamp -const clientOrderId = "scalp-btcusdt-limit-1678234567"; - -// Format: botId-strategy-sequence -const clientOrderId = "bot123-grid-0001"; - -// Format: userAccount-orderType-customSequence -const clientOrderId = "trade15-market-a7b8c9"; -``` - - - -**Timestamp Integration** - -```bash -const getClientOrderId = (prefix: string) => { - const timestamp = Date.now(); - return `${prefix}-${timestamp}`; -}; - -// Usage -const orderId = getClientOrderId("btc-dca"); // "btc-dca-1678234567890" -``` - - - - -**Strategy Identification** - -```bash -const generateStrategyOrderId = ( - strategy: string, - pair: string, - action: string -) => { - const sequence = Math.floor(Math.random() * 1000) - .toString() - .padStart(3, "0"); - return `${strategy}-${pair}-${action}-${sequence}`; -}; - -// Usage -const orderId = generateStrategyOrderId("grid", "btcusdt", "buy"); -``` - - - - - -- • spot-btcusdt-buy-001 -- • dca-ethusdt-sell-002 -- • grid-solusdt-buy-003 - - -- • bot1-grid-btc-h4-001 -- • arb-eth-ftm-cross-002 -- • Dashes (-) -- • hedge-btc-perp-003 - - - - - - - -## Common Use Cases - - - -**Basic Limit Order** - -```javascript -// Simple limit order with clientOrderId -const limitOrderRequest = { - market: "BTC_USDT", - side: "buy", - amount: "0.01", - price: "40000", - clientOrderId: "limit-btc-buy-001" -}; -``` - - - -**Market Order with Strategy Tag** - -```bash -// Market order for DCA strategy -const marketOrderRequest = { - market: "BTC_USDT", - side: "buy", - amount: "50", // Buy BTC for 50 USDT - clientOrderId: "dca-btc-market-002" -}; -``` - - - - -**Stop-Limit Order with Position Tracking** - -```bash -// Stop-limit order with position tracking -const stopLimitOrderRequest = { - market: "BTC_USDT", - side: "sell", - amount: "0.01", - price: "39000", - activation_price: "39500", - clientOrderId: "pos1-sl-btc-001" -}; -``` - - - -**OTO (One-Triggers-Other) Orders** - -```bash -// Main order with stop loss and take profit -const otoOrderRequest = { - market: "BTC_USDT", - side: "buy", - amount: "0.01", - price: "40000", - clientOrderId: "oto-btc-main-001", - stopLoss: "38000", - takeProfit: "42000" -}; -``` - - - - -## Order Management - - - -You can track orders using `clientOrderId` through the following endpoints: - -**1. Query Active Orders** - -Use the [Query Active Orders endpoint](/private/http-trade-v4/query-unexecuted-orders) (`/api/v4/orders`) to get all unexecuted orders: - -```javascript -// Request -const queryActiveOrders = { - market: "BTC_USDT", - clientOrderId: "dca-btc-market-002" -}; -``` - -Example response includes order details such as ID, status, and execution information: - -```bash -{ - "orderId": 4180284841, - "clientOrderId": "dca-btc-market-002", - "market": "BTC_USDT", - "side": "buy", - "type": "limit", - "timestamp": 1595792396.165973, - "dealMoney": "0", - "dealStock": "0", - "amount": "0.001", - "price": "40000", - "status": "NEW" -} -``` - -**2. Query Order History** - -Use the [Query Order History endpoint](/private/http-trade-v4/query-executed-orders) (`/api/v4/trade-account/order/history`) to get executed orders: - -```javascript -// Request -const queryOrderHistory = { - market: "BTC_USDT", - clientOrderId: "grid-btc-sell-003", - limit: 50, - offset: 0 -}; -``` - -Example response showing execution details and final order status: - -```bash -{ - "records": [ - { - "orderId": 4180284841, - "clientOrderId": "grid-btc-sell-003", - "market": "BTC_USDT", - "side": "sell", - "type": "limit", - "timestamp": 1595792396.165973, - "dealMoney": "41.258268", - "dealStock": "0.001", - "amount": "0.001", - "price": "41258.27", - "status": "FILLED" - } - ] -} -``` - -**3. Cancelling Orders Using ClientOrderId** - -Use the [Cancel Order endpoint](/private/http-trade-v4/cancel-order) (`/api/v4/order/cancel`) to cancel an order by its `clientOrderId`: - -```javascript -// Request -const cancelOrderRequest = { - market: "BTC_USDT", - clientOrderId: "dca-btc-market-002" -}; -``` - -**Important notes about order cancellation:** - -- Cancellation by `clientOrderId` takes priority over `orderId` -- You can use either `orderId` or `clientOrderId`, but not both in the same request - -```json -// Example response -{ - "orderId": 4180284841, - "clientOrderId": "dca-btc-market-002", - "market": "BTC_USDT", - "side": "buy", - "type": "limit", - "timestamp": 1595792396.165973, - "dealMoney": "0", - "dealStock": "0", - "amount": "0.001", - "left": "0.001", - "price": "40000", - "status": "CANCELED" -} -``` - -## Error Handling - -#### Common Error Cases - - - - The clientOrderId must be unique per account. - - - - Ensure the ID only contains allowed characters. - - - - The recommended length is 32 characters, with a maximum permissible length of 64 characters. - - - - Handle cases where an order with the specified clientOrderId doesn’t exist. - - - -#### Example error handling: - -```javascript -try { - const order = await queryOrderByClientId("dca-btc-market-002"); - // Process order -} catch (error) { - if (error.code === 36) { - console.error("Invalid clientOrderId format"); - } else if (error.code === 2) { - console.error("Order not found"); - } else { - console.error("Unexpected error:", error); - } -} -``` - -## Example: Broker Implementation - - - -**ClientOrderId Structure** - -Format: - -` brk-{clientId}-{orderType}-{purpose}-{timestamp} ` - -Example: `brk-ind123-limit-spot-1678234567` - -**Components:** - -- `brk`: Broker identifier prefix -- `clientId`: Your internal client identifier -- `orderType`: Order type (market/limit) -- `purpose`: Trading purpose/strategy -- `timestamp`: Ensures 24-hour uniqueness - - - - `brk-ind123-market-spot-1678234567` - - - - `brk-corp789-limit-hedge-1678234567` - - - - `brk-port555-market-dca-1678234567` - - - -### Trading Purpose Examples - - - -`brk-ind123-market-spot-1678234567` - - - -`brk-port555-market-dca-1678234567` - - - -`brk-ind123-limit-grid-1678234567` - - -`brk-port555-limit-rebal-1678234567` - - -### API Usage Example - -```javascript -// Create an order for a client -const createClientOrder = { - market: "BTC_USDT", - side: "buy", - amount: "0.01", - price: "40000", - clientOrderId: "brk-ind123-limit-spot-1678234567" -}; - -// Query client's active orders -const queryClientOrders = { - market: "BTC_USDT", - clientOrderId: "brk-ind123-limit-spot-1678234567" -}; - -// Cancel client's order using clientOrderId -const cancelClientOrder = { - market: "BTC_USDT", - clientOrderId: "brk-ind123-limit-spot-1678234567" -}; - -// Get historical data for client orders -const getClientOrderHistory = { - market: "BTC_USDT", - clientOrderId: "brk-ind123-limit-spot-1678234567", - limit: 50, - offset: 0 -}; -``` - -**This structured approach allows brokers to:** - -- Track orders for multiple clients -- Identify order types and purposes -- Maintain unique identifiers -- Query and manage orders efficiently - -### Order Management for Brokers - -**Client Order Management** - -#### Cancelling Client Orders - -Brokers can efficiently cancel orders for any of their clients using the structured clientOrderId: - -```javascript -// Function to cancel a client's order -async function cancelClientOrder(clientId, orderPurpose, orderId) { - const cancelRequest = { - market: "BTC_USDT", - clientOrderId: `brk-${clientId}-limit-${orderPurpose}-${orderId}` - }; - - try { - const response = await api.post('/api/v4/order/cancel', cancelRequest); - return response.data; - } catch (error) { - console.error(`Failed to cancel order for client ${clientId}:`, error); - throw error; - } -} - -// Example usage -await cancelClientOrder('ind123', 'spot', '1678234567'); -``` - -#### Retrieving Historical Client Orders - -Brokers can retrieve and analyze historical order data for reporting, analysis, and compliance: - -```javascript -// Function to get client order history with optional filtering -async function getClientOrderHistory(clientId, orderPurpose, startTime, endTime) { - // Base query parameters - const queryParams = { - market: "BTC_USDT", - limit: 100, - offset: 0 - }; - - // Add clientOrderId filter if specific client and purpose - if (clientId && orderPurpose) { - // Using partial match prefix to get all orders matching the pattern - queryParams.clientOrderId = `brk-${clientId}-*-${orderPurpose}-*`; - } - - // Add time range if specified - if (startTime) queryParams.start_time = startTime; - if (endTime) queryParams.end_time = endTime; - - try { - const response = await api.get('/api/v4/trade-account/order/history', { params: queryParams }); - return response.data.records; - } catch (error) { - console.error("Failed to fetch client order history:", error); - throw error; - } -} - -// Example: Get all spot trades for a specific client -const clientSpotOrders = await getClientOrderHistory('ind123', 'spot', - Date.now() - 30 * 24 * 60 * 60 * 1000, // 30 days ago - Date.now() // now -); - -// Example: Get all DCA orders across clients -const allDcaOrders = await getClientOrderHistory(null, 'dca'); -``` - -### Broker Analytics and Reporting - -With structured clientOrderId patterns, brokers can implement powerful analytics and reporting by parsing the IDs: - -```javascript -// Parse clientOrderId to extract metadata -function parseClientOrderId(clientOrderId) { - // Format: brk-{clientId}-{orderType}-{purpose}-{timestamp} - const parts = clientOrderId.split('-'); - if (parts.length !== 5 || parts[0] !== 'brk') { - throw new Error('Invalid broker clientOrderId format'); - } - - return { - clientId: parts[1], - orderType: parts[2], - purpose: parts[3], - timestamp: parseInt(parts[4]) - }; -} - -// Example usage for reporting -function generateClientReport(orderHistory) { - const clientStats = {}; - - orderHistory.forEach(order => { - try { - const { clientId, purpose } = parseClientOrderId(order.clientOrderId); - - if (!clientStats[clientId]) { - clientStats[clientId] = { - totalOrders: 0, - volume: 0, - byPurpose: {} - }; - } - - // Update client stats - clientStats[clientId].totalOrders++; - clientStats[clientId].volume += parseFloat(order.dealMoney); - - // Update purpose-specific stats - if (!clientStats[clientId].byPurpose[purpose]) { - clientStats[clientId].byPurpose[purpose] = { - count: 0, - volume: 0 - }; - } - - clientStats[clientId].byPurpose[purpose].count++; - clientStats[clientId].byPurpose[purpose].volume += parseFloat(order.dealMoney); - - } catch (error) { - console.warn("Skipping order with invalid clientOrderId:", order.clientOrderId); - } - }); - - return clientStats; -} -``` +--- +title: "Client Order ID" +description: "This guide provides information about using `clientOrderId` in your trading operations, including best practices and common use cases." +--- + +## Overview + +The `clientOrderId` is an optional identifier that allows you to track and manage your orders with your own custom identifiers. It provides an additional layer of order management and tracking capabilities alongside the exchange-provided `orderId`. + +## Specifications + + +- Type: String +- Mandatory: No +- Uniqueness: Must be unique per account + + +- Latin letters +- Numbers +- Dashes (-) +- Dots (.) +- Underscores (\_) + + + + +- Recommended length: 32 characters +- Case-sensitive: “Order1” and “order1” are different IDs +- Leading/trailing spaces are not allowed +- Cannot be an empty string if provided + +## Best Practices + + +**Structured Naming Convention** + +```javascript +// Format: strategy-pair-type-timestamp +const clientOrderId = "scalp-btcusdt-limit-1678234567"; + +// Format: botId-strategy-sequence +const clientOrderId = "bot123-grid-0001"; + +// Format: userAccount-orderType-customSequence +const clientOrderId = "trade15-market-a7b8c9"; +``` + + + +**Timestamp Integration** + +```bash +const getClientOrderId = (prefix: string) => { + const timestamp = Date.now(); + return `${prefix}-${timestamp}`; +}; + +// Usage +const orderId = getClientOrderId("btc-dca"); // "btc-dca-1678234567890" +``` + + + + +**Strategy Identification** + +```bash +const generateStrategyOrderId = ( + strategy: string, + pair: string, + action: string +) => { + const sequence = Math.floor(Math.random() * 1000) + .toString() + .padStart(3, "0"); + return `${strategy}-${pair}-${action}-${sequence}`; +}; + +// Usage +const orderId = generateStrategyOrderId("grid", "btcusdt", "buy"); +``` + + + + + +- • spot-btcusdt-buy-001 +- • dca-ethusdt-sell-002 +- • grid-solusdt-buy-003 + + +- • bot1-grid-btc-h4-001 +- • arb-eth-ftm-cross-002 +- • Dashes (-) +- • hedge-btc-perp-003 + + + + + + + +## Common Use Cases + + + +**Basic Limit Order** + +```javascript +// Simple limit order with clientOrderId +const limitOrderRequest = { + market: "BTC_USDT", + side: "buy", + amount: "0.01", + price: "40000", + clientOrderId: "limit-btc-buy-001" +}; +``` + + + +**Market Order with Strategy Tag** + +```bash +// Market order for DCA strategy +const marketOrderRequest = { + market: "BTC_USDT", + side: "buy", + amount: "50", // Buy BTC for 50 USDT + clientOrderId: "dca-btc-market-002" +}; +``` + + + + +**Stop-Limit Order with Position Tracking** + +```bash +// Stop-limit order with position tracking +const stopLimitOrderRequest = { + market: "BTC_USDT", + side: "sell", + amount: "0.01", + price: "39000", + activation_price: "39500", + clientOrderId: "pos1-sl-btc-001" +}; +``` + + + +**OTO (One-Triggers-Other) Orders** + +```bash +// Main order with stop loss and take profit +const otoOrderRequest = { + market: "BTC_USDT", + side: "buy", + amount: "0.01", + price: "40000", + clientOrderId: "oto-btc-main-001", + stopLoss: "38000", + takeProfit: "42000" +}; +``` + + + + +## Order Management + + + +You can track orders using `clientOrderId` through the following endpoints: + +**1. Query Active Orders** + +Use the [Query Active Orders endpoint](/api-reference/spot-trading/query-unexecuted-orders) (`/api/v4/orders`) to get all unexecuted orders: + +```javascript +// Request +const queryActiveOrders = { + market: "BTC_USDT", + clientOrderId: "dca-btc-market-002" +}; +``` + +Example response includes order details such as ID, status, and execution information: + +```bash +{ + "orderId": 4180284841, + "clientOrderId": "dca-btc-market-002", + "market": "BTC_USDT", + "side": "buy", + "type": "limit", + "timestamp": 1595792396.165973, + "dealMoney": "0", + "dealStock": "0", + "amount": "0.001", + "price": "40000", + "status": "NEW" +} +``` + +**2. Query Order History** + +Use the [Query Order History endpoint](/api-reference/spot-trading/query-executed-orders) (`/api/v4/trade-account/order/history`) to get executed orders: + +```javascript +// Request +const queryOrderHistory = { + market: "BTC_USDT", + clientOrderId: "grid-btc-sell-003", + limit: 50, + offset: 0 +}; +``` + +Example response showing execution details and final order status: + +```bash +{ + "records": [ + { + "orderId": 4180284841, + "clientOrderId": "grid-btc-sell-003", + "market": "BTC_USDT", + "side": "sell", + "type": "limit", + "timestamp": 1595792396.165973, + "dealMoney": "41.258268", + "dealStock": "0.001", + "amount": "0.001", + "price": "41258.27", + "status": "FILLED" + } + ] +} +``` + +**3. Cancelling Orders Using ClientOrderId** + +Use the [Cancel Order endpoint](/api-reference/spot-trading/cancel-order) (`/api/v4/order/cancel`) to cancel an order by its `clientOrderId`: + +```javascript +// Request +const cancelOrderRequest = { + market: "BTC_USDT", + clientOrderId: "dca-btc-market-002" +}; +``` + +**Important notes about order cancellation:** + +- Cancellation by `clientOrderId` takes priority over `orderId` +- You can use either `orderId` or `clientOrderId`, but not both in the same request + +```json +// Example response +{ + "orderId": 4180284841, + "clientOrderId": "dca-btc-market-002", + "market": "BTC_USDT", + "side": "buy", + "type": "limit", + "timestamp": 1595792396.165973, + "dealMoney": "0", + "dealStock": "0", + "amount": "0.001", + "left": "0.001", + "price": "40000", + "status": "CANCELED" +} +``` + +## Error Handling + +#### Common Error Cases + + + + The clientOrderId must be unique per account. + + + + Ensure the ID only contains allowed characters. + + + + The recommended length is 32 characters, with a maximum permissible length of 64 characters. + + + + Handle cases where an order with the specified clientOrderId doesn’t exist. + + + +#### Example error handling: + +```javascript +try { + const order = await queryOrderByClientId("dca-btc-market-002"); + // Process order +} catch (error) { + if (error.code === 36) { + console.error("Invalid clientOrderId format"); + } else if (error.code === 2) { + console.error("Order not found"); + } else { + console.error("Unexpected error:", error); + } +} +``` + +## Example: Broker Implementation + + + +**ClientOrderId Structure** + +Format: + +` brk-{clientId}-{orderType}-{purpose}-{timestamp} ` + +Example: `brk-ind123-limit-spot-1678234567` + +**Components:** + +- `brk`: Broker identifier prefix +- `clientId`: Your internal client identifier +- `orderType`: Order type (market/limit) +- `purpose`: Trading purpose/strategy +- `timestamp`: Ensures 24-hour uniqueness + + + + `brk-ind123-market-spot-1678234567` + + + + `brk-corp789-limit-hedge-1678234567` + + + + `brk-port555-market-dca-1678234567` + + + +### Trading Purpose Examples + + + +`brk-ind123-market-spot-1678234567` + + + +`brk-port555-market-dca-1678234567` + + + +`brk-ind123-limit-grid-1678234567` + + +`brk-port555-limit-rebal-1678234567` + + +### API Usage Example + +```javascript +// Create an order for a client +const createClientOrder = { + market: "BTC_USDT", + side: "buy", + amount: "0.01", + price: "40000", + clientOrderId: "brk-ind123-limit-spot-1678234567" +}; + +// Query client's active orders +const queryClientOrders = { + market: "BTC_USDT", + clientOrderId: "brk-ind123-limit-spot-1678234567" +}; + +// Cancel client's order using clientOrderId +const cancelClientOrder = { + market: "BTC_USDT", + clientOrderId: "brk-ind123-limit-spot-1678234567" +}; + +// Get historical data for client orders +const getClientOrderHistory = { + market: "BTC_USDT", + clientOrderId: "brk-ind123-limit-spot-1678234567", + limit: 50, + offset: 0 +}; +``` + +**This structured approach allows brokers to:** + +- Track orders for multiple clients +- Identify order types and purposes +- Maintain unique identifiers +- Query and manage orders efficiently + +### Order Management for Brokers + +**Client Order Management** + +#### Cancelling Client Orders + +Brokers can efficiently cancel orders for any of their clients using the structured clientOrderId: + +```javascript +// Function to cancel a client's order +async function cancelClientOrder(clientId, orderPurpose, orderId) { + const cancelRequest = { + market: "BTC_USDT", + clientOrderId: `brk-${clientId}-limit-${orderPurpose}-${orderId}` + }; + + try { + const response = await api.post('/api/v4/order/cancel', cancelRequest); + return response.data; + } catch (error) { + console.error(`Failed to cancel order for client ${clientId}:`, error); + throw error; + } +} + +// Example usage +await cancelClientOrder('ind123', 'spot', '1678234567'); +``` + +#### Retrieving Historical Client Orders + +Brokers can retrieve and analyze historical order data for reporting, analysis, and compliance: + +```javascript +// Function to get client order history with optional filtering +async function getClientOrderHistory(clientId, orderPurpose, startTime, endTime) { + // Base query parameters + const queryParams = { + market: "BTC_USDT", + limit: 100, + offset: 0 + }; + + // Add clientOrderId filter if specific client and purpose + if (clientId && orderPurpose) { + // Using partial match prefix to get all orders matching the pattern + queryParams.clientOrderId = `brk-${clientId}-*-${orderPurpose}-*`; + } + + // Add time range if specified + if (startTime) queryParams.start_time = startTime; + if (endTime) queryParams.end_time = endTime; + + try { + const response = await api.get('/api/v4/trade-account/order/history', { params: queryParams }); + return response.data.records; + } catch (error) { + console.error("Failed to fetch client order history:", error); + throw error; + } +} + +// Example: Get all spot trades for a specific client +const clientSpotOrders = await getClientOrderHistory('ind123', 'spot', + Date.now() - 30 * 24 * 60 * 60 * 1000, // 30 days ago + Date.now() // now +); + +// Example: Get all DCA orders across clients +const allDcaOrders = await getClientOrderHistory(null, 'dca'); +``` + +### Broker Analytics and Reporting + +With structured clientOrderId patterns, brokers can implement powerful analytics and reporting by parsing the IDs: + +```javascript +// Parse clientOrderId to extract metadata +function parseClientOrderId(clientOrderId) { + // Format: brk-{clientId}-{orderType}-{purpose}-{timestamp} + const parts = clientOrderId.split('-'); + if (parts.length !== 5 || parts[0] !== 'brk') { + throw new Error('Invalid broker clientOrderId format'); + } + + return { + clientId: parts[1], + orderType: parts[2], + purpose: parts[3], + timestamp: parseInt(parts[4]) + }; +} + +// Example usage for reporting +function generateClientReport(orderHistory) { + const clientStats = {}; + + orderHistory.forEach(order => { + try { + const { clientId, purpose } = parseClientOrderId(order.clientOrderId); + + if (!clientStats[clientId]) { + clientStats[clientId] = { + totalOrders: 0, + volume: 0, + byPurpose: {} + }; + } + + // Update client stats + clientStats[clientId].totalOrders++; + clientStats[clientId].volume += parseFloat(order.dealMoney); + + // Update purpose-specific stats + if (!clientStats[clientId].byPurpose[purpose]) { + clientStats[clientId].byPurpose[purpose] = { + count: 0, + volume: 0 + }; + } + + clientStats[clientId].byPurpose[purpose].count++; + clientStats[clientId].byPurpose[purpose].volume += parseFloat(order.dealMoney); + + } catch (error) { + console.warn("Skipping order with invalid clientOrderId:", order.clientOrderId); + } + }); + + return clientStats; +} +``` diff --git a/guides/fireblocks.mdx b/guides/fireblocks.mdx index 7a9c6d4..a2577ab 100644 --- a/guides/fireblocks.mdx +++ b/guides/fireblocks.mdx @@ -199,7 +199,7 @@ For more information about Fireblocks integration, refer to the Fireblocks docum Contact WhiteBIT support for assistance - + Explore WhiteBIT API documentation diff --git a/platform/oauth/overview.mdx b/platform/oauth/overview.mdx index 37db90c..feb3a72 100644 --- a/platform/oauth/overview.mdx +++ b/platform/oauth/overview.mdx @@ -55,7 +55,7 @@ WhiteBIT OAuth 2.0 implementation supports a wide range of permission scopes tha - Trading history - And more specialized permissions -For a complete list of available scopes and detailed implementation instructions, please visit the [Usage](/platform/oauth/usage/#available-scopes) page. +For a complete list of available scopes and detailed implementation instructions, please visit the [Usage](/platform/oauth/usage/overview#scopes) page. ## Getting Started @@ -70,7 +70,7 @@ Once your integration request is approved, you'll receive detailed instructions ## Next Steps: Implementation Details -Now that you understand the benefits and use cases of WhiteBIT's OAuth 2.0 implementation, you're ready to dive into the technical details. Our [Usage](/platform/oauth/usage) page provides comprehensive documentation on: +Now that you understand the benefits and use cases of WhiteBIT's OAuth 2.0 implementation, you're ready to dive into the technical details. Our [Usage](/platform/oauth/usage/overview) page provides comprehensive documentation on: - Endpoint specifications for authorization and token exchange - Request and response formats with example code diff --git a/platform/overview.mdx b/platform/overview.mdx index 698159d..1281f39 100644 --- a/platform/overview.mdx +++ b/platform/overview.mdx @@ -17,7 +17,7 @@ The REST API provides access to market data, trading, account management, and mo - **Market Data**: Public endpoints for market info, orderbook, trades, and statistics — use `GET` with [query string](https://en.wikipedia.org/wiki/Query_string) parameters - **Trading & Account**: Private endpoints for spot trading, collateral trading, account management, and sub-accounts — use `POST` with appropriate Body data and Headers -- **Authentication**: Required for all private endpoints — [Authentication Guide](/private/http-auth) +- **Authentication**: Required for all private endpoints — [Authentication Guide](/api-reference/authentication) - **IP Restrictions**: Up to 5 trusted IPs can be configured for security - **Helper Library**: [API Quick Start Helper](https://github.com/whitebit-exchange/api-quickstart) with examples in multiple languages @@ -25,8 +25,8 @@ The REST API provides access to market data, trading, account management, and mo WebSocket connections provide real-time data streaming and interaction. See the [WebSocket Overview](/websocket/overview) for connection details. -- [Market Streams](/public/websocket) — Market data, klines, order book, trades, and statistics -- [Account Streams](/private/websocket) — Account data, balances, orders, and deals +- [Market Streams](/websocket/market-streams/overview) — Market data, klines, order book, trades, and statistics +- [Account Streams](/websocket/account-streams/overview) — Account data, balances, orders, and deals ## Other Integration Options diff --git a/platform/self-trade-prevention.mdx b/platform/self-trade-prevention.mdx index 55ce57f..64de2a7 100644 --- a/platform/self-trade-prevention.mdx +++ b/platform/self-trade-prevention.mdx @@ -45,15 +45,15 @@ You can specify the STP mode when placing any type of order: STP is supported on the following API endpoints: -- [POST `/api/v4/order/new`](../private/http-trade-v4#create-limit-order) (Limit orders) -- [POST `/api/v4/order/market`](../private/http-trade-v4#create-market-order) (Market orders) -- [POST `/api/v4/order/stock_market`](../private/http-trade-v4#create-buy-stock-market-order) (Stock market orders) -- [POST `/api/v4/order/stop_limit`](../private/http-trade-v4#create-stop-limit-order) (Stop-limit orders) -- [POST `/api/v4/order/stop_market`](../private/http-trade-v4#create-stop-market-order) (Stop-market orders) -- [POST `/api/v4/order/collateral/market`](../private/http-trade-v4#collateral-market-order) (Collateral market orders) -- [POST `/api/v4/order/collateral/stop-limit`](../private/http-trade-v4#collateral-stop-limit-order) (Collateral stop-limit orders) -- [POST `/api/v4/order/collateral/trigger-market`](../private/http-trade-v4#collateral-trigger-market-order) (Collateral trigger market orders) -- [POST `/api/v4/order/collateral/oco`](../private/http-trade-v4#create-collateral-oco-order) (Collateral OCO orders) +- [POST `/api/v4/order/new`](/api-reference/spot-trading/overview#create-limit-order) (Limit orders) +- [POST `/api/v4/order/market`](/api-reference/spot-trading/overview#create-market-order) (Market orders) +- [POST `/api/v4/order/stock_market`](/api-reference/spot-trading/overview#create-buy-stock-market-order) (Stock market orders) +- [POST `/api/v4/order/stop_limit`](/api-reference/spot-trading/overview#create-stop-limit-order) (Stop-limit orders) +- [POST `/api/v4/order/stop_market`](/api-reference/spot-trading/overview#create-stop-market-order) (Stop-market orders) +- [POST `/api/v4/order/collateral/market`](/api-reference/collateral-trading/overview#collateral-market-order) (Collateral market orders) +- [POST `/api/v4/order/collateral/stop-limit`](/api-reference/collateral-trading/overview#collateral-stop-limit-order) (Collateral stop-limit orders) +- [POST `/api/v4/order/collateral/trigger-market`](/api-reference/collateral-trading/overview#collateral-trigger-market-order) (Collateral trigger market orders) +- [POST `/api/v4/order/collateral/oco`](/api-reference/collateral-trading/overview#create-collateral-oco-order) (Collateral OCO orders) ## Best Practices diff --git a/private/http-trade-v1/overview.mdx b/private/http-trade-v1/overview.mdx index f5bf58c..dd348e0 100644 --- a/private/http-trade-v1/overview.mdx +++ b/private/http-trade-v1/overview.mdx @@ -1,79 +1,79 @@ ---- -title: "Private HTTP API V1" -sidebarTitle: "Overview" -description: "Private HTTP API V1 endpoints for trading (DEPRECATED - Use V4 alternatives instead)" -deprecated: true ---- - - -**These endpoints are deprecated.** Use [V4 alternatives](/private/http-trade-v4/overview) instead - - -## Introduction - -Base URL is https://whitebit.com - -Endpoint example: https://whitebit.com/api/v1/{endpoint} - -All endpoints return time in Unix-time format. - -All endpoints return either a **JSON** object or array. - -For receiving responses from API calls please use http method **POST** - -## Error messages V1 format - -```json -{ - "code": 0, - "message": "MESSAGE", - "errors": { - "PARAM1": ["MESSAGE"], - "PARAM2": ["MESSAGE"] - } -} -``` - -## Trading Endpoints - -### Account & Balance - - - - Get trading balance for a specific currency - - - Get all trading balances - - - -### Order Management - - - - Create a limit trading order - - - Cancel a specific order - - - -### Order Queries - - - - Get active/unexecuted orders - - - Get order history - - - Get executed order history for a single market - - - Get executed order history for all markets - - - Get executed order deals - - +--- +title: "Private HTTP API V1" +sidebarTitle: "Overview" +description: "Private HTTP API V1 endpoints for trading (DEPRECATED - Use V4 alternatives instead)" +deprecated: true +--- + + +**These endpoints are deprecated.** Use [V4 alternatives](/api-reference/spot-trading/overview) instead + + +## Introduction + +Base URL is https://whitebit.com + +Endpoint example: https://whitebit.com/api/v1/{endpoint} + +All endpoints return time in Unix-time format. + +All endpoints return either a **JSON** object or array. + +For receiving responses from API calls please use http method **POST** + +## Error messages V1 format + +```json +{ + "code": 0, + "message": "MESSAGE", + "errors": { + "PARAM1": ["MESSAGE"], + "PARAM2": ["MESSAGE"] + } +} +``` + +## Trading Endpoints + +### Account & Balance + + + + Get trading balance for a specific currency + + + Get all trading balances + + + +### Order Management + + + + Create a limit trading order + + + Cancel a specific order + + + +### Order Queries + + + + Get active/unexecuted orders + + + Get order history + + + Get executed order history for a single market + + + Get executed order history for all markets + + + Get executed order deals + + diff --git a/private/websocket/balance-margin.mdx b/private/websocket/balance-margin.mdx deleted file mode 100644 index df8256b..0000000 --- a/private/websocket/balance-margin.mdx +++ /dev/null @@ -1,8 +0,0 @@ ---- -asyncapi: "/asyncapi/private/balance_margin.yaml /ws" -title: Balance Margin ---- - - -This is a private channel. You must [authorize](/private/websocket/authorize) your WebSocket connection before subscribing. - diff --git a/private/websocket/borrows-events.mdx b/private/websocket/borrows-events.mdx deleted file mode 100644 index 8b1c68e..0000000 --- a/private/websocket/borrows-events.mdx +++ /dev/null @@ -1,8 +0,0 @@ ---- -asyncapi: "/asyncapi/private/borrows_events.yaml /ws" -title: Borrows Events ---- - - -This is a private channel. You must [authorize](/private/websocket/authorize) your WebSocket connection before subscribing. - diff --git a/private/websocket/borrows.mdx b/private/websocket/borrows.mdx deleted file mode 100644 index 65ef26c..0000000 --- a/private/websocket/borrows.mdx +++ /dev/null @@ -1,8 +0,0 @@ ---- -asyncapi: "/asyncapi/private/borrows.yaml /ws" -title: Borrows ---- - - -This is a private channel. You must [authorize](/private/websocket/authorize) your WebSocket connection before subscribing. - diff --git a/private/websocket/deals.mdx b/private/websocket/deals.mdx deleted file mode 100644 index f73f4e1..0000000 --- a/private/websocket/deals.mdx +++ /dev/null @@ -1,8 +0,0 @@ ---- -asyncapi: "/asyncapi/private/deals.yaml /ws" -title: Deals ---- - - -This is a private channel. You must [authorize](/private/websocket/authorize) your WebSocket connection before subscribing. - diff --git a/private/websocket/index.mdx b/private/websocket/index.mdx deleted file mode 100644 index d49b390..0000000 --- a/private/websocket/index.mdx +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: Account Streams -sidebarTitle: Overview ---- - -Browse the available private WebSocket channels below. For connection details, message format, and rate limits, see the [WebSocket Overview](/websocket/overview). - - - - Authenticate your WebSocket connection to access private channels - - - Real-time spot balance updates for your account - - - Real-time margin balance updates for your account - - - Stream of pending (open) orders and their updates - - - Stream of executed orders and their updates - - - Real-time deal execution notifications - - - Real-time position updates for margin trading - - - Event notifications for margin position changes - - - Real-time borrow status updates for margin trading - - - Event notifications for borrow changes and liquidations - - diff --git a/private/websocket/margin-positions-events.mdx b/private/websocket/margin-positions-events.mdx deleted file mode 100644 index 1930deb..0000000 --- a/private/websocket/margin-positions-events.mdx +++ /dev/null @@ -1,8 +0,0 @@ ---- -asyncapi: "/asyncapi/private/margin_positions_events.yaml /ws" -title: Margin Positions Events ---- - - -This is a private channel. You must [authorize](/private/websocket/authorize) your WebSocket connection before subscribing. - diff --git a/private/websocket/authorize.mdx b/websocket/account-streams/authorize.mdx similarity index 100% rename from private/websocket/authorize.mdx rename to websocket/account-streams/authorize.mdx diff --git a/websocket/account-streams/balance-margin.mdx b/websocket/account-streams/balance-margin.mdx new file mode 100644 index 0000000..d17d3d1 --- /dev/null +++ b/websocket/account-streams/balance-margin.mdx @@ -0,0 +1,8 @@ +--- +asyncapi: "/asyncapi/private/balance_margin.yaml /ws" +title: Balance Margin +--- + + +This is a private channel. You must [authorize](/websocket/account-streams/authorize) your WebSocket connection before subscribing. + diff --git a/private/websocket/balance-spot.mdx b/websocket/account-streams/balance-spot.mdx similarity index 63% rename from private/websocket/balance-spot.mdx rename to websocket/account-streams/balance-spot.mdx index f027ecc..b002908 100644 --- a/private/websocket/balance-spot.mdx +++ b/websocket/account-streams/balance-spot.mdx @@ -4,7 +4,7 @@ title: Balance Spot --- -This is a private channel. You must [authorize](/private/websocket/authorize) your WebSocket connection before subscribing. +This is a private channel. You must [authorize](/websocket/account-streams/authorize) your WebSocket connection before subscribing. Get and subscribe to [spot balance](/glossary#balance-spotbalance-trade) updates. diff --git a/websocket/account-streams/borrows-events.mdx b/websocket/account-streams/borrows-events.mdx new file mode 100644 index 0000000..cac0c6d --- /dev/null +++ b/websocket/account-streams/borrows-events.mdx @@ -0,0 +1,8 @@ +--- +asyncapi: "/asyncapi/private/borrows_events.yaml /ws" +title: Borrows Events +--- + + +This is a private channel. You must [authorize](/websocket/account-streams/authorize) your WebSocket connection before subscribing. + diff --git a/websocket/account-streams/borrows.mdx b/websocket/account-streams/borrows.mdx new file mode 100644 index 0000000..716950e --- /dev/null +++ b/websocket/account-streams/borrows.mdx @@ -0,0 +1,8 @@ +--- +asyncapi: "/asyncapi/private/borrows.yaml /ws" +title: Borrows +--- + + +This is a private channel. You must [authorize](/websocket/account-streams/authorize) your WebSocket connection before subscribing. + diff --git a/websocket/account-streams/deals.mdx b/websocket/account-streams/deals.mdx new file mode 100644 index 0000000..86820cb --- /dev/null +++ b/websocket/account-streams/deals.mdx @@ -0,0 +1,8 @@ +--- +asyncapi: "/asyncapi/private/deals.yaml /ws" +title: Deals +--- + + +This is a private channel. You must [authorize](/websocket/account-streams/authorize) your WebSocket connection before subscribing. + diff --git a/websocket/account-streams/margin-positions-events.mdx b/websocket/account-streams/margin-positions-events.mdx new file mode 100644 index 0000000..cf9e12e --- /dev/null +++ b/websocket/account-streams/margin-positions-events.mdx @@ -0,0 +1,8 @@ +--- +asyncapi: "/asyncapi/private/margin_positions_events.yaml /ws" +title: Margin Positions Events +--- + + +This is a private channel. You must [authorize](/websocket/account-streams/authorize) your WebSocket connection before subscribing. + diff --git a/private/websocket/orders-executed.mdx b/websocket/account-streams/orders-executed.mdx similarity index 63% rename from private/websocket/orders-executed.mdx rename to websocket/account-streams/orders-executed.mdx index 43d3882..4f2e092 100644 --- a/private/websocket/orders-executed.mdx +++ b/websocket/account-streams/orders-executed.mdx @@ -4,7 +4,7 @@ title: Orders Executed --- -This is a private channel. You must [authorize](/private/websocket/authorize) your WebSocket connection before subscribing. +This is a private channel. You must [authorize](/websocket/account-streams/authorize) your WebSocket connection before subscribing. diff --git a/private/websocket/orders-pending.mdx b/websocket/account-streams/orders-pending.mdx similarity index 63% rename from private/websocket/orders-pending.mdx rename to websocket/account-streams/orders-pending.mdx index 674a2c8..ccb8104 100644 --- a/private/websocket/orders-pending.mdx +++ b/websocket/account-streams/orders-pending.mdx @@ -4,7 +4,7 @@ title: Orders Pending --- -This is a private channel. You must [authorize](/private/websocket/authorize) your WebSocket connection before subscribing. +This is a private channel. You must [authorize](/websocket/account-streams/authorize) your WebSocket connection before subscribing. diff --git a/websocket/account-streams/overview.mdx b/websocket/account-streams/overview.mdx new file mode 100644 index 0000000..a1aa609 --- /dev/null +++ b/websocket/account-streams/overview.mdx @@ -0,0 +1,39 @@ +--- +title: Account Streams +sidebarTitle: Overview +--- + +Browse the available private WebSocket channels below. For connection details, message format, and rate limits, see the [WebSocket Overview](/websocket/overview). + + + + Authenticate your WebSocket connection to access private channels + + + Real-time spot balance updates for your account + + + Real-time margin balance updates for your account + + + Stream of pending (open) orders and their updates + + + Stream of executed orders and their updates + + + Real-time deal execution notifications + + + Real-time position updates for margin trading + + + Event notifications for margin position changes + + + Real-time borrow status updates for margin trading + + + Event notifications for borrow changes and liquidations + + diff --git a/private/websocket/positions.mdx b/websocket/account-streams/positions.mdx similarity index 67% rename from private/websocket/positions.mdx rename to websocket/account-streams/positions.mdx index 5e5fbd3..6e944a7 100644 --- a/private/websocket/positions.mdx +++ b/websocket/account-streams/positions.mdx @@ -4,7 +4,7 @@ title: Positions --- -This is a private channel. You must [authorize](/private/websocket/authorize) your WebSocket connection before subscribing. +This is a private channel. You must [authorize](/websocket/account-streams/authorize) your WebSocket connection before subscribing. Subscribe to positions updates. diff --git a/public/websocket/book-ticker.mdx b/websocket/market-streams/book-ticker.mdx similarity index 96% rename from public/websocket/book-ticker.mdx rename to websocket/market-streams/book-ticker.mdx index 7940f98..13cae05 100644 --- a/public/websocket/book-ticker.mdx +++ b/websocket/market-streams/book-ticker.mdx @@ -1,25 +1,25 @@ ---- -asyncapi: "/asyncapi/public/book_ticker.yaml /ws" -title: Book Ticker ---- -## Overview - -The Book Ticker endpoint provides real-time best bid and best ask updates for a market. - -The stream sends updates whenever the best bid or best ask price changes. - - - Public `bookTicker_update` events exclude Retail Price Improvement (RPI) orders. - - The stream includes only regular order book liquidity. Private active order endpoints and private WebSocket streams return RPI orders. The exchange UI order book (web and mobile) displays RPI orders. - - -## Update Behavior - -The server sends a `bookTicker_update` message whenever the best bid or best ask changes. - -Each update contains: -- Current best bid price and amount. -- Current best ask price and amount. - - +--- +asyncapi: "/asyncapi/public/book_ticker.yaml /ws" +title: Book Ticker +--- +## Overview + +The Book Ticker endpoint provides real-time best bid and best ask updates for a market. + +The stream sends updates whenever the best bid or best ask price changes. + + + Public `bookTicker_update` events exclude Retail Price Improvement (RPI) orders. + + The stream includes only regular order book liquidity. Private active order endpoints and private WebSocket streams return RPI orders. The exchange UI order book (web and mobile) displays RPI orders. + + +## Update Behavior + +The server sends a `bookTicker_update` message whenever the best bid or best ask changes. + +Each update contains: +- Current best bid price and amount. +- Current best ask price and amount. + + diff --git a/public/websocket/depth.mdx b/websocket/market-streams/depth.mdx similarity index 97% rename from public/websocket/depth.mdx rename to websocket/market-streams/depth.mdx index f62541e..1a091d9 100644 --- a/public/websocket/depth.mdx +++ b/websocket/market-streams/depth.mdx @@ -1,371 +1,371 @@ ---- -asyncapi: "/asyncapi/public/depth.yaml /ws" -title: Order Book Depth ---- - -## Overview - -The Market Depth endpoint provides real-time order book data with support for both one-time queries and subscription-based updates. - -### Update Behavior - - -After successful subscription, the server sends a **full snapshot** of the order book as the first `depth_update` message. All subsequent messages are **incremental updates** containing only the changes since the last update. - - - -Public `depth` updates exclude Retail Price Improvement (RPI) orders. The `depth_update` stream includes only regular order book liquidity. - -Private active order endpoints and private WebSocket streams return RPI orders. The exchange UI order book (web and mobile) displays RPI orders. - - -### Understanding Updates - -- **First message** (`past_update_id` is absent): Full order book snapshot with all price levels -- **Subsequent messages** (`past_update_id` is present): Only changed price levels -- **Removed levels**: Shown as `[price, "0"]` - when amount is "0", remove that price level from your local order book - - -If 10 seconds elapse without any order book changes, the server will push a full snapshot again as a keepalive mechanism. - - -## Maintaining a Local Order Book - -To maintain an accurate local order book, follow this algorithm: - -1. Subscribe to depth updates -2. Receive the first message (full snapshot) - initialize your order book -3. For each incremental update: - - If amount is "0" → remove that price level - - If amount is not "0" → update existing level or insert new level at the correct sorted position -4. Keep order book sorted: asks ascending, bids descending -5. Truncate to your desired limit after each update - -## Code Examples - - - -```typescript TypeScript -type IDepth = [string, string]; - -interface OrderBook { - asks: IDepth[]; - bids: IDepth[]; -} - -const ws = new WebSocket("wss://api.whitebit.com/ws"); -const orderBook: OrderBook = { asks: [], bids: [] }; -const LIMIT = 100; - -ws.addEventListener("open", () => { - ws.send( - JSON.stringify({ - id: 1, - method: "depth_subscribe", - params: ["ETH_BTC", LIMIT, "0", true] - }), - ); -}); - -ws.addEventListener("message", (event: MessageEvent) => { - const message = JSON.parse(event.data.toString()); - - if (message.method === "depth_update") { - const updateData = message.params[0] as Partial; - const isFirstMessage = !updateData.past_update_id; - - if (isFirstMessage) { - // First message or keepalive snapshot is a full snapshot - replace order book - orderBook.asks = updateData.asks ?? []; - orderBook.bids = updateData.bids ?? []; - } else { - // Subsequent messages are incremental updates - applyUpdates(orderBook.asks, updateData.asks, "ask"); - applyUpdates(orderBook.bids, updateData.bids, "bid"); - truncateOrderBook(orderBook.asks); - truncateOrderBook(orderBook.bids); - } - } -}); - -function applyUpdates(orderBookSide: IDepth[], updates: IDepth[] | undefined, side: "ask" | "bid") { - if (updates === undefined) return; - for (const [price, amount] of updates) { - // Find the index of an entry in orderBookSide that matches the given price. - const priceIndex = orderBookSide.findIndex((level) => level[0] === price); - - // If the amount is '0', it means this price level should be removed from the orderBookSide. - if (amount === "0") { - if (priceIndex !== -1) { - // Remove the existing price level since the amount is '0'. - orderBookSide.splice(priceIndex, 1); - } - } else { - // If the amount is not '0', either update the existing price level or add a new one. - if (priceIndex === -1) { - // Find the position where the new price level should be inserted. - const insertIndex = orderBookSide.findIndex((level) => - side === "ask" ? level[0] > price : level[0] < price - ); - - if (insertIndex === -1) { - // Add to the end if there's no higher price level. - orderBookSide.push([price, amount]); - } else { - // Insert at the correct sorted position. - orderBookSide.splice(insertIndex, 0, [price, amount]); - } - } else { - // Update the amount for the existing price level. - orderBookSide[priceIndex][1] = amount; - } - } - } -} - -function truncateOrderBook(orderBookSide: IDepth[]) { - if (orderBookSide.length > LIMIT) { - // Only truncate if the length exceeds the LIMIT - orderBookSide.splice(LIMIT); - } -} -``` - -```python Python -import asyncio -import json -import websockets - -class OrderBook: - def __init__(self): - self.asks = [] - self.bids = [] - -LIMIT = 100 - -async def depth_subscribe(): - async with websockets.connect('wss://api.whitebit.com/ws') as ws: - await ws.send(json.dumps({ - 'id': 1, - 'method': 'depth_subscribe', - 'params': ['ETH_BTC', LIMIT, '0', True] - })) - - async for message in ws: - data = json.loads(message) - if data.get('method') == 'depth_update': - handle_depth_update(data['params']) - -def handle_depth_update(params): - update_data = params[0] - is_first_message = update_data.get('past_update_id') is None - - if is_first_message: - # First message or keepalive snapshot is a full snapshot - replace order book - order_book.asks = update_data.get('asks', []) - order_book.bids = update_data.get('bids', []) - else: - # Subsequent messages are incremental updates - apply_updates(order_book.asks, update_data.get('asks', []), "ask") - apply_updates(order_book.bids, update_data.get('bids', []), "bid") - truncate_order_book(order_book.asks) - truncate_order_book(order_book.bids) - -def apply_updates(order_book_side, updates, side): - for price, amount in updates: - price = str(price) - amount = str(amount) - - # Find existing entry - price_index = next((i for i, level in enumerate(order_book_side) if level[0] == price), -1) - - if amount == '0': - if price_index != -1: - # Remove the existing price level since the amount is '0'. - order_book_side.pop(price_index) - else: - if price_index == -1: - # Find the position where the new price level should be inserted. - insert_index = next((i for i, level in enumerate(order_book_side) - if (side == "ask" and level[0] > price) or - (side == "bid" and level[0] < price)), -1) - if insert_index == -1: - # Add to the end if there's no higher price level. - order_book_side.append([price, amount]) - else: - # Insert at the correct sorted position. - order_book_side.insert(insert_index, [price, amount]) - else: - # Update the amount for the existing price level. - order_book_side[price_index][1] = amount - -def truncate_order_book(order_book_side): - if len(order_book_side) > LIMIT: - del order_book_side[LIMIT:] - -order_book = OrderBook() - -asyncio.get_event_loop().run_until_complete(depth_subscribe()) -``` - -```java Java -import java.io.ByteArrayInputStream; -import java.net.URI; -import java.net.URISyntaxException; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.List; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import javax.json.*; -import javax.websocket.*; - -@ClientEndpoint -public class OrderBookClient { - private static final int LIMIT = 100; - private static List asks = new ArrayList<>(); - private static List bids = new ArrayList<>(); - private static CountDownLatch latch; - - public static void main(String[] args) throws URISyntaxException, InterruptedException { - latch = new CountDownLatch(1); - WebSocketContainer container = ContainerProvider.getWebSocketContainer(); - URI uri = new URI("wss://api.whitebit.com/ws"); - container.connectToServer(OrderBookClient.class, uri); - latch.await(1, TimeUnit.MINUTES); - } - - @OnOpen - public void onOpen(Session session) throws Exception { - JsonObject message = Json.createObjectBuilder() - .add("id", 1) - .add("method", "depth_subscribe") - .add("params", Json.createArrayBuilder() - .add("ETH_BTC") - .add(LIMIT) - .add("0") - .add(true) - ) - .build(); - session.getBasicRemote().sendText(message.toString()); - } - - @OnMessage - public void onMessage(String message, Session session) { - JsonReader reader = Json.createReader(new ByteArrayInputStream(message.getBytes(StandardCharsets.UTF_8))); - JsonObject jsonMessage = reader.readObject(); - - if ("depth_update".equals(jsonMessage.getString("method"))) { - JsonArray params = jsonMessage.getJsonArray("params"); - JsonObject updateData = params.getJsonObject(0); - boolean isFirstMessage = !updateData.containsKey("past_update_id") || - updateData.isNull("past_update_id"); - - if (isFirstMessage) { - // First message or keepalive snapshot is a full snapshot - replace order book - asks = parseOrderBookSide(updateData.getJsonArray("asks")); - bids = parseOrderBookSide(updateData.getJsonArray("bids")); - } else { - // Subsequent messages are incremental updates - applyUpdates(asks, updateData.getJsonArray("asks"), "ask"); - applyUpdates(bids, updateData.getJsonArray("bids"), "bid"); - truncateOrderBook(asks); - truncateOrderBook(bids); - } - } - } - - @OnClose - public void onClose(Session session, CloseReason reason) { - System.out.println("Connection closed: " + reason); - latch.countDown(); - } - - @OnError - public void onError(Session session, Throwable throwable) { - throwable.printStackTrace(); - latch.countDown(); - } - - private static List parseOrderBookSide(JsonArray jsonArray) { - List orderBookSide = new ArrayList<>(); - for (JsonValue value : jsonArray) { - JsonArray level = value.asJsonArray(); - String price = level.getString(0); - String amount = level.getString(1); - orderBookSide.add(new IDepth(price, amount)); - } - return orderBookSide; - } - - private static void applyUpdates(List orderBookSide, JsonArray updates, String side) { - for (JsonValue value : updates) { - JsonArray level = value.asJsonArray(); - String price = level.getString(0); - String amount = level.getString(1); - - int priceIndex = -1; - for (int i = 0; i < orderBookSide.size(); i++) { - if (orderBookSide.get(i).getPrice().equals(price)) { - priceIndex = i; - break; - } - } - - if ("0".equals(amount)) { - if (priceIndex != -1) { - orderBookSide.remove(priceIndex); - } - } else { - if (priceIndex == -1) { - int insertIndex = -1; - for (int i = 0; i < orderBookSide.size(); i++) { - if ((side.equals("ask") && orderBookSide.get(i).getPrice().compareTo(price) > 0) || - (side.equals("bid") && orderBookSide.get(i).getPrice().compareTo(price) < 0)) { - insertIndex = i; - break; - } - } - - if (insertIndex == -1) { - orderBookSide.add(new IDepth(price, amount)); - } else { - orderBookSide.add(insertIndex, new IDepth(price, amount)); - } - } else { - orderBookSide.get(priceIndex).setAmount(amount); - } - } - } - } - - private static void truncateOrderBook(List orderBookSide) { - if (orderBookSide.size() > LIMIT) { - orderBookSide.subList(LIMIT, orderBookSide.size()).clear(); - } - } - - static class IDepth { - private final String price; - private String amount; - - public IDepth(String price, String amount) { - this.price = price; - this.amount = amount; - } - - public String getPrice() { - return price; - } - - public String getAmount() { - return amount; - } - - public void setAmount(String amount) { - this.amount = amount; - } - } -} -``` +--- +asyncapi: "/asyncapi/public/depth.yaml /ws" +title: Order Book Depth +--- + +## Overview + +The Market Depth endpoint provides real-time order book data with support for both one-time queries and subscription-based updates. + +### Update Behavior + + +After successful subscription, the server sends a **full snapshot** of the order book as the first `depth_update` message. All subsequent messages are **incremental updates** containing only the changes since the last update. + + + +Public `depth` updates exclude Retail Price Improvement (RPI) orders. The `depth_update` stream includes only regular order book liquidity. + +Private active order endpoints and private WebSocket streams return RPI orders. The exchange UI order book (web and mobile) displays RPI orders. + + +### Understanding Updates + +- **First message** (`past_update_id` is absent): Full order book snapshot with all price levels +- **Subsequent messages** (`past_update_id` is present): Only changed price levels +- **Removed levels**: Shown as `[price, "0"]` - when amount is "0", remove that price level from your local order book + + +If 10 seconds elapse without any order book changes, the server will push a full snapshot again as a keepalive mechanism. + + +## Maintaining a Local Order Book + +To maintain an accurate local order book, follow this algorithm: + +1. Subscribe to depth updates +2. Receive the first message (full snapshot) - initialize your order book +3. For each incremental update: + - If amount is "0" → remove that price level + - If amount is not "0" → update existing level or insert new level at the correct sorted position +4. Keep order book sorted: asks ascending, bids descending +5. Truncate to your desired limit after each update + +## Code Examples + + + +```typescript TypeScript +type IDepth = [string, string]; + +interface OrderBook { + asks: IDepth[]; + bids: IDepth[]; +} + +const ws = new WebSocket("wss://api.whitebit.com/ws"); +const orderBook: OrderBook = { asks: [], bids: [] }; +const LIMIT = 100; + +ws.addEventListener("open", () => { + ws.send( + JSON.stringify({ + id: 1, + method: "depth_subscribe", + params: ["ETH_BTC", LIMIT, "0", true] + }), + ); +}); + +ws.addEventListener("message", (event: MessageEvent) => { + const message = JSON.parse(event.data.toString()); + + if (message.method === "depth_update") { + const updateData = message.params[0] as Partial; + const isFirstMessage = !updateData.past_update_id; + + if (isFirstMessage) { + // First message or keepalive snapshot is a full snapshot - replace order book + orderBook.asks = updateData.asks ?? []; + orderBook.bids = updateData.bids ?? []; + } else { + // Subsequent messages are incremental updates + applyUpdates(orderBook.asks, updateData.asks, "ask"); + applyUpdates(orderBook.bids, updateData.bids, "bid"); + truncateOrderBook(orderBook.asks); + truncateOrderBook(orderBook.bids); + } + } +}); + +function applyUpdates(orderBookSide: IDepth[], updates: IDepth[] | undefined, side: "ask" | "bid") { + if (updates === undefined) return; + for (const [price, amount] of updates) { + // Find the index of an entry in orderBookSide that matches the given price. + const priceIndex = orderBookSide.findIndex((level) => level[0] === price); + + // If the amount is '0', it means this price level should be removed from the orderBookSide. + if (amount === "0") { + if (priceIndex !== -1) { + // Remove the existing price level since the amount is '0'. + orderBookSide.splice(priceIndex, 1); + } + } else { + // If the amount is not '0', either update the existing price level or add a new one. + if (priceIndex === -1) { + // Find the position where the new price level should be inserted. + const insertIndex = orderBookSide.findIndex((level) => + side === "ask" ? level[0] > price : level[0] < price + ); + + if (insertIndex === -1) { + // Add to the end if there's no higher price level. + orderBookSide.push([price, amount]); + } else { + // Insert at the correct sorted position. + orderBookSide.splice(insertIndex, 0, [price, amount]); + } + } else { + // Update the amount for the existing price level. + orderBookSide[priceIndex][1] = amount; + } + } + } +} + +function truncateOrderBook(orderBookSide: IDepth[]) { + if (orderBookSide.length > LIMIT) { + // Only truncate if the length exceeds the LIMIT + orderBookSide.splice(LIMIT); + } +} +``` + +```python Python +import asyncio +import json +import websockets + +class OrderBook: + def __init__(self): + self.asks = [] + self.bids = [] + +LIMIT = 100 + +async def depth_subscribe(): + async with websockets.connect('wss://api.whitebit.com/ws') as ws: + await ws.send(json.dumps({ + 'id': 1, + 'method': 'depth_subscribe', + 'params': ['ETH_BTC', LIMIT, '0', True] + })) + + async for message in ws: + data = json.loads(message) + if data.get('method') == 'depth_update': + handle_depth_update(data['params']) + +def handle_depth_update(params): + update_data = params[0] + is_first_message = update_data.get('past_update_id') is None + + if is_first_message: + # First message or keepalive snapshot is a full snapshot - replace order book + order_book.asks = update_data.get('asks', []) + order_book.bids = update_data.get('bids', []) + else: + # Subsequent messages are incremental updates + apply_updates(order_book.asks, update_data.get('asks', []), "ask") + apply_updates(order_book.bids, update_data.get('bids', []), "bid") + truncate_order_book(order_book.asks) + truncate_order_book(order_book.bids) + +def apply_updates(order_book_side, updates, side): + for price, amount in updates: + price = str(price) + amount = str(amount) + + # Find existing entry + price_index = next((i for i, level in enumerate(order_book_side) if level[0] == price), -1) + + if amount == '0': + if price_index != -1: + # Remove the existing price level since the amount is '0'. + order_book_side.pop(price_index) + else: + if price_index == -1: + # Find the position where the new price level should be inserted. + insert_index = next((i for i, level in enumerate(order_book_side) + if (side == "ask" and level[0] > price) or + (side == "bid" and level[0] < price)), -1) + if insert_index == -1: + # Add to the end if there's no higher price level. + order_book_side.append([price, amount]) + else: + # Insert at the correct sorted position. + order_book_side.insert(insert_index, [price, amount]) + else: + # Update the amount for the existing price level. + order_book_side[price_index][1] = amount + +def truncate_order_book(order_book_side): + if len(order_book_side) > LIMIT: + del order_book_side[LIMIT:] + +order_book = OrderBook() + +asyncio.get_event_loop().run_until_complete(depth_subscribe()) +``` + +```java Java +import java.io.ByteArrayInputStream; +import java.net.URI; +import java.net.URISyntaxException; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; +import javax.json.*; +import javax.websocket.*; + +@ClientEndpoint +public class OrderBookClient { + private static final int LIMIT = 100; + private static List asks = new ArrayList<>(); + private static List bids = new ArrayList<>(); + private static CountDownLatch latch; + + public static void main(String[] args) throws URISyntaxException, InterruptedException { + latch = new CountDownLatch(1); + WebSocketContainer container = ContainerProvider.getWebSocketContainer(); + URI uri = new URI("wss://api.whitebit.com/ws"); + container.connectToServer(OrderBookClient.class, uri); + latch.await(1, TimeUnit.MINUTES); + } + + @OnOpen + public void onOpen(Session session) throws Exception { + JsonObject message = Json.createObjectBuilder() + .add("id", 1) + .add("method", "depth_subscribe") + .add("params", Json.createArrayBuilder() + .add("ETH_BTC") + .add(LIMIT) + .add("0") + .add(true) + ) + .build(); + session.getBasicRemote().sendText(message.toString()); + } + + @OnMessage + public void onMessage(String message, Session session) { + JsonReader reader = Json.createReader(new ByteArrayInputStream(message.getBytes(StandardCharsets.UTF_8))); + JsonObject jsonMessage = reader.readObject(); + + if ("depth_update".equals(jsonMessage.getString("method"))) { + JsonArray params = jsonMessage.getJsonArray("params"); + JsonObject updateData = params.getJsonObject(0); + boolean isFirstMessage = !updateData.containsKey("past_update_id") || + updateData.isNull("past_update_id"); + + if (isFirstMessage) { + // First message or keepalive snapshot is a full snapshot - replace order book + asks = parseOrderBookSide(updateData.getJsonArray("asks")); + bids = parseOrderBookSide(updateData.getJsonArray("bids")); + } else { + // Subsequent messages are incremental updates + applyUpdates(asks, updateData.getJsonArray("asks"), "ask"); + applyUpdates(bids, updateData.getJsonArray("bids"), "bid"); + truncateOrderBook(asks); + truncateOrderBook(bids); + } + } + } + + @OnClose + public void onClose(Session session, CloseReason reason) { + System.out.println("Connection closed: " + reason); + latch.countDown(); + } + + @OnError + public void onError(Session session, Throwable throwable) { + throwable.printStackTrace(); + latch.countDown(); + } + + private static List parseOrderBookSide(JsonArray jsonArray) { + List orderBookSide = new ArrayList<>(); + for (JsonValue value : jsonArray) { + JsonArray level = value.asJsonArray(); + String price = level.getString(0); + String amount = level.getString(1); + orderBookSide.add(new IDepth(price, amount)); + } + return orderBookSide; + } + + private static void applyUpdates(List orderBookSide, JsonArray updates, String side) { + for (JsonValue value : updates) { + JsonArray level = value.asJsonArray(); + String price = level.getString(0); + String amount = level.getString(1); + + int priceIndex = -1; + for (int i = 0; i < orderBookSide.size(); i++) { + if (orderBookSide.get(i).getPrice().equals(price)) { + priceIndex = i; + break; + } + } + + if ("0".equals(amount)) { + if (priceIndex != -1) { + orderBookSide.remove(priceIndex); + } + } else { + if (priceIndex == -1) { + int insertIndex = -1; + for (int i = 0; i < orderBookSide.size(); i++) { + if ((side.equals("ask") && orderBookSide.get(i).getPrice().compareTo(price) > 0) || + (side.equals("bid") && orderBookSide.get(i).getPrice().compareTo(price) < 0)) { + insertIndex = i; + break; + } + } + + if (insertIndex == -1) { + orderBookSide.add(new IDepth(price, amount)); + } else { + orderBookSide.add(insertIndex, new IDepth(price, amount)); + } + } else { + orderBookSide.get(priceIndex).setAmount(amount); + } + } + } + } + + private static void truncateOrderBook(List orderBookSide) { + if (orderBookSide.size() > LIMIT) { + orderBookSide.subList(LIMIT, orderBookSide.size()).clear(); + } + } + + static class IDepth { + private final String price; + private String amount; + + public IDepth(String price, String amount) { + this.price = price; + this.amount = amount; + } + + public String getPrice() { + return price; + } + + public String getAmount() { + return amount; + } + + public void setAmount(String amount) { + this.amount = amount; + } + } +} +``` \ No newline at end of file diff --git a/public/websocket/kline.mdx b/websocket/market-streams/kline.mdx similarity index 100% rename from public/websocket/kline.mdx rename to websocket/market-streams/kline.mdx diff --git a/public/websocket/lastprice.mdx b/websocket/market-streams/lastprice.mdx similarity index 94% rename from public/websocket/lastprice.mdx rename to websocket/market-streams/lastprice.mdx index 7c9cc5c..25e2d99 100644 --- a/public/websocket/lastprice.mdx +++ b/websocket/market-streams/lastprice.mdx @@ -1,4 +1,4 @@ ---- -asyncapi: "/asyncapi/public/lastprice.yaml /ws" -title: Last Price ---- +--- +asyncapi: "/asyncapi/public/lastprice.yaml /ws" +title: Last Price +--- diff --git a/public/websocket/market-today.mdx b/websocket/market-streams/market-today.mdx similarity index 100% rename from public/websocket/market-today.mdx rename to websocket/market-streams/market-today.mdx diff --git a/public/websocket/market.mdx b/websocket/market-streams/market.mdx similarity index 100% rename from public/websocket/market.mdx rename to websocket/market-streams/market.mdx diff --git a/public/websocket/index.mdx b/websocket/market-streams/overview.mdx similarity index 58% rename from public/websocket/index.mdx rename to websocket/market-streams/overview.mdx index da5ffc1..423b453 100644 --- a/public/websocket/index.mdx +++ b/websocket/market-streams/overview.mdx @@ -6,28 +6,28 @@ sidebarTitle: Overview Browse the available public WebSocket channels below. For connection details, message format, and rate limits, see the [WebSocket Overview](/websocket/overview). - + Check API service status and health - + Subscribe to candlestick (OHLCV) data for markets - + Real-time last traded price updates for markets - + 24-hour market statistics including volume and price changes - + Current day market statistics based on UTC timezone - + Stream of recent trades executed on the market - + Order book depth updates with bids and asks - + Best bid and ask prices in the order book diff --git a/public/websocket/service.mdx b/websocket/market-streams/service.mdx similarity index 94% rename from public/websocket/service.mdx rename to websocket/market-streams/service.mdx index b077c21..5036d7d 100644 --- a/public/websocket/service.mdx +++ b/websocket/market-streams/service.mdx @@ -1,4 +1,4 @@ ---- -asyncapi: "/asyncapi/public/service.yaml /ws" -title: Service ---- +--- +asyncapi: "/asyncapi/public/service.yaml /ws" +title: Service +--- diff --git a/public/websocket/trades.mdx b/websocket/market-streams/trades.mdx similarity index 95% rename from public/websocket/trades.mdx rename to websocket/market-streams/trades.mdx index 83e8e0c..a193261 100644 --- a/public/websocket/trades.mdx +++ b/websocket/market-streams/trades.mdx @@ -1,55 +1,55 @@ ---- -asyncapi: "/asyncapi/public/trades.yaml /ws" -title: Market Trades ---- - -## Subscription Behavior - - -For each WebSocket connection, you can subscribe to either specific markets or all markets. **Every new subscription replaces the existing one.** - - -### Subscribe to Specific Markets - -To receive trade updates for specific markets, provide market names in the `params` array: - -```json -{ - "id": 9, - "method": "trades_subscribe", - "params": [ - "ETH_BTC", - "BTC_USDT" - ] -} -``` - -### Subscribe to All Markets - -To receive trade updates for all available markets, send an empty `params` array: - -```json -{ - "id": 9, - "method": "trades_subscribe", - "params": [] -} -``` - -## RPI Field - -Trade updates may include an `rpi` field: - -- `rpi: true` - The trade involved a Retail Price Improvement (RPI) order -- `rpi: false` or absent - Regular trade - - -RPI orders provide better execution prices than the current best bid/ask for retail traders. - - - -Public trade updates can include executions that originate from RPI orders. - -Public market data feeds do not expose RPI orders as visible liquidity in `depth` or `bookTicker`. RPI orders remain visible only in private active orders and in the exchange UI order book (web and mobile). - - +--- +asyncapi: "/asyncapi/public/trades.yaml /ws" +title: Market Trades +--- + +## Subscription Behavior + + +For each WebSocket connection, you can subscribe to either specific markets or all markets. **Every new subscription replaces the existing one.** + + +### Subscribe to Specific Markets + +To receive trade updates for specific markets, provide market names in the `params` array: + +```json +{ + "id": 9, + "method": "trades_subscribe", + "params": [ + "ETH_BTC", + "BTC_USDT" + ] +} +``` + +### Subscribe to All Markets + +To receive trade updates for all available markets, send an empty `params` array: + +```json +{ + "id": 9, + "method": "trades_subscribe", + "params": [] +} +``` + +## RPI Field + +Trade updates may include an `rpi` field: + +- `rpi: true` - The trade involved a Retail Price Improvement (RPI) order +- `rpi: false` or absent - Regular trade + + +RPI orders provide better execution prices than the current best bid/ask for retail traders. + + + +Public trade updates can include executions that originate from RPI orders. + +Public market data feeds do not expose RPI orders as visible liquidity in `depth` or `bookTicker`. RPI orders remain visible only in private active orders and in the exchange UI order book (web and mobile). + + diff --git a/websocket/overview.mdx b/websocket/overview.mdx index 6a72b7d..1f73b92 100644 --- a/websocket/overview.mdx +++ b/websocket/overview.mdx @@ -123,17 +123,17 @@ JSON structure of a response message: Private channels (Account Streams) require authorization before you can subscribe. After connecting, send an `authorize` request with your API credentials to gain access to private data such as balances, orders, deals, and positions. -See the [Authorize](/private/websocket/authorize) channel page for the full request format, parameters, and examples. +See the [Authorize](/websocket/account-streams/authorize) channel page for the full request format, parameters, and examples. --- ## Channels - + Public channels for market data — kline, last price, trades, depth, book ticker, and more. - + Private channels for account data — balances, orders, deals, positions, and borrows. Requires authorization. From 1cd26c5b78578a0a055a8a36669f2cbd94298a32 Mon Sep 17 00:00:00 2001 From: whitebit-robot Date: Wed, 18 Feb 2026 14:46:26 +0100 Subject: [PATCH 32/84] The review to align existing docs with style guides were performed. --- .../account-wallet/close-investment.mdx | 2 +- ...-withdraw-request-with-specific-amount.mdx | 4 +- .../create-withdraw-request.mdx | 42 +-- .../get-flex-investment-history.mdx | 2 +- .../get-flex-payment-history.mdx | 2 +- .../account-wallet/get-flex-plans.mdx | 2 +- .../get-interest-payments-history.mdx | 2 +- .../get-investments-history.mdx | 2 +- api-reference/account-wallet/get-plans.mdx | 2 +- .../get-user-flex-investments.mdx | 2 +- api-reference/account-wallet/invest.mdx | 2 +- .../account-wallet/list-credit-lines.mdx | 2 +- api-reference/account-wallet/overview.mdx | 6 +- api-reference/authentication.mdx | 28 +- api-reference/collateral-trading/overview.mdx | 2 +- .../market-data/asset-status-list.mdx | 2 +- api-reference/market-data/depth.mdx | 2 +- api-reference/market-data/fee.mdx | 2 +- api-reference/market-data/market-activity.mdx | 2 +- api-reference/overview.mdx | 6 +- .../list-sub-account-api-keys.mdx | 2 +- api-reference/sub-accounts/overview.mdx | 2 +- asyncapi/private/authorize.yaml | 6 +- asyncapi/private/balance_margin.yaml | 4 +- asyncapi/private/borrows.yaml | 4 +- asyncapi/private/borrows_events.yaml | 2 +- asyncapi/private/deals.yaml | 4 +- asyncapi/private/margin_positions_events.yaml | 2 +- asyncapi/private/orders_executed.yaml | 6 +- asyncapi/private/orders_pending.yaml | 8 +- asyncapi/private/positions.yaml | 8 +- asyncapi/public/depth.yaml | 2 +- asyncapi/public/market.yaml | 8 +- asyncapi/public/trades.yaml | 2 +- changelog.mdx | 6 +- glossary.mdx | 2 +- guides/client-order-id.mdx | 10 +- guides/fireblocks.mdx | 48 ++-- guides/order-parameter-rules.mdx | 2 +- index.mdx | 12 +- openapi/oauth2.yaml | 16 +- openapi/private/http-trade-v1.yaml | 80 +++--- openapi/private/http-trade-v4.yaml | 122 ++++----- openapi/private/main_api_v4.yaml | 254 +++++++++--------- openapi/public/http-v1.yaml | 34 +-- openapi/public/http-v2.yaml | 30 +-- openapi/public/http-v4.yaml | 92 +++---- platform/colocation.mdx | 10 +- platform/oauth/overview.mdx | 14 +- platform/oauth/usage/overview.mdx | 10 +- platform/overview.mdx | 4 +- platform/self-trade-prevention.mdx | 10 +- platform/webhook.mdx | 28 +- private/http-trade-v1/overview.mdx | 2 +- sdks.mdx | 8 +- snippets/snippet-intro.mdx | 5 +- websocket/account-streams/balance-margin.mdx | 2 +- websocket/account-streams/balance-spot.mdx | 6 +- websocket/account-streams/borrows-events.mdx | 2 +- websocket/account-streams/borrows.mdx | 2 +- websocket/account-streams/deals.mdx | 2 +- .../margin-positions-events.mdx | 2 +- websocket/account-streams/orders-executed.mdx | 4 +- websocket/account-streams/orders-pending.mdx | 4 +- websocket/account-streams/overview.mdx | 6 +- websocket/account-streams/positions.mdx | 8 +- websocket/market-streams/book-ticker.mdx | 2 +- websocket/market-streams/depth.mdx | 22 +- websocket/market-streams/kline.mdx | 6 +- websocket/market-streams/market-today.mdx | 6 +- websocket/market-streams/market.mdx | 6 +- websocket/market-streams/trades.mdx | 8 +- websocket/overview.mdx | 6 +- 73 files changed, 537 insertions(+), 532 deletions(-) diff --git a/api-reference/account-wallet/close-investment.mdx b/api-reference/account-wallet/close-investment.mdx index e441a80..de9126c 100644 --- a/api-reference/account-wallet/close-investment.mdx +++ b/api-reference/account-wallet/close-investment.mdx @@ -4,5 +4,5 @@ openapi: /openapi/private/main_api_v4.yaml POST /api/v4/main-account/smart/inves --- -These endpoints are available only for B2B partner services, you need to fill the form https://whitebit.com/institutional-services/b2b in order to get permissions to use these endpoints. +These endpoints are available only for B2B partner services. Fill the form at https://whitebit.com/institutional-services/b2b to request access. \ No newline at end of file diff --git a/api-reference/account-wallet/create-withdraw-request-with-specific-amount.mdx b/api-reference/account-wallet/create-withdraw-request-with-specific-amount.mdx index 23460e6..edf3580 100644 --- a/api-reference/account-wallet/create-withdraw-request-with-specific-amount.mdx +++ b/api-reference/account-wallet/create-withdraw-request-with-specific-amount.mdx @@ -5,5 +5,5 @@ openapi: /openapi/private/main_api_v4.yaml POST /api/v4/main-account/withdraw-pa Example: -- When you create base withdraw and set amount = 100 USD, receiver will recieve 100 USD - fee amount, and your balance will decrease by 100 USD. -- When you use this endpoint and set amount = 100 USD, receiver will recieve 100 USD, and your balance will decrease by 100 USD + [fee](/glossary/#fee) amount. +- When creating a base withdraw with amount = 100 USD, the receiver receives 100 USD minus the fee, and the balance decreases by 100 USD. +- When calling the endpoint with amount = 100 USD, the receiver receives 100 USD, and the balance decreases by 100 USD + [fee](/glossary/#fee) amount. diff --git a/api-reference/account-wallet/create-withdraw-request.mdx b/api-reference/account-wallet/create-withdraw-request.mdx index 4a9111f..1fbfece 100644 --- a/api-reference/account-wallet/create-withdraw-request.mdx +++ b/api-reference/account-wallet/create-withdraw-request.mdx @@ -5,7 +5,7 @@ openapi: /openapi/private/main_api_v4.yaml POST /api/v4/main-account/withdraw ## Withdrawal Scenarios Guide -This endpoint supports **8 different withdrawal scenarios**. Each scenario requires different fields depending on the currency type, destination, and regulatory requirements. Use the example selector above to switch between scenarios. +The endpoint supports **8 different withdrawal scenarios**. Each scenario requires different fields depending on the currency type, destination, and regulatory requirements. Use the example selector above to switch between scenarios. ### 🔹 Cryptocurrency Withdrawals @@ -15,27 +15,27 @@ For standard cryptocurrencies like BTC, ETH, LTC, etc. - **Use when**: Withdrawing to a standard blockchain address #### **Scenario 2: Multi-Network Crypto (USDT, USDC)** -For cryptocurrencies that exist on multiple blockchains. +For cryptocurrencies existing on multiple blockchains. - **Required fields**: Same as above + `network` - **Networks**: ERC20 (Ethereum), TRC20 (Tron), BEP20 (BSC), OMNI, etc. -- **Use when**: Withdrawing tokens that exist on multiple chains +- **Use when**: Withdrawing tokens existing on multiple chains -**Critical**: Ensure the `network` matches your destination address type. Sending ERC20 USDT to a TRC20 address will result in **permanent loss of funds**. Verify the network on [Asset Status endpoint](/api-reference/market-data/asset-status-list). +**Critical**: Ensure the `network` matches the destination address type. Sending ERC20 USDT to a TRC20 address will result in **permanent loss of funds**. Verify the network on [Asset Status endpoint](/api-reference/market-data/asset-status-list). #### **Scenario 3: Travel Rule Compliance (EEA Users)** -Required for crypto withdrawals if you're from the European Economic Area (EEA). +Required for crypto withdrawals when the account is registered in the European Economic Area (EEA). - **Required fields**: Standard crypto fields + `travelRule` object - **Travel rule types**: - `individual` - Personal withdrawals (requires first name / last name) - `entity` - Business withdrawals (requires company name / address) -- **Use when**: Your account is registered in EEA countries +- **Use when**: The account is registered in EEA countries ### 🔹 Fiat Withdrawals (KYC Required) -All fiat withdrawals require KYC verification. Ensure your account is verified before attempting fiat withdrawals. +All fiat withdrawals require KYC verification. Ensure the account is verified before attempting fiat withdrawals. #### **Scenario 4: Basic Fiat Withdrawal** @@ -47,8 +47,8 @@ Standard fiat withdrawal via VISAMASTER provider. #### **Scenario 5: Fiat with Partial Enable** For withdrawals exceeding standard limits with "partially successful" status support. - **Required fields**: Same as basic + `partialEnable: true` + `address` (encrypted card token) -- **Use when**: Withdrawing larger amounts that might be processed partially -- **Important**: Your application must handle "Partially successful" withdrawal status +- **Use when**: Withdrawing larger amounts eligible for partial processing +- **Important**: The application must handle "Partially successful" withdrawal status #### **Scenario 6: IBAN Transfers (UAH_IBAN)** Bank transfer withdrawals to IBAN accounts. @@ -69,21 +69,21 @@ Withdrawals with extended beneficiary information. ## Amount and Fee Calculation -The `amount` field in this endpoint **includes** the withdrawal fee. The recipient receives `amount - fee`. +The `amount` field in the request **includes** the withdrawal fee. The recipient receives `amount - fee`. ### How it works: -**Example with this endpoint** (`/withdraw`): -- Your balance: 100 USDT +**Example request** (`/withdraw`): +- Balance: 100 USDT - Withdrawal fee: 2 USDT -- You set `amount: "100"` +- Request `amount: "100"` - **Result**: 100 USDT deducted from balance, recipient receives **98 USDT** **Alternative approach** (use `/withdraw-pay` instead): -- Your balance: 100 USDT +- Balance: 100 USDT - Withdrawal fee: 2 USDT -- You set `amount: "98"` +- Request `amount: "98"` - **Result**: 102 USDT deducted from balance, recipient receives **98 USDT** @@ -125,7 +125,7 @@ Different currencies have different address formats: - **Tron/TRC20**: Starts with `T`, 34 characters - **Fiat**: Card token or IBAN format -**Validation happens on our side**, but double-check addresses before sending. +The platform validates addresses, but double-check addresses before sending. ### ⚠️ Memo/Destination Tag @@ -152,7 +152,7 @@ Fiat withdrawals require the correct provider: ### Step 1: Pre-Withdrawal Checks ``` -1. Check your balance: GET /api/v4/main-account/balance +1. Check balance: GET /api/v4/main-account/balance 2. Get withdrawal fees: POST /api/v4/main-account/fee 3. Verify currency is withdrawable: GET /api/v4/public/assets - Check "can_withdraw" status is "true" @@ -168,7 +168,7 @@ POST /api/v4/main-account/withdraw **Success response**: `[]` (empty array) -This means validation succeeded and the withdrawal process has started. The withdrawal is now queued for processing. +Validation succeeded and the withdrawal process has started. The withdrawal is now queued for processing. ### Step 3: Monitor Status @@ -176,7 +176,7 @@ This means validation succeeded and the withdrawal process has started. The with POST /api/v4/main-account/history ``` -Search by your `uniqueId` to track the transaction. +Search by `uniqueId` to track the transaction. **Withdrawal status codes**: - **Successful**: 3, 7 @@ -201,7 +201,7 @@ For multi-network currencies (USDT, USDC, etc.), choosing the right network is c | **OMNI** | Very Slow | High | Legacy, rarely used | -**Default network**: If you don't specify a `network` parameter, the default network is used (typically ERC20 for USDT). Always specify the network explicitly to avoid confusion. +**Default network**: If the `network` parameter is omitted, the default network is used (typically ERC20 for USDT). Always specify the network explicitly to avoid confusion. --- @@ -290,7 +290,7 @@ For multi-network currencies (USDT, USDC, etc.), choosing the right network is c - ✅ Address is correct and copied without errors - ✅ Network matches the destination (ERC20, TRC20, etc.) - ✅ Memo/tag included if required -- ✅ Amount is within your balance minus fees +- ✅ Amount is within the available balance minus fees - ✅ Unique ID is newly generated - ✅ Provider is correct (for fiat) diff --git a/api-reference/account-wallet/get-flex-investment-history.mdx b/api-reference/account-wallet/get-flex-investment-history.mdx index f3cdfc4..7979125 100644 --- a/api-reference/account-wallet/get-flex-investment-history.mdx +++ b/api-reference/account-wallet/get-flex-investment-history.mdx @@ -4,5 +4,5 @@ openapi: /openapi/private/main_api_v4.yaml POST /api/v4/main-account/smart-flex/ --- -These endpoints are available only for B2B partner services, you need to fill the form https://whitebit.com/institutional-services/b2b in order to get permissions to use these endpoints. +These endpoints are available only for B2B partner services. Fill the form at https://whitebit.com/institutional-services/b2b to request access. \ No newline at end of file diff --git a/api-reference/account-wallet/get-flex-payment-history.mdx b/api-reference/account-wallet/get-flex-payment-history.mdx index 61903c3..0871d0d 100644 --- a/api-reference/account-wallet/get-flex-payment-history.mdx +++ b/api-reference/account-wallet/get-flex-payment-history.mdx @@ -4,5 +4,5 @@ openapi: /openapi/private/main_api_v4.yaml POST /api/v4/main-account/smart-flex/ --- -This endpoint automatically filters to show ONLY DAILY_EARNING operations (type 4) +The endpoint automatically filters to show ONLY DAILY_EARNING operations (type 4) diff --git a/api-reference/account-wallet/get-flex-plans.mdx b/api-reference/account-wallet/get-flex-plans.mdx index 0050025..110eb9b 100644 --- a/api-reference/account-wallet/get-flex-plans.mdx +++ b/api-reference/account-wallet/get-flex-plans.mdx @@ -4,5 +4,5 @@ openapi: /openapi/private/main_api_v4.yaml POST /api/v4/main-account/smart-flex/ --- -These endpoints are available only for B2B partner services, you need to fill the form https://whitebit.com/institutional-services/b2b in order to get permissions to use these endpoints. +These endpoints are available only for B2B partner services. Fill the form at https://whitebit.com/institutional-services/b2b to request access. \ No newline at end of file diff --git a/api-reference/account-wallet/get-interest-payments-history.mdx b/api-reference/account-wallet/get-interest-payments-history.mdx index da2a02f..cff8285 100644 --- a/api-reference/account-wallet/get-interest-payments-history.mdx +++ b/api-reference/account-wallet/get-interest-payments-history.mdx @@ -4,5 +4,5 @@ openapi: /openapi/private/main_api_v4.yaml POST /api/v4/main-account/smart/inter --- -These endpoints are available only for B2B partner services, you need to fill the form https://whitebit.com/institutional-services/b2b in order to get permissions to use these endpoints. +These endpoints are available only for B2B partner services. Fill the form at https://whitebit.com/institutional-services/b2b to request access. \ No newline at end of file diff --git a/api-reference/account-wallet/get-investments-history.mdx b/api-reference/account-wallet/get-investments-history.mdx index afff13c..5227960 100644 --- a/api-reference/account-wallet/get-investments-history.mdx +++ b/api-reference/account-wallet/get-investments-history.mdx @@ -4,5 +4,5 @@ openapi: /openapi/private/main_api_v4.yaml POST /api/v4/main-account/smart/inves --- -These endpoints are available only for B2B partner services, you need to fill the form https://whitebit.com/institutional-services/b2b in order to get permissions to use these endpoints. +These endpoints are available only for B2B partner services. Fill the form at https://whitebit.com/institutional-services/b2b to request access. \ No newline at end of file diff --git a/api-reference/account-wallet/get-plans.mdx b/api-reference/account-wallet/get-plans.mdx index 45c9827..cbf6ef3 100644 --- a/api-reference/account-wallet/get-plans.mdx +++ b/api-reference/account-wallet/get-plans.mdx @@ -4,5 +4,5 @@ openapi: /openapi/private/main_api_v4.yaml POST /api/v4/main-account/smart/plans --- -These endpoints are available only for B2B partner services, you need to fill the form https://whitebit.com/institutional-services/b2b in order to get permissions to use these endpoints. +These endpoints are available only for B2B partner services. Fill the form at https://whitebit.com/institutional-services/b2b to request access. diff --git a/api-reference/account-wallet/get-user-flex-investments.mdx b/api-reference/account-wallet/get-user-flex-investments.mdx index 77e77b2..dd14fdf 100644 --- a/api-reference/account-wallet/get-user-flex-investments.mdx +++ b/api-reference/account-wallet/get-user-flex-investments.mdx @@ -4,5 +4,5 @@ openapi: /openapi/private/main_api_v4.yaml POST /api/v4/main-account/smart-flex/ --- -These endpoints are available only for B2B partner services, you need to fill the form https://whitebit.com/institutional-services/b2b in order to get permissions to use these endpoints. +These endpoints are available only for B2B partner services. Fill the form at https://whitebit.com/institutional-services/b2b to request access. \ No newline at end of file diff --git a/api-reference/account-wallet/invest.mdx b/api-reference/account-wallet/invest.mdx index b90749d..68ed24e 100644 --- a/api-reference/account-wallet/invest.mdx +++ b/api-reference/account-wallet/invest.mdx @@ -4,5 +4,5 @@ openapi: /openapi/private/main_api_v4.yaml POST /api/v4/main-account/smart/inves --- -These endpoints are available only for B2B partner services, you need to fill the form https://whitebit.com/institutional-services/b2b in order to get permissions to use these endpoints. +These endpoints are available only for B2B partner services. Fill the form at https://whitebit.com/institutional-services/b2b to request access. \ No newline at end of file diff --git a/api-reference/account-wallet/list-credit-lines.mdx b/api-reference/account-wallet/list-credit-lines.mdx index a41a92f..708a3d5 100644 --- a/api-reference/account-wallet/list-credit-lines.mdx +++ b/api-reference/account-wallet/list-credit-lines.mdx @@ -4,5 +4,5 @@ openapi: /openapi/private/main_api_v4.yaml POST /api/v4/credit-line/loans/info --- -Please, pay attention that this endpoint works on demand. It means that you need to contact WhiteBIT support and provide your API key to get access to this functionality. +The endpoint works on demand. Contact WhiteBIT support and provide the API key to get access to the functionality. diff --git a/api-reference/account-wallet/overview.mdx b/api-reference/account-wallet/overview.mdx index 4b306f9..ddbfc81 100644 --- a/api-reference/account-wallet/overview.mdx +++ b/api-reference/account-wallet/overview.mdx @@ -4,7 +4,7 @@ sidebarTitle: "Overview" description: "Endpoints for managing main balance, deposits, withdrawals, codes, crypto lending, fees, mining pool, and credit lines." --- -Manage your main account balance, deposits, withdrawals, transfers, WhiteBIT codes, crypto lending, fees, mining pool, and credit lines. +Manage the main account balance, deposits, withdrawals, transfers, WhiteBIT codes, crypto lending, fees, mining pool, and credit lines. For general API conventions (base URL, error format, rate limits), see the [API Reference Overview](/api-reference/overview). @@ -57,7 +57,7 @@ For general API conventions (base URL, error format, rate limits), see the [API Apply a WhiteBIT code - Get your created codes + Get created codes Get codes history @@ -95,7 +95,7 @@ For general API conventions (base URL, error format, rate limits), see the [API Get available flex lending plans - Get your flex investments + Get flex investments Get flex investment history diff --git a/api-reference/authentication.mdx b/api-reference/authentication.mdx index 4b31c47..ea5ea67 100644 --- a/api-reference/authentication.mdx +++ b/api-reference/authentication.mdx @@ -5,17 +5,17 @@ sidebarTitle: "Authentication" ## Overview -This guide explains how to authenticate with WhiteBit’s private HTTP API endpoints, which require authentication for security purposes. +The Authentication guide explains how to authenticate with WhiteBIT’s private HTTP API endpoints, which require authentication for security purposes. ## Getting Started ### Setting Up API Keys - Navigate to [WhiteBit API Settings](https://whitebit.com/settings/api) + Navigate to [WhiteBIT API Settings](https://whitebit.com/settings/api) - Select the appropriate configuration tab for your API keys + Select the appropriate configuration tab for API keys Different API keys provide access to different API endpoints @@ -39,7 +39,7 @@ All authenticated requests must: ### Body Data Format -Your request body must be a JSON object containing: +The request body must be a JSON object containing: | Field | Description | Example | | --- | --- | --- | @@ -50,7 +50,7 @@ Your request body must be a JSON object containing: **Example Request Body:** -```bash +```json { "request": "/api/v4/trade-account/balance", "nonce": 1594297865, @@ -61,7 +61,7 @@ Your request body must be a JSON object containing: #### About Nonce Values -- A good practice is to use the Unix timestamp in milliseconds +- Use the Unix timestamp in milliseconds for nonce values - Ensure each nonce is larger than previous requests - When `nonceWindow` is enabled: - Provide Unix timestamp in milliseconds as the nonce @@ -76,15 +76,15 @@ Every authenticated request requires these headers: | Header | Value | Description | | --- | --- | --- | | `Content-type` | `application/json` | Specifies JSON format | -| `X-TXC-APIKEY` | `your_api_key` | Your public WhiteBit API key | +| `X-TXC-APIKEY` | `YOUR_API_KEY` | The public WhiteBIT API key | | `X-TXC-PAYLOAD` | `base64_encoded_payload` | Base64-encoded request body | | `X-TXC-SIGNATURE` | `signature` | HMAC-SHA512 signature (hex encoded) | -The signature is created using: `hex(HMAC_SHA512(payload, key=api_secret))` +Create the signature using: `hex(HMAC_SHA512(payload, key=api_secret))` ## Implementation Examples -We provide the [API Quick Start Helper](https://github.com/whitebit-exchange/api-quickstart) library with examples in multiple languages: +WhiteBIT provides the [API Quick Start Helper](https://github.com/whitebit-exchange/api-quickstart) library with examples in multiple languages: - Python - PHP @@ -104,9 +104,15 @@ We provide the [API Quick Start Helper](https://github.com/whitebit-exchange/api | ”Too many requests.” | Nonce value is not greater than previous request | Use incrementing nonce values | | ”This action is unauthorized. Enable your key in API settings” | Using disabled API key | Enable key in API settings or check IP restrictions | | ”You don’t have permission to use this endpoint.” | Endpoint access is restricted | Update endpoint access in API key settings | -| ”Invalid payload” | Payload doesn’t match decoded value | Ensure proper base64 encoding of request body | +| ”Invalid payload” | Payload does not match decoded value | Ensure proper base64 encoding of request body | | ”Unauthorized request.” | Request signed incorrectly | Verify signature creation process | | ”Nonce not provided.” | Missing nonce in request body | Include nonce in all requests | | ”Your nonce is more than 5 seconds lesser than the current nonce” | Invalid timestamp when using nonceWindow | Use current timestamp in milliseconds | | ”Invalid nonceWindow.” | nonceWindow is not a boolean | Ensure nonceWindow is set to true or false | -| ”Request not provided.” | Missing request path in body | Include request path in all requests | \ No newline at end of file +| ”Request not provided.” | Missing request path in body | Include request path in all requests | + +## Related resources + +- [API Reference Overview](/api-reference/overview) — Base URL, rate limits, and error format +- [Market Data overview](/api-reference/market-data/overview) — Public endpoints (no authentication) +- [Spot Trading overview](/api-reference/spot-trading/overview) — Private trading endpoints \ No newline at end of file diff --git a/api-reference/collateral-trading/overview.mdx b/api-reference/collateral-trading/overview.mdx index d8bd6fd..2ddf699 100644 --- a/api-reference/collateral-trading/overview.mdx +++ b/api-reference/collateral-trading/overview.mdx @@ -4,7 +4,7 @@ sidebarTitle: "Overview" description: "Overview of collateral (margin) trading endpoints for managing positions, leverage, and collateral orders." --- -Collateral trading allows you to trade with leverage using margin. Manage your collateral account balance, place various order types (limit, market, stop-limit, OCO, OTO), query open orders, and manage positions. +Collateral trading enables leveraged trading using margin. Manage the collateral account balance, place various order types (limit, market, stop-limit, OCO, OTO), query open orders, and manage positions. For general API conventions (base URL, error format, rate limits), see the [API Reference Overview](/api-reference/overview). diff --git a/api-reference/market-data/asset-status-list.mdx b/api-reference/market-data/asset-status-list.mdx index 07959cc..8b19fa3 100644 --- a/api-reference/market-data/asset-status-list.mdx +++ b/api-reference/market-data/asset-status-list.mdx @@ -9,4 +9,4 @@ openapi: "/openapi/public/http-v4.yaml GET /api/v4/public/assets" ## Error codes -This endpoint uses standard error codes. See [Error messages V4 format](/api-reference/market-data/overview#error-messages-v4-format) for the response structure. +The endpoint uses standard error codes. See [Error format](/api-reference/overview#error-format) for the response structure. diff --git a/api-reference/market-data/depth.mdx b/api-reference/market-data/depth.mdx index 80f58c4..0a035ca 100644 --- a/api-reference/market-data/depth.mdx +++ b/api-reference/market-data/depth.mdx @@ -4,5 +4,5 @@ openapi: "/openapi/public/http-v4.yaml GET /api/v4/public/orderbook/depth/{marke --- - Public depth endpoints exclude Retail Price Improvement (RPI) orders. Users view RPI orders only in private active orders (private API/WebSocket) and in the exchange UI order book (web and mobile). + Public depth endpoints exclude Retail Price Improvement (RPI) orders. RPI orders appear only in private active orders (private API/WebSocket) and in the exchange UI order book (web and mobile). diff --git a/api-reference/market-data/fee.mdx b/api-reference/market-data/fee.mdx index 237783f..115fdd3 100644 --- a/api-reference/market-data/fee.mdx +++ b/api-reference/market-data/fee.mdx @@ -9,4 +9,4 @@ openapi: "/openapi/public/http-v4.yaml GET /api/v4/public/fee" ## Error codes -This endpoint uses standard error codes. See [Error messages V4 format](/api-reference/market-data/overview#error-messages-v4-format) for the response structure. +The endpoint uses standard error codes. See [Error format](/api-reference/overview#error-format) for the response structure. diff --git a/api-reference/market-data/market-activity.mdx b/api-reference/market-data/market-activity.mdx index 96b8937..818684b 100644 --- a/api-reference/market-data/market-activity.mdx +++ b/api-reference/market-data/market-activity.mdx @@ -9,4 +9,4 @@ openapi: "/openapi/public/http-v4.yaml GET /api/v4/public/ticker" ## Error codes -This endpoint uses standard error codes. See [Error messages V4 format](/api-reference/market-data/overview#error-messages-v4-format) for the response structure. +The endpoint uses standard error codes. See [Error format](/api-reference/overview#error-format) for the response structure. diff --git a/api-reference/overview.mdx b/api-reference/overview.mdx index 6804454..55344e1 100644 --- a/api-reference/overview.mdx +++ b/api-reference/overview.mdx @@ -12,12 +12,12 @@ import { RegionBaseUrl } from '/components/RegionBaseUrl.jsx'; All REST API endpoints are available at: -``` +```text https://whitebit.com/api/v4/{endpoint} ``` -- **Public endpoints** use the `GET` method. Parameters are sent as query strings. -- **Private endpoints** use the `POST` method. Parameters are sent as JSON in the request body. +- **Public endpoints** use the `GET` method and accept parameters as query strings. +- **Private endpoints** use the `POST` method and accept parameters as JSON in the request body. - All endpoints return time in Unix-time format and respond with JSON. ## Authentication diff --git a/api-reference/sub-accounts/list-sub-account-api-keys.mdx b/api-reference/sub-accounts/list-sub-account-api-keys.mdx index a80aaf8..279a120 100644 --- a/api-reference/sub-accounts/list-sub-account-api-keys.mdx +++ b/api-reference/sub-accounts/list-sub-account-api-keys.mdx @@ -4,5 +4,5 @@ openapi: /openapi/private/main_api_v4.yaml POST /api/v4/sub-account/api-key/list --- -For security reasons, the `apiSecret` field returns an empty string in this endpoint. The API secret is only displayed once during the initial API key creation. +For security reasons, the `apiSecret` field returns an empty string in the response. The API secret is only displayed once during the initial API key creation. diff --git a/api-reference/sub-accounts/overview.mdx b/api-reference/sub-accounts/overview.mdx index aac6396..9c196c2 100644 --- a/api-reference/sub-accounts/overview.mdx +++ b/api-reference/sub-accounts/overview.mdx @@ -4,7 +4,7 @@ sidebarTitle: "Overview" description: "Overview of sub-account management endpoints for creating, managing, and configuring sub-accounts." --- -Sub-accounts let you create and manage separate trading accounts under your main account. Control access with dedicated API keys, transfer funds between accounts, and monitor balances. +Sub-accounts enable creation and management of separate trading accounts under the main account. Control access with dedicated API keys, transfer funds between accounts, and monitor balances. For general API conventions (base URL, error format, rate limits), see the [API Reference Overview](/api-reference/overview). diff --git a/asyncapi/private/authorize.yaml b/asyncapi/private/authorize.yaml index b9cb883..12e3a4f 100644 --- a/asyncapi/private/authorize.yaml +++ b/asyncapi/private/authorize.yaml @@ -5,8 +5,8 @@ info: description: | Authorize WebSocket connection using authentication token. - When you establish WS connection, you should authorize this ws connection via `authorize` method. - After successful authorization you will be able to send requests for balances, [orders](/glossary#orders) etc. + When establishing a WebSocket connection, authorize it via the `authorize` method. + After successful authorization, send requests for balances, [orders](/glossary#orders), and similar data. It only needs to be done successfully once. @@ -63,7 +63,7 @@ components: id: 0 method: authorize params: - - "" + - "" - "public" authorizeResponse: diff --git a/asyncapi/private/balance_margin.yaml b/asyncapi/private/balance_margin.yaml index f885b98..cd974fe 100644 --- a/asyncapi/private/balance_margin.yaml +++ b/asyncapi/private/balance_margin.yaml @@ -6,8 +6,8 @@ info: Get and subscribe to margin wallet balance updates. Request for amount on [margin balance](/glossary#balance-collateral). - Balance available for [margin trade](/glossary#margin-trading) is equal to `balance * leverage` and it depends on liquidity in [orderbook](/glossary#order-book) and your open positions. - When you open position, your balance will not change, but amount available for [trade](/glossary#deal-trade) will decrease. + Balance available for [margin trade](/glossary#margin-trading) is equal to `balance * leverage` and depends on liquidity in the [orderbook](/glossary#order-book) and open positions. + When opening a position, the balance does not change, but the amount available for [trade](/glossary#deal-trade) decreases. servers: production: diff --git a/asyncapi/private/borrows.yaml b/asyncapi/private/borrows.yaml index c36c419..a5bbc10 100644 --- a/asyncapi/private/borrows.yaml +++ b/asyncapi/private/borrows.yaml @@ -3,7 +3,7 @@ info: title: WhiteBit Borrows version: 1.0.0 description: | - Subscribe to borrows updates. This endpoint does NOT support query operations - only subscribe/update/unsubscribe. + Subscribe to borrows updates. The channel does not support query operations — only subscribe, update, and unsubscribe. servers: production: @@ -236,7 +236,7 @@ components: description: "Borrow amount" unrealized_funding: type: string - description: "Funding that will be paid on next borrow stage change" + description: "Funding to be paid on the next borrow stage change" liq_price: type: string description: "Borrow liquidation price" diff --git a/asyncapi/private/borrows_events.yaml b/asyncapi/private/borrows_events.yaml index 35bf442..cd6502d 100644 --- a/asyncapi/private/borrows_events.yaml +++ b/asyncapi/private/borrows_events.yaml @@ -4,7 +4,7 @@ info: version: 1.0.0 description: | Subscribe to borrows events (margin call and liquidation events). - This endpoint does NOT support query operations - only subscribe/update/unsubscribe. + The channel does not support query operations — only subscribe, update, and unsubscribe. ## Event Types diff --git a/asyncapi/private/deals.yaml b/asyncapi/private/deals.yaml index ad420e4..a5272a4 100644 --- a/asyncapi/private/deals.yaml +++ b/asyncapi/private/deals.yaml @@ -310,7 +310,7 @@ components: role: type: integer enum: [1, 2] - description: "Your role: 1=[maker](/glossary#maker), 2=taker" + description: "Role: 1=[maker](/glossary#maker), 2=taker" price: type: string description: "Deal price" @@ -441,7 +441,7 @@ components: description: "Side: 1=sell, 2=buy/bid" - type: integer enum: [1, 2] - description: "Your role: 1=[maker](/glossary#maker), 2=taker" + description: "Role: 1=[maker](/glossary#maker), 2=taker" - type: string description: "Fee asset type" diff --git a/asyncapi/private/margin_positions_events.yaml b/asyncapi/private/margin_positions_events.yaml index 335444b..35341b3 100644 --- a/asyncapi/private/margin_positions_events.yaml +++ b/asyncapi/private/margin_positions_events.yaml @@ -4,7 +4,7 @@ info: version: 1.0.0 description: | Subscribe to margin positions events (margin call and liquidation events). - This endpoint does NOT support query operations - only subscribe/update/unsubscribe. + The channel does not support query operations — only subscribe, update, and unsubscribe. ## Event Types diff --git a/asyncapi/private/orders_executed.yaml b/asyncapi/private/orders_executed.yaml index 1cc2095..ab7a8fd 100644 --- a/asyncapi/private/orders_executed.yaml +++ b/asyncapi/private/orders_executed.yaml @@ -437,13 +437,13 @@ components: description: "[Stock](/glossary#stock) amount" left: type: string - description: "Stock amount that left to be executed" + description: "Stock amount remaining to be executed" deal_stock: type: string - description: "Stock amount that executed" + description: "Executed stock amount" deal_money: type: string - description: "[Money](/glossary#money) amount that executed" + description: "Executed [Money](/glossary#money) amount" deal_fee: type: string description: "Charged fee amount in money" diff --git a/asyncapi/private/orders_pending.yaml b/asyncapi/private/orders_pending.yaml index 7eb0da3..9d0d564 100644 --- a/asyncapi/private/orders_pending.yaml +++ b/asyncapi/private/orders_pending.yaml @@ -8,7 +8,7 @@ info: **Important**: [Market](/glossary#market) should exist. The maximum limit is 100. - **Note**: If new [order](/glossary#orders) instantly matches an order from [orderbook](/glossary#order-book), then you will receive only one message with update event ID equal to 3. + **Note**: If a new [order](/glossary#orders) instantly matches an order from the [orderbook](/glossary#order-book), only one message is received with update event ID equal to 3. ## Update Event IDs @@ -421,13 +421,13 @@ components: description: "[Stock](/glossary#stock) amount" left: type: string - description: "Stock amount that left to be executed" + description: "Stock amount remaining to be executed" deal_stock: type: string - description: "Stock amount that executed" + description: "Executed stock amount" deal_money: type: string - description: "[Money](/glossary#money) amount that executed" + description: "Executed [Money](/glossary#money) amount" deal_fee: type: string description: "Charged fee amount in money" diff --git a/asyncapi/private/positions.yaml b/asyncapi/private/positions.yaml index f1ff40f..7faaead 100644 --- a/asyncapi/private/positions.yaml +++ b/asyncapi/private/positions.yaml @@ -3,7 +3,7 @@ info: title: WhiteBit Positions version: 1.0.0 description: | - Subscribe to positions updates. This endpoint does NOT support query operations - only subscribe/update/unsubscribe. + Subscribe to positions updates. The channel does not support query operations — only subscribe, update, and unsubscribe. servers: production: @@ -243,7 +243,7 @@ components: description: "Date of position opening in Unix time" mtime: type: number - description: "Date of position modifying (this is date of current event) in Unix time" + description: "Date of position modification (the date of the current event) in Unix time" amount: type: string description: "Position amount" @@ -266,10 +266,10 @@ components: description: "Liquidation state. Possible values: null, margin_call" unrealized_funding: type: string - description: "Funding that will be paid on next position stage change (order, liquidation, etc)" + description: "Funding to be paid on the next position stage change (order, liquidation, etc)" funding: type: string - description: "Funding that has already been disbursed" + description: "Funding already disbursed" margin: type: string description: "Own funds amount in open position in **money**" diff --git a/asyncapi/public/depth.yaml b/asyncapi/public/depth.yaml index 8a2c134..d8fe02d 100644 --- a/asyncapi/public/depth.yaml +++ b/asyncapi/public/depth.yaml @@ -235,7 +235,7 @@ components: description: | Order book level tuple: - [0] Price level (string) - - [1] Available amount at this price (string) + - [1] Available amount at the price (string) minItems: 2 maxItems: 2 items: diff --git a/asyncapi/public/market.yaml b/asyncapi/public/market.yaml index 0a3468c..cdb3738 100644 --- a/asyncapi/public/market.yaml +++ b/asyncapi/public/market.yaml @@ -23,7 +23,7 @@ channels: **Update Interval**: 1 second (for subscriptions) - You can only subscribe for 86400s (24 hours from now). + Subscriptions support only 86400s (24 hours from now). messages: marketRequest: @@ -117,7 +117,7 @@ components: - period: Period in seconds (86400) - last: Last price (0.020981) - open: Open price at 'now - period' time (0.02035) - - close: Price that closes this period (0.020981) + - close: Closing price for the period (0.020981) - high: Highest price (0.020988) - low: Lowest price (0.020281) - volume: Volume in stock (135220.218) @@ -215,10 +215,10 @@ components: description: Last price open: type: string - description: "Open price that was at 'now - period' time" + description: "Open price at 'now - period' time" close: type: string - description: Price that closes this period + description: Closing price for the period high: type: string description: Highest price in the period diff --git a/asyncapi/public/trades.yaml b/asyncapi/public/trades.yaml index 5e8d765..9f96f89 100644 --- a/asyncapi/public/trades.yaml +++ b/asyncapi/public/trades.yaml @@ -23,7 +23,7 @@ channels: **Update Interval**: Real-time - For each WebSocket connection, you can subscribe to either specific markets or all markets. **Every new subscription replaces the existing one.** + For each WebSocket connection, subscribe to either specific markets or all markets. **Every new subscription replaces the existing one.** diff --git a/changelog.mdx b/changelog.mdx index a3c0fa7..a143e90 100644 --- a/changelog.mdx +++ b/changelog.mdx @@ -1,7 +1,7 @@ --- title: "WhiteBIT API Changelog" sidebarTitle: "Changelog" -description: "Track all updates, improvements, and fixes to the WhiteBIT API Platform. This page documents both upcoming and previous changes to help you stay informed about our platform's evolution." +description: "Track all updates, improvements, and fixes to the WhiteBIT API Platform. This page documents both upcoming and previous changes to keep readers informed about platform evolution." --- ## Previous Changes @@ -109,7 +109,7 @@ WebSocket events now include `event_time` and `update_id` fields. The `event_tim **Hedge mode support** -The Hedge mode is now available for all users. This mode allows you to hold both long and short positions in the same asset simultaneously, providing greater flexibility in managing your trades. +The Hedge mode is now available for all users. This mode allows holding both long and short positions in the same asset simultaneously, providing greater flexibility in managing trades. @@ -126,7 +126,7 @@ The Hedge mode is now available for all users. This mode allows you to hold both **Queries Limited to the Last 6 Months** -To enhance performance and focus on the most relevant data, our API limits data queries to the past 6 months. This means you will be able to retrieve data up to six months old from the current date. +To enhance performance and focus on the most relevant data, the API limits data queries to the past 6 months. Data can be retrieved up to six months old from the current date. diff --git a/glossary.mdx b/glossary.mdx index ce8cb87..4727bbc 100644 --- a/glossary.mdx +++ b/glossary.mdx @@ -55,7 +55,7 @@ Buy [order](#orders). -A unique identifier for a user's card, used to facilitate payments and manage subscriptions without exposing the actual card information. +A unique identifier for a card, used to facilitate payments and manage subscriptions without exposing the actual card information. diff --git a/guides/client-order-id.mdx b/guides/client-order-id.mdx index 73a538d..c5ce6d0 100644 --- a/guides/client-order-id.mdx +++ b/guides/client-order-id.mdx @@ -1,11 +1,11 @@ --- title: "Client Order ID" -description: "This guide provides information about using `clientOrderId` in your trading operations, including best practices and common use cases." +description: "This guide provides information about using `clientOrderId` in trading operations, including best practices and common use cases." --- ## Overview -The `clientOrderId` is an optional identifier that allows you to track and manage your orders with your own custom identifiers. It provides an additional layer of order management and tracking capabilities alongside the exchange-provided `orderId`. +The `clientOrderId` is an optional identifier for tracking and managing orders with custom identifiers. It provides an additional layer of order management and tracking capabilities alongside the exchange-provided `orderId`. ## Specifications @@ -172,7 +172,7 @@ const otoOrderRequest = { -You can track orders using `clientOrderId` through the following endpoints: +Track orders using `clientOrderId` through the following endpoints: **1. Query Active Orders** @@ -255,7 +255,7 @@ const cancelOrderRequest = { **Important notes about order cancellation:** - Cancellation by `clientOrderId` takes priority over `orderId` -- You can use either `orderId` or `clientOrderId`, but not both in the same request +- Use either `orderId` or `clientOrderId`, but not both in the same request ```json // Example response @@ -329,7 +329,7 @@ Example: `brk-ind123-limit-spot-1678234567` **Components:** - `brk`: Broker identifier prefix -- `clientId`: Your internal client identifier +- `clientId`: Internal client identifier - `orderType`: Order type (market/limit) - `purpose`: Trading purpose/strategy - `timestamp`: Ensures 24-hour uniqueness diff --git a/guides/fireblocks.mdx b/guides/fireblocks.mdx index a2577ab..21d78e3 100644 --- a/guides/fireblocks.mdx +++ b/guides/fireblocks.mdx @@ -1,6 +1,6 @@ --- title: "Fireblocks" -description: "Step-by-step guide to connect your WhiteBIT account to Fireblocks Network for secure digital asset transfers." +description: "Step-by-step guide to connect a WhiteBIT account to Fireblocks Network for secure digital asset transfers." --- import { RegionBaseUrl } from '/components/RegionBaseUrl.jsx'; @@ -12,24 +12,24 @@ import { RegionBaseUrl } from '/components/RegionBaseUrl.jsx'; The Fireblocks Network is a secure transfer system enabling immediate discovery, connection, and transfer of digital assets among exchanges, fiat providers, liquidity partners, and counterparties. -To successfully connect your WhiteBIT account to Fireblocks, you must generate a unique API key and an API secret. These are the credentials required to use an API Hook. +To connect a WhiteBIT account to Fireblocks, generate a unique API key and an API secret. These are the credentials required to use an API Hook. -The standard WhiteBIT API key is unsuitable for Fireblocks integration. You must generate a specific Fireblocks API key following the instructions below. +The standard WhiteBIT API key is unsuitable for Fireblocks integration. Generate a specific Fireblocks API key following the instructions below. --- ## Generate Fireblocks API Key -Follow these steps to generate your Fireblocks API key in WhiteBIT: +Follow these steps to generate a Fireblocks API key in WhiteBIT: ### Step 1: Navigate to API Integrations - Enter your WhiteBIT account and find the "API" page in the account settings. + Log in to WhiteBIT and open the "API" page in the account settings. @@ -51,7 +51,7 @@ Follow these steps to generate your Fireblocks API key in WhiteBIT: - Two-factor authentication (2FA) confirmation is required to complete the key generation process. Enter the 2FA code from your Authenticator app. + Two-factor authentication (2FA) confirmation is required to complete the key generation process. Enter the 2FA code from the Authenticator app. @@ -60,12 +60,12 @@ Follow these steps to generate your Fireblocks API key in WhiteBIT: -Make sure you have 2FA enabled on your account before proceeding with API key generation. +Enable 2FA on the account before proceeding with API key generation. --- -### Step 3: Save Your Credentials +### Step 3: Save credentials After successfully entering 2FA, the system will automatically generate a unique API key and API secret. @@ -76,25 +76,25 @@ After successfully entering 2FA, the system will automatically generate a unique **Important Security Notice:** -The API secret will only be visible once. Safely store the generated API secret immediately to ensure your data's security. If you lose the API secret, you will need to generate a new API key. +The API secret will only be visible once. Store the generated API secret immediately in a secure location. If the API secret is lost, generate a new API key. - Your unique API key identifier that can be viewed anytime + Unique API key identifier viewable anytime - Your private secret key - only shown once during generation + Private secret key - only shown once during generation --- -### Step 4: Name Your API Key +### Step 4: Name the API key - Give a descriptive name to the API key you just generated. This helps you identify the key's purpose later. + Give a descriptive name to the API key. This helps identify the key's purpose later. @@ -113,7 +113,7 @@ The API secret will only be visible once. Safely store the generated API secret **Key Generation Limit:** -The Fireblocks system allows you to generate a maximum of **one API key** for your account. Plan accordingly and store your credentials securely. +The Fireblocks system allows generating a maximum of **one API key** per account. Plan accordingly and store credentials securely. --- @@ -122,7 +122,7 @@ The Fireblocks system allows you to generate a maximum of **one API key** for yo -To connect your WhiteBIT account to Fireblocks: +To connect a WhiteBIT account to Fireblocks: @@ -130,15 +130,15 @@ To connect your WhiteBIT account to Fireblocks: - Confirm the operation with the 2FA code from your Authenticator app + Confirm the operation with the 2FA code from the Authenticator app The system will automatically generate an API key and an API secret. Keep track of both the API key and the API secret - - Give a title to the key you just generated + + Give a title to the generated key @@ -147,7 +147,7 @@ To connect your WhiteBIT account to Fireblocks: -Remember: You can generate only one key for your account. +Remember: Only one key can be generated per account. @@ -158,7 +158,7 @@ Remember: You can generate only one key for your account. - Store your API secret in a secure password manager or encrypted vault + Store the API secret in a secure password manager or encrypted vault @@ -170,7 +170,7 @@ Remember: You can generate only one key for your account. - Keep secure backups of your credentials in multiple safe locations + Keep secure backups of credentials in multiple safe locations @@ -178,11 +178,11 @@ Remember: You can generate only one key for your account. ## Next Steps - + -Once you have successfully generated and saved your Fireblocks API key and secret, you can proceed to: +After generating and saving the Fireblocks API key and secret, proceed to: -1. Configure your Fireblocks account with the WhiteBIT credentials +1. Configure the Fireblocks account with the WhiteBIT credentials 2. Set up transfer policies and workflows 3. Begin transferring digital assets securely diff --git a/guides/order-parameter-rules.mdx b/guides/order-parameter-rules.mdx index ff5fe89..616a330 100644 --- a/guides/order-parameter-rules.mdx +++ b/guides/order-parameter-rules.mdx @@ -4,7 +4,7 @@ description: "Defines unsupported parameter combinations for order requests and --- ## Overview -This guide describes parameter combinations that the API does not support and explains how to resolve related errors. +The guide describes parameter combinations the API does not support and explains how to resolve related errors. --- diff --git a/index.mdx b/index.mdx index f5c219d..03be1d9 100644 --- a/index.mdx +++ b/index.mdx @@ -11,7 +11,7 @@ import {ApiMonitorTable} from '/snippets/api-monitor.jsx';

- Access the global cryptocurrency market with WhiteBIT's comprehensive trading APIs. Build powerful trading applications with our developer-friendly tools. + Access the global cryptocurrency market with WhiteBIT's comprehensive trading APIs. Build powerful trading applications with developer-friendly tools.

@@ -37,7 +37,7 @@ import {ApiMonitorTable} from '/snippets/api-monitor.jsx';
-

Watch our high-performance API handle thousands of trading operations in real-time. From market orders to advanced trading strategies, see the full spectrum of what's possible.

+

Watch the high-performance API handle thousands of trading operations in real-time. From market orders to advanced trading strategies, see the full spectrum of what's possible.

@@ -47,11 +47,11 @@ import {ApiMonitorTable} from '/snippets/api-monitor.jsx';
-Everything You Need +Everything for developers

- Build powerful trading applications with our comprehensive suite of APIs and tools + Build powerful trading applications with a comprehensive suite of APIs and tools

@@ -78,7 +78,7 @@ Full access to spot trading, margin trading, and futures markets with high-perfo Comprehensive SDKs, detailed documentation, and code examples to accelerate - your development process. + the development process. @@ -101,7 +101,7 @@ Ready to Get Started? Join thousands of developers building with WhiteBIT's API platform

diff --git a/openapi/oauth2.yaml b/openapi/oauth2.yaml index 3ddf3b3..5a9e1c6 100644 --- a/openapi/oauth2.yaml +++ b/openapi/oauth2.yaml @@ -14,14 +14,14 @@ paths: get: summary: OAuth 2.0 Authorization description: | - This endpoint initiates the OAuth 2.0 authorization flow for user authentication and obtaining an authorization code. + The endpoint initiates the OAuth 2.0 authorization flow for user authentication and obtaining an authorization code. **Using the State Parameter (Best Practice)** The `state` parameter is crucial for security in OAuth flows: - Generate a cryptographically secure random string - - Store it in the user's session before redirecting + - Store it in the session before redirecting - Validate it matches when handling the callback - This prevents CSRF attacks @@ -33,7 +33,7 @@ paths: - name: clientId in: query required: true - description: Your application's client ID + description: The application's client ID schema: type: string example: YOUR_CLIENT_ID @@ -52,7 +52,7 @@ paths: post: summary: Get Access Token description: | - This endpoint activates an access token by exchanging an authorization code. + The endpoint activates an access token by exchanging an authorization code. **Important Notes:** @@ -79,11 +79,11 @@ paths: properties: client_id: type: string - description: Your application's client ID + description: The application's client ID example: YOUR_CLIENT_ID client_secret: type: string - description: Your application's client secret + description: The application's client secret example: YOUR_CLIENT_SECRET code: type: string @@ -197,11 +197,11 @@ paths: properties: client_id: type: string - description: Your application's client ID + description: The application's client ID example: YOUR_CLIENT_ID client_secret: type: string - description: Your application's client secret + description: The application's client secret example: YOUR_CLIENT_SECRET token: type: string diff --git a/openapi/private/http-trade-v1.yaml b/openapi/private/http-trade-v1.yaml index 1b72f66..ebf910e 100644 --- a/openapi/private/http-trade-v1.yaml +++ b/openapi/private/http-trade-v1.yaml @@ -6,7 +6,7 @@ info: **DEPRECATED:** These endpoints are deprecated. Use [V4 alternatives](/private/http-trade-v4/overview) instead. Private endpoints for trading operations including balance management and order execution. **Authentication:** All endpoints require API key authentication with headers: - - X-TXC-APIKEY: Your API key + - X-TXC-APIKEY: The API key - X-TXC-PAYLOAD: Base64-encoded JSON payload - X-TXC-SIGNATURE: HMAC SHA512 signature @@ -24,13 +24,13 @@ paths: post: summary: Trading balance by currency description: | - **DEPRECATED:** This endpoint is deprecated. Use [V4 endpoint](/private/http-trade-v4/trading-balance) instead. - This endpoint retrieves the trade balance by currency ticker. + **DEPRECATED:** The endpoint is deprecated. Use [V4 endpoint](/private/http-trade-v4/trading-balance) instead. + The endpoint retrieves the trade balance by currency ticker. Rate limit: 1000 requests/10 sec. - **Response Cache:** NONE + **Response Cache:** The API does not cache the response. operationId: tradingBalanceByCurrency deprecated: true requestBody: @@ -85,13 +85,13 @@ paths: post: summary: Trading balances description: | - **DEPRECATED:** This endpoint is deprecated. Use [V4 endpoint](/private/http-trade-v4/trading-balance) instead. - This endpoint retrieves all available balances for trading. + **DEPRECATED:** The endpoint is deprecated. Use [V4 endpoint](/private/http-trade-v4/trading-balance) instead. + The endpoint retrieves all available balances for trading. Rate limit: 1000 requests/10 sec. - **Response Cache:** NONE + **Response Cache:** The API does not cache the response. operationId: tradingBalances deprecated: true requestBody: @@ -144,13 +144,13 @@ paths: post: summary: Create limit order description: | - **DEPRECATED:** This endpoint is deprecated. Use [V4 endpoint](/private/http-trade-v4/create-limit-order) instead. - This endpoint creates limit trading order. + **DEPRECATED:** The endpoint is deprecated. Use [V4 endpoint](/private/http-trade-v4/create-limit-order) instead. + The endpoint creates limit trading order. Rate limit: 1000 requests/10 sec. - **Response Cache:** NONE + **Response Cache:** The API does not cache the response. operationId: createLimitOrder deprecated: true requestBody: @@ -216,13 +216,13 @@ paths: post: summary: Cancel order description: | - **DEPRECATED:** This endpoint is deprecated. Use [V4 endpoint](/private/http-trade-v4/cancel-order) instead. - This endpoint cancels the existing order. + **DEPRECATED:** The endpoint is deprecated. Use [V4 endpoint](/private/http-trade-v4/cancel-order) instead. + The endpoint cancels the existing order. Rate limit: 1000 requests/10 sec. - **Response Cache:** NONE + **Response Cache:** The API does not cache the response. operationId: cancelOrder deprecated: true requestBody: @@ -270,13 +270,13 @@ paths: post: summary: Query unexecuted(active) orders description: | - **DEPRECATED:** This endpoint is deprecated. Use [V4 endpoint](/private/http-trade-v4/query-unexecuted-orders) instead. - This endpoint retrieves unexecuted orders only. + **DEPRECATED:** The endpoint is deprecated. Use [V4 endpoint](/private/http-trade-v4/query-unexecuted-orders) instead. + The endpoint retrieves unexecuted orders only. Rate limit: 1000 requests/10 sec. - **Response Cache:** NONE + **Response Cache:** The API does not cache the response. operationId: queryUnexecutedOrders deprecated: true requestBody: @@ -301,7 +301,7 @@ paths: example: 100 offset: type: integer - description: "If you want the request to return entries starting from a particular line, you can use OFFSET clause to tell it where it should start. Default: 0, Min: 0, Max: 10000" + description: "Use OFFSET to specify where the response entries start. Default: 0, Min: 0, Max: 10000" default: 0 minimum: 0 maximum: 10000 @@ -336,14 +336,14 @@ paths: post: summary: Query order history description: | - **DEPRECATED:** This endpoint is deprecated. Use [V4 endpoint](/private/http-trade-v4/query-executed-orders) instead. - This endpoint retrieves orders history sorted by all markets. + **DEPRECATED:** The endpoint is deprecated. Use [V4 endpoint](/private/http-trade-v4/query-executed-orders) instead. + The endpoint retrieves orders history sorted by all markets. Rate limit: 1000 requests/10 sec. - **Note:** This method can retrieve data not older than 6 months from current month. If you need older data - you can use Report on the History page in your account. - **Response Cache:** NONE + **Note:** This method can retrieve data not older than 6 months from the current month. For older data, use Report on the History page in the account. + **Response Cache:** The API does not cache the response. operationId: queryOrderHistory deprecated: true requestBody: @@ -366,7 +366,7 @@ paths: example: 100 offset: type: integer - description: "If you want the request to return entries starting from a particular line, you can use OFFSET clause to tell it where it should start. Default: 0, Min: 0, Max: 10000" + description: "Use OFFSET to specify where the response entries start. Default: 0, Min: 0, Max: 10000" default: 0 minimum: 0 maximum: 10000 @@ -425,14 +425,14 @@ paths: post: summary: Query executed order history by single market description: | - **DEPRECATED:** This endpoint is deprecated. Use [V4 endpoint](/private/http-trade-v4/query-executed-order-history) instead. - This endpoint retrieves deals history sorted by single market. + **DEPRECATED:** The endpoint is deprecated. Use [V4 endpoint](/private/http-trade-v4/query-executed-order-history) instead. + The endpoint retrieves deals history sorted by single market. Rate limit: 1000 requests/10 sec. - **Note:** This method can retrieve data not older than 6 months from current month. If you need older data - you can use Report on the History page in your account. - **Response Cache:** NONE + **Note:** This method can retrieve data not older than 6 months from the current month. For older data, use Report on the History page in the account. + **Response Cache:** The API does not cache the response. operationId: queryExecutedHistorySingleMarket deprecated: true requestBody: @@ -457,7 +457,7 @@ paths: example: 100 offset: type: integer - description: "If you want the request to return entries starting from a particular line, you can use OFFSET clause to tell it where it should start. Default: 0, Min: 0, Max: 10000" + description: "Use OFFSET to specify where the response entries start. Default: 0, Min: 0, Max: 10000" default: 0 minimum: 0 maximum: 10000 @@ -515,14 +515,14 @@ paths: post: summary: Query executed order history by all markets description: | - **DEPRECATED:** This endpoint is deprecated. Use [V4 endpoint](/private/http-trade-v4/query-executed-order-history) instead. - This endpoint retrieves orders history sorted by all markets. + **DEPRECATED:** The endpoint is deprecated. Use [V4 endpoint](/private/http-trade-v4/query-executed-order-history) instead. + The endpoint retrieves orders history sorted by all markets. Rate limit: 1000 requests/10 sec. - **Note:** This method can retrieve data not older than 6 months from current month. If you need older data - you can use Report on the History page in your account. - **Response Cache:** NONE + **Note:** This method can retrieve data not older than 6 months from the current month. For older data, use Report on the History page in the account. + **Response Cache:** The API does not cache the response. operationId: queryExecutedHistoryAllMarkets deprecated: true requestBody: @@ -541,7 +541,7 @@ paths: example: 100 offset: type: integer - description: "If you want the request to return entries starting from a particular line, you can use OFFSET clause to tell it where it should start. Default: 0, Min: 0, Max: 10000" + description: "Use OFFSET to specify where the response entries start. Default: 0, Min: 0, Max: 10000" default: 0 minimum: 0 maximum: 10000 @@ -600,13 +600,13 @@ paths: post: summary: Query executed order deals description: | - **DEPRECATED:** This endpoint is deprecated. Use [V4 endpoint](/private/http-trade-v4/query-executed-order-deals) instead. - This endpoint retrieves more details on order deals history. + **DEPRECATED:** The endpoint is deprecated. Use [V4 endpoint](/private/http-trade-v4/query-executed-order-deals) instead. + The endpoint retrieves more details on order deals history. Rate limit: 1000 requests/10 sec. - **Response Cache:** NONE + **Response Cache:** The API does not cache the response. operationId: queryExecutedOrderDeals deprecated: true requestBody: @@ -631,7 +631,7 @@ paths: example: 100 offset: type: integer - description: "If you want the request to return entries starting from a particular line, you can use OFFSET clause to tell it where it should start. Default: 0, Min: 0, Max: 10000" + description: "Use OFFSET to specify where the response entries start. Default: 0, Min: 0, Max: 10000" default: 0 minimum: 0 maximum: 10000 @@ -739,7 +739,7 @@ components: name: X-TXC-APIKEY description: | API key authentication requires three headers: - - X-TXC-APIKEY: Your API key + - X-TXC-APIKEY: The API key - X-TXC-PAYLOAD: Base64-encoded JSON payload - X-TXC-SIGNATURE: HMAC SHA512 signature of the payload @@ -798,7 +798,7 @@ components: example: "0.001" dealFee: type: string - description: "fee in money that you pay if order is finished" + description: "fee in money paid when the order is finished" example: "0" price: type: string @@ -851,7 +851,7 @@ components: example: "0.001" dealFee: type: string - description: "executed order fee that user pay" + description: "executed order fee paid" example: "0" dealStock: type: string @@ -908,7 +908,7 @@ components: example: "0.70407996" fee: type: string - description: "fee that you pay" + description: "fee paid" example: "0.00070407996" ErrorResponseV1: diff --git a/openapi/private/http-trade-v4.yaml b/openapi/private/http-trade-v4.yaml index 28ec22a..484b439 100644 --- a/openapi/private/http-trade-v4.yaml +++ b/openapi/private/http-trade-v4.yaml @@ -23,10 +23,10 @@ paths: post: summary: Collateral Account Balance description: | - This endpoint returns a current [collateral balance](/glossary#balance-collateral). + The endpoint returns a current [collateral balance](/glossary#balance-collateral). - Response is cached for: NONE + The API does not cache the response. @@ -96,10 +96,10 @@ paths: post: summary: Collateral Account Balance Summary description: | - This endpoint retrieves collateral account balance summary with detailed breakdown per asset. + The endpoint retrieves collateral account balance summary with detailed breakdown per asset. - Response is cached for: NONE + The API does not cache the response. @@ -195,14 +195,14 @@ paths: post: summary: Collateral Limit Order description: | - This endpoint creates [limit order](/glossary#limit-order) using [collateral balance](/glossary#balance-collateral). + The endpoint creates [limit order](/glossary#limit-order) using [collateral balance](/glossary#balance-collateral). Rate limit: 10000 requests/10 sec. - For open long position you have to use **buy**, for short **sell**. Also to close current position you have to place opposite order with current position amount. + For open long position use **buy**, for short **sell**. To close current position, place opposite order with current position amount. @@ -301,7 +301,7 @@ paths: post: summary: Collateral bulk limit order description: | - This endpoint creates multiple collateral limit orders. + The endpoint creates multiple collateral limit orders. Rate limit: 10000 requests/10 sec. @@ -407,7 +407,7 @@ paths: post: summary: Collateral Market Order description: | - This endpoint creates a collateral market order. + The endpoint creates a collateral market order. Rate limit: 10000 requests/10 sec. @@ -465,7 +465,7 @@ paths: post: summary: Collateral Stop-Limit Order description: | - This endpoint creates a collateral stop-limit order. + The endpoint creates a collateral stop-limit order. Rate limit: 10000 requests/10 sec. @@ -535,7 +535,7 @@ paths: post: summary: Collateral Trigger Market Order description: | - This endpoint creates a collateral trigger market order. + The endpoint creates a collateral trigger market order. Rate limit: 10000 requests/10 sec. @@ -596,7 +596,7 @@ paths: post: summary: Collateral Account Summary description: | - This endpoint retrieves collateral account summary. + The endpoint retrieves collateral account summary. Rate limit: 12000 requests/10 sec. @@ -626,7 +626,7 @@ paths: post: summary: Open Positions description: | - This endpoint retrieves open positions. + The endpoint retrieves open positions. Rate limit: 12000 requests/10 sec. @@ -664,7 +664,7 @@ paths: post: summary: Close Position description: | - This endpoint closes a position. + The endpoint closes a position. Rate limit: 10000 requests/10 sec. @@ -720,7 +720,7 @@ paths: post: summary: Positions History description: | - This endpoint retrieves positions history. + The endpoint retrieves positions history. Rate limit: 12000 requests/10 sec. @@ -768,7 +768,7 @@ paths: post: summary: Funding History description: | - This endpoint retrieves funding history. + The endpoint retrieves funding history. Rate limit: 12000 requests/10 sec. @@ -806,7 +806,7 @@ paths: post: summary: Change Collateral Account Leverage description: | - This endpoint changes account leverage. + The endpoint changes account leverage. Rate limit: 1000 requests/10 sec. @@ -850,7 +850,7 @@ paths: post: summary: Collateral Account Hedge Mode description: | - This endpoint retrieves hedge mode status. + The endpoint retrieves hedge mode status. Rate limit: 12000 requests/10 sec. @@ -882,7 +882,7 @@ paths: post: summary: Update Collateral Account Hedge Mode description: | - This endpoint updates hedge mode. + The endpoint updates hedge mode. Rate limit: 1000 requests/10 sec. @@ -926,7 +926,7 @@ paths: post: summary: Query unexecuted(active) conditional orders description: | - This endpoint retrieves active conditional orders. + The endpoint retrieves active conditional orders. Rate limit: 12000 requests/10 sec. @@ -976,7 +976,7 @@ paths: post: summary: Query unexecuted(active) OCO orders description: | - This endpoint retrieves active OCO orders. + The endpoint retrieves active OCO orders. Rate limit: 12000 requests/10 sec. @@ -1026,7 +1026,7 @@ paths: post: summary: Create collateral OCO order description: | - This endpoint creates a collateral OCO order. + The endpoint creates a collateral OCO order. Rate limit: 10000 requests/10 sec. @@ -1092,7 +1092,7 @@ paths: post: summary: Cancel conditional order description: | - This endpoint cancels a conditional order. + The endpoint cancels a conditional order. Rate limit: 10000 requests/10 sec. @@ -1143,7 +1143,7 @@ paths: post: summary: Cancel OCO order description: | - This endpoint cancels an OCO order. + The endpoint cancels an OCO order. Rate limit: 10000 requests/10 sec. @@ -1194,7 +1194,7 @@ paths: post: summary: Cancel OTO order description: | - This endpoint cancels an OTO order. + The endpoint cancels an OTO order. Rate limit: 10000 requests/10 sec. @@ -1245,7 +1245,7 @@ paths: post: summary: Convert Estimate description: | - This endpoint creates a quote for converting one currency to another. Quote lifetime is 10 seconds, then quote will be expired. + The endpoint creates a quote for converting one currency to another. Quote lifetime is 10 seconds, then quote will be expired. Rate limit: 10000 requests/10 sec. @@ -1288,14 +1288,14 @@ paths: description: "Request path" examples: estimateReceive: - summary: "I would like to estimate convert of BTC to receive 35,103.1 USDT" + summary: "Estimate convert of BTC to receive 35,103.1 USDT" value: amount: "35,103.1" direction: "to" from: "BTC" to: "USDT" estimateGive: - summary: "I would like to estimate convert of 1 BTC to USDT" + summary: "Estimate convert of 1 BTC to USDT" value: amount: "1" direction: "from" @@ -1376,7 +1376,7 @@ paths: post: summary: Convert Confirm description: | - This endpoint confirms an estimated quote. + The endpoint confirms an estimated quote. Rate limit: 10000 requests/10 sec. @@ -1444,12 +1444,12 @@ paths: post: summary: Convert History description: | - This endpoint returns convert history. + The endpoint returns convert history. Rate limit: 10000 requests/10 sec. - **Note:** This method can retrieve data not older than 6 months from current month. If you need older data - you can use Report on the History page in your account. + **Note:** The endpoint can retrieve data not older than 6 months from current month. For older data, use the Report on the History page. operationId: convertHistory requestBody: required: true @@ -1687,11 +1687,11 @@ paths: example: "0.1" futures_taker: type: string - description: "Futures taker fee rate (default or custom if set by user)" + description: "Futures taker fee rate (default or custom if assigned)" example: "0.0002" futures_maker: type: string - description: "Futures maker fee rate (default or custom if set by user)" + description: "Futures maker fee rate (default or custom if assigned)" example: "0.0001" custom_fee: type: object @@ -1717,7 +1717,7 @@ paths: post: summary: Trading Balance description: | - This endpoint retrieves the [trade balance](/glossary#balance-spotbalance-trade) by currency [ticker](/glossary#ticker) or all balances. + The endpoint retrieves the [trade balance](/glossary#balance-spotbalance-trade) by currency [ticker](/glossary#ticker) or all balances. Rate limit: 12000 requests/10 sec. @@ -1817,7 +1817,7 @@ paths: post: summary: Create Limit Order description: | - This endpoint creates [limit trading order](/glossary#limit-order). + The endpoint creates [limit trading order](/glossary#limit-order). Rate limit: 10000 requests/10 sec. @@ -1930,7 +1930,7 @@ paths: "message": "Validation failed", "errors": { "clientOrderId": [ - "ClientOrderId field field should contain only latin letters, numbers and dashes." + "ClientOrderId field should contain only latin letters, numbers and dashes." ] } } @@ -1963,7 +1963,7 @@ paths: "code": 30, "message": "Validation failed", "errors": { - "total": ["Total(amount * price) is less than 5.05"] + "total": ["Total (amount * price) is less than 5.05"] } } ``` @@ -2046,7 +2046,7 @@ paths: post: summary: Bulk limit order description: | - This endpoint creates bulk [limit trading orders](/glossary#limit-order). + The endpoint creates bulk [limit trading orders](/glossary#limit-order). Limit: From 1 to 20 orders per request. @@ -2175,7 +2175,7 @@ paths: post: summary: Create market order description: | - This endpoint creates [market trading order](/glossary#market-order). + The endpoint creates [market trading order](/glossary#market-order). Rate limit: 10000 requests/10 sec. @@ -2280,7 +2280,7 @@ paths: "message": "Validation failed", "errors": { "clientOrderId": [ - "ClientOrderId field field should contain only latin letters, numbers and dashes." + "ClientOrderId field should contain only latin letters, numbers and dashes." ] } } @@ -2322,7 +2322,7 @@ paths: post: summary: Create buy stock market order description: | - This endpoint creates buy [stock](/glossary#stock) market trading [order](/glossary#orders). + The endpoint creates buy [stock](/glossary#stock) market trading [order](/glossary#orders). Rate limit: 10000 requests/10 sec. @@ -2457,7 +2457,7 @@ paths: post: summary: Create stop-limit order description: | - This endpoint creates [stop-limit trading order](/glossary#stop-limit-order). + The endpoint creates [stop-limit trading order](/glossary#stop-limit-order). Rate limit: 10000 requests/10 sec. @@ -2564,7 +2564,7 @@ paths: "code": 30, "message": "Validation failed", "errors": { - "total": ["Total(amount * price) is less than 5.05"] + "total": ["Total (amount * price) is less than 5.05"] } } ``` @@ -2585,7 +2585,7 @@ paths: "message": "Validation failed", "errors": { "clientOrderId": [ - "ClientOrderId field field should contain only latin letters, numbers and dashes." + "ClientOrderId field should contain only latin letters, numbers and dashes." ] } } @@ -2627,7 +2627,7 @@ paths: post: summary: Create stop-market order description: | - This endpoint creates [stop-market trading order](/glossary#stop-market-order). + The endpoint creates [stop-market trading order](/glossary#stop-market-order). Rate limit: 10000 requests/10 sec. @@ -2733,7 +2733,7 @@ paths: "message": "Validation failed", "errors": { "clientOrderId": [ - "ClientOrderId field field should contain only latin letters, numbers and dashes." + "ClientOrderId field should contain only latin letters, numbers and dashes." ] } } @@ -2800,7 +2800,7 @@ paths: - Modification by clientOrderId takes priority over orderId. - The request supports working only with orderId or only with clientOrderId. - - You cannot pass both values at the same time. + - Do not pass both values at the same time. @@ -3021,7 +3021,7 @@ paths: post: summary: Query unexecuted(active) orders description: | - This endpoint retrieves [active orders](/glossary#active-orders) (orders not yet executed). + The endpoint retrieves [active orders](/glossary#active-orders) (orders not yet executed). Rate limit: 12000 requests/10 sec. @@ -3077,7 +3077,7 @@ paths: offset: type: integer default: 0 - description: "If you want the request to return entries starting from a particular line, you can use OFFSET clause to tell it where it should start. Default: 0, Min: 0" + description: "Starting line index (OFFSET). Default: 0, Min: 0" limit: type: integer default: 50 @@ -3115,14 +3115,14 @@ paths: post: summary: Query executed order history description: | - This endpoint retrieves all deals for all markets. Can be filtered by single market if needed. + The endpoint retrieves all deals for all markets. Can be filtered by single market if needed. Rate limit: 12000 requests/10 sec. - This method can retrieve data not older than 6 months from current month. For older data, use the Report on the History page in your account. + The endpoint can retrieve data not older than 6 months from current month. For older data, use the Report on the History page. @@ -3173,7 +3173,7 @@ paths: offset: type: integer default: 0 - description: "If you want the request to return entries starting from a particular line, you can use OFFSET clause to tell it where it should start. Default: 0, Min: 0" + description: "Starting line index (OFFSET). Default: 0, Min: 0" limit: type: integer default: 50 @@ -3256,7 +3256,7 @@ paths: post: summary: Query executed order deals description: | - This endpoint retrieves deals for a specific order. + The endpoint retrieves deals for a specific order. Rate limit: 12000 requests/10 sec. @@ -3310,7 +3310,7 @@ paths: post: summary: Query executed orders description: | - This endpoint retrieves order history. + The endpoint retrieves order history. Rate limit: 12000 requests/10 sec. @@ -3360,7 +3360,7 @@ paths: post: summary: Modify order description: | - This endpoint modifies existing [order](/glossary#orders). + The endpoint modifies existing [order](/glossary#orders). Supported order types: limit, stop limit, stop market. @@ -3374,7 +3374,7 @@ paths: - Use total parameter instead of amount for modify buy stop market order. - Modification by clientOrderId takes priority. - The request supports working only with orderId or only with clientOrderId. - - You cannot pass both values at the same time. + - Do not pass both values at the same time. @@ -3480,7 +3480,7 @@ paths: post: summary: Sync kill-switch timer description: | - This endpoint creates, updates, deletes [kill-switch timer](/glossary#kill-switch-timer). + The endpoint creates, updates, deletes [kill-switch timer](/glossary#kill-switch-timer). Rate limit: 10000 requests/10 sec. @@ -3578,7 +3578,7 @@ paths: post: summary: Status kill-switch timer description: | - This endpoint retrieves the status of [kill-switch timer](/glossary#kill-switch-timer). + The endpoint retrieves the status of [kill-switch timer](/glossary#kill-switch-timer). Rate limit: 10000 requests/10 sec. @@ -3644,7 +3644,7 @@ components: API Key authentication for private endpoints. Required headers: - - X-TXC-APIKEY: Your API key + - X-TXC-APIKEY: API key - X-TXC-PAYLOAD: Base64 encoded JSON payload - X-TXC-SIGNATURE: HMAC SHA512 signature responses: @@ -3697,7 +3697,7 @@ components: bboRole: type: integer enum: [1, 2] - description: "When you activate the [BBO](/glossary#bbo) option when placing Limit orders, the system automatically selects the best market prices for executing these orders in one of two ways. Variables: 1 - Queue Method / 2 - Counterparty Method. You can use 2 method with ioc flag. Example: 2." + description: "When the [BBO](/glossary#bbo) option is activated for Limit orders, the system selects the best market prices for execution. Variables: 1 - Queue Method / 2 - Counterparty Method. Use method 2 with ioc flag. Example: 2." stp: type: string enum: [no, cancel_both, cancel_new, cancel_old] @@ -3786,7 +3786,7 @@ components: bboRole: type: integer enum: [1, 2] - description: "When you activate the [BBO](/glossary#bbo) option when placing Limit orders, the system automatically selects the best market prices for executing these orders in one of two ways. Variables: 1 - Queue Method / 2 - Counterparty Method." + description: "When the [BBO](/glossary#bbo) option is activated for Limit orders, the system selects the best market prices for execution. Variables: 1 - Queue Method / 2 - Counterparty Method." stp: type: string enum: [no, cancel_both, cancel_new, cancel_old] @@ -3901,7 +3901,7 @@ components: description: "If order not finished - rest of the amount that must be finished" dealFee: type: string - description: "Fee in money that you pay if order is finished" + description: "Fee in money currency when order is filled" price: type: string description: "Price" diff --git a/openapi/private/main_api_v4.yaml b/openapi/private/main_api_v4.yaml index de03fe3..480e430 100644 --- a/openapi/private/main_api_v4.yaml +++ b/openapi/private/main_api_v4.yaml @@ -59,14 +59,14 @@ paths: - Main Account summary: Get main balance description: | - This endpoint retrieves the [main balance](/glossary#balance-main) by currency [ticker](/glossary#ticker) or all balances. + The endpoint retrieves the [main balance](/glossary#balance-main) by currency [ticker](/glossary#ticker) or all balances. Rate limit: 1000 requests/10 sec. - Response is cached for: NONE + The API does not cache the response. operationId: getMainBalance requestBody: @@ -126,7 +126,7 @@ paths: - Deposit summary: Get cryptocurrency deposit address description: | - This endpoint retrieves a deposit address of the cryptocurrency. + The endpoint retrieves a deposit address of the cryptocurrency. ```json @@ -165,7 +165,7 @@ paths: - Response is cached for: NONE + The API does not cache the response. operationId: getDepositAddress @@ -183,12 +183,12 @@ paths: ticker: type: string description: | - Currencies ticker. Example: BTC ⚠️ Currency [ticker](/glossary#ticker) should not be [fiat](/glossary#fiat) and it’s “can_deposit” status must be “true”. You can find this status in [Asset Status endpoint](/public/http-v4/asset-status-list) response. + Currencies ticker. Example: BTC ⚠️ Currency [ticker](/glossary#ticker) should not be [fiat](/glossary#fiat) and it’s “can_deposit” status must be “true”. See [Asset Status endpoint](/public/http-v4/asset-status-list) response for the status. example: BTC network: type: string description: | - Cryptocurrency network. ⚠️ If currency has multiple networks like USDT - you need to specify network to be used. You can find [ticker](/glossary#ticker) networks list in “networks” field from response [Asset Status endpoint](/public/http-v4/asset-status-list). + Cryptocurrency network. ⚠️ If currency has multiple networks like USDT, specify the network to use. See [ticker](/glossary#ticker) networks list in “networks” field from response [Asset Status endpoint](/public/http-v4/asset-status-list). example: ERC20 request: type: string @@ -225,19 +225,19 @@ paths: properties: maxFee: type: string - description: Maximum fixed fee that you will pay + description: Maximum fixed fee charged minFee: type: string - description: Minimum fixed fee that you will pay + description: Minimum fixed fee charged percent: type: string - description: Percent of deposit that you will pay + description: Percent of deposit as fee maxAmount: type: string - description: Max amount of deposit that can be accepted by exchange - if you deposit more than that number, it won't be accepted by exchange + description: Max amount of deposit accepted by the exchange. Deposits exceeding this amount are rejected. minAmount: type: string - description: Min amount of deposit that can be accepted by exchange - if you will deposit less than that number, it won't be accepted by exchange + description: Min amount of deposit accepted by the exchange. Deposits below this amount are rejected. example: account: address: "GDTSOI56XNVAKJNJBLJGRNZIVOCIZJRBIDKTWSCYEYNFAZEMBLN75RMN" @@ -265,9 +265,9 @@ paths: - Deposit summary: Get fiat deposit address description: | - This endpoint retrieves a deposit url of the [fiat](/glossary#fiat) invoice. + The endpoint retrieves a deposit url of the [fiat](/glossary#fiat) invoice. - Please, pay attention that this endpoint works on demand. It means that you need to contact WhiteBIT support and provide your API key to get access to this functionality. + The endpoint works on demand. Contact WhiteBIT support and provide the API key to get access to the functionality. ```json @@ -368,7 +368,7 @@ paths: - If you have used VISAMASTER as [provider](/glossary#provider), you must pass [referer header](https://developer.mozilla.org/ru/docs/Web/HTTP/Headers/Referer) when you go to the invoice link (for example, pass referer header when you go to https://someaddress.com). Otherwise if there is no header (for example, you go to https://someaddress.com from Telegram message) you will be redirected to the WhiteBIT homepage + When using VISAMASTER as [provider](/glossary#provider), pass the [referer header](https://developer.mozilla.org/ru/docs/Web/HTTP/Headers/Referer) when opening the invoice link (e.g. when opening https://someaddress.com). If the header is missing (e.g. when opening the link from a Telegram message), the browser is redirected to the WhiteBIT homepage @@ -376,7 +376,7 @@ paths: - Response is cached for: NONE + The API does not cache the response. operationId: getFiatDepositUrl requestBody: @@ -538,11 +538,11 @@ paths: - JWT summary: Issue JWT token description: | - This endpoint issues a JWT token for the Fiat Gateway service. + The endpoint issues a JWT token for the Fiat Gateway service. The token is used to authenticate requests to the Fiat Gateway API. - Response is cached for: NONE + The API does not cache the response. operationId: issueJwtToken requestBody: @@ -629,7 +629,7 @@ paths: - JWT summary: Get WebSocket Token description: | - This V4 endpoint can be used to retrieve the WebSocket token for user. + The V4 endpoint can be used to retrieve the WebSocket token for user. The token is required to authorize WebSocket connections for private API access. @@ -637,7 +637,7 @@ paths: - Response is cached for: NONE + The API does not cache the response. operationId: getWebSocketToken requestBody: @@ -683,7 +683,7 @@ paths: - Deposit summary: Issue card token description: | - This endpoint issues a [card token](/glossary#card-token) for the specified card number. + The endpoint issues a [card token](/glossary#card-token) for the specified card number. **Request Headers:** - `Authorization`: JWT token from the [Issue JWT token](/private/http-main-v4/issue-jwt-token) response field `data.token` (**Required**) @@ -696,7 +696,7 @@ paths: - Response is cached for: NONE + The API does not cache the response. operationId: issueCardToken servers: @@ -784,7 +784,7 @@ paths: - Response is cached for: NONE + The API does not cache the response. @@ -856,14 +856,14 @@ paths: - Withdraw summary: Create withdraw request description: | - This endpoint creates withdraw for the specified ticker. + The endpoint creates withdraw for the specified ticker. Rate limit: 1000 requests/10 sec. - Response is cached for: NONE + The API does not cache the response. @@ -894,7 +894,7 @@ paths: amount: type: string description: | - Withdraw amount (including [fee](/glossary#fee)). If you want fee to be added to the specified amount, you need to use /main-account/withdraw-pay request. + Withdraw amount (including [fee](/glossary#fee)). To add the fee to the specified amount, use the /main-account/withdraw-pay request. example: "0.9" address: type: string @@ -911,7 +911,7 @@ paths: description: | Unique transaction identifier. - ⚠️ Note that you should generate new unique id for each withdrawal request. + ⚠️ Generate a new unique ID for each withdrawal request. example: "24529041" provider: type: string @@ -928,7 +928,7 @@ paths: example: ERC20 partialEnable: type: boolean - description: Optional parameter for [FIAT](/glossary#fiat) withdrawals with increased Maximum Limit if set as "true". In order to use this parameter your application should support "Partially successful" withdrawal status and latest updates in deposit/withdrawal history. + description: Optional parameter for [FIAT](/glossary#fiat) withdrawals with increased Maximum Limit if set as "true". To use this parameter, the application must support "Partially successful" withdrawal status and latest updates in deposit/withdrawal history. beneficiary: type: object description: | @@ -1116,7 +1116,7 @@ paths: nonce: "{{nonce}}" responses: "201": - description: Validation succeeded and withdraw creation process is started. Go to deposit/withdraw history and check your request status by uniqueId. + description: Validation succeeded and withdraw creation process is started. Check the request status by uniqueId in deposit/withdraw history. content: application/json: schema: @@ -1249,18 +1249,18 @@ paths: - Withdraw summary: Create withdraw request with specific withdraw amount (fee not included) description: | - This endpoint has the similar logic as /main-account/withdraw, but with the only difference: amount that is specified will not include [fee](/glossary#fee) (it will be calculated to make target withdraw amount equal to the specified amount). + The endpoint has the similar logic as /main-account/withdraw, but with the only difference: amount that is specified will not include [fee](/glossary#fee) (it will be calculated to make target withdraw amount equal to the specified amount). **Example:** - - When you create base withdraw and set amount = 100 USD, receiver will receive 100 USD - [fee](/glossary#fee) amount, and your balance will decrease by 100 USD. - - When you use this endpoint and set amount = 100 USD, receiver will receive 100 USD, and your balance will decrease by 100 USD + [fee](/glossary#fee) amount. + - When creating a base withdraw with amount = 100 USD, the receiver receives 100 USD minus the [fee](/glossary#fee), and the balance decreases by 100 USD. + - When using this endpoint with amount = 100 USD, the receiver receives 100 USD, and the balance decreases by 100 USD plus the [fee](/glossary#fee). Rate limit: 1000 requests/10 sec. - Response is cached for: NONE + The API does not cache the response. operationId: createWithdrawPay requestBody: @@ -1271,7 +1271,7 @@ paths: $ref: "#/components/schemas/WithdrawRequest" responses: "201": - description: Validation succeeded and withdraw creation process is started. Go to deposit/withdraw history and check your request status by uniqueId. + description: Validation succeeded and withdraw creation process is started. Check the request status by uniqueId in deposit/withdraw history. content: application/json: schema: @@ -1349,14 +1349,14 @@ paths: - Transfer summary: Transfer between balances description: | - This endpoint transfers the specified amount between [main](/glossary#balance-main), [trade](/glossary#balance-spotbalance-trade) and [collateral](/glossary#balance-collateral) balances. + The endpoint transfers the specified amount between [main](/glossary#balance-main), [trade](/glossary#balance-spotbalance-trade) and [collateral](/glossary#balance-collateral) balances. Rate limit: 1000 requests/10 sec. - Response is cached for: NONE + The API does not cache the response. @@ -1382,7 +1382,7 @@ paths: ⚠️ We highly recommend to use **from** and **to** fields, which provides more flexibility. This way will be deprecated in future. - Example: **deposit** if you need to transfer from [main](/glossary#balance-main) to [trade](/glossary#balance-spotbalance-trade) / **withdraw** if you need to transfer from [trade](/glossary#balance-spotbalance-trade) balance to [main](/glossary#balance-main). For [collateral balances](/glossary#balance-collateral) you can use **collateral-deposit** to transfer from main to collateral balance and **collateral-withdraw** to transfer from collateral balance to main + Example: **deposit** to transfer from [main](/glossary#balance-main) to [trade](/glossary#balance-spotbalance-trade) / **withdraw** to transfer from [trade](/glossary#balance-spotbalance-trade) balance to [main](/glossary#balance-main). For [collateral balances](/glossary#balance-collateral) use **collateral-deposit** to transfer from main to collateral and **collateral-withdraw** to transfer from collateral to main **Not required** if **from** and **to** are set. enum: @@ -1407,7 +1407,7 @@ paths: example: XLM amount: type: string - description: "Amount to transfer. Max [precision](/glossary#precision) = 8, value should be greater than zero and less or equal your available balance." + description: "Amount to transfer. Max [precision](/glossary#precision) = 8, value must be greater than zero and less than or equal to the available balance." example: "0.9" request: type: string @@ -1535,7 +1535,7 @@ paths: - Main Account summary: Get deposit/withdraw history description: | - This endpoint retrieves the history of deposits and withdraws. + The endpoint retrieves the history of deposits and withdraws. **Deposit status codes:** - `Successful` - 3, 7 @@ -1564,7 +1564,7 @@ paths: - Response is cached for: NONE + The API does not cache the response. operationId: getDepositWithdrawHistory requestBody: @@ -1611,7 +1611,7 @@ paths: minimum: 0 maximum: 10000 default: 0 - description: If you want the request to return entries starting from a particular line, you can use OFFSET clause to tell it where it should start. + description: Use the OFFSET clause to return entries starting from a particular line. status: type: array items: @@ -1619,7 +1619,7 @@ paths: description: | Can be used for filtering transactions by status codes. - ⚠️ Caution: You must use this parameter with appropriate `transactionMethod` and use valid status codes for this method. You can find them in the endpoint description above. Example: `"status": [3,7]` + ⚠️ Caution: Use this parameter with the appropriate `transactionMethod` and valid status codes for that method. See the endpoint description above for valid codes. Example: `"status": [3,7]` request: type: string description: Request signature @@ -1755,7 +1755,7 @@ paths: - Deposit summary: Create new address for deposit description: | - This endpoint creates a new address even when the last created address is not used. This endpoint is not available by default, you need to contact support@whitebit.com in order to get permissions to use this endpoint. + The endpoint creates a new address even when the last created address is not used. The endpoint is not available by default, contact support@whitebit.com to get permissions to use the endpoint. **Address types:** @@ -1769,7 +1769,7 @@ paths: - Response is cached for: NONE + The API does not cache the response. operationId: createNewAddress requestBody: @@ -1845,10 +1845,10 @@ paths: properties: maxAmount: type: string - description: Max amount of deposit that can be accepted by exchange - if you deposit more than that number, it won't be accepted by exchange + description: Max amount of deposit accepted by the exchange. Deposits exceeding this amount are rejected. minAmount: type: string - description: Min amount of deposit that accepted by exchange - if you deposit less than that number, it won't be accepted by exchange + description: Min amount of deposit accepted by the exchange. Deposits below this amount are rejected. fixedFee: type: string description: Fixed deposit fee @@ -1858,13 +1858,13 @@ paths: properties: maxFee: type: string - description: Maximum fixed fee that you will pay + description: Maximum fixed fee charged minFee: type: string - description: Minimum fixed fee that you will pay + description: Minimum fixed fee charged percent: type: string - description: Percent of deposit that you will pay + description: Percent of deposit as fee example: account: address: "GDTSOI56XNVAKJNJBLJGRNZIVOCIZJRBIDKTWSCYEYNFAZEMBLN75RMN" @@ -1926,14 +1926,14 @@ paths: - Codes summary: Create code description: | - This endpoint creates [WhiteBIT code](/glossary#whitebit-codes). + The endpoint creates [WhiteBIT code](/glossary#whitebit-codes). Rate limit: 1000 requests/10 sec. - Response is cached for: NONE + The API does not cache the response. operationId: createCode requestBody: @@ -1954,7 +1954,7 @@ paths: example: ETH amount: type: string - description: "Amount to transfer. Max [precision](/glossary#precision) = 8, value should be greater than zero and your [main balance](/glossary#balance-main)." + description: "Amount to transfer. Max [precision](/glossary#precision) = 8, value must be greater than zero and less than or equal to the [main balance](/glossary#balance-main)." example: "0.002" passphrase: type: string @@ -2088,14 +2088,14 @@ paths: - Codes summary: Apply code description: | - This endpoint applies [WhiteBIT code](/glossary#whitebit-codes). + The endpoint applies [WhiteBIT code](/glossary#whitebit-codes). Rate limit: 60 requests/1 sec. - Response is cached for: NONE + The API does not cache the response. operationId: applyCode requestBody: @@ -2182,14 +2182,14 @@ paths: - Codes summary: Get my codes description: | - This endpoint retrieves the list of [WhiteBIT codes](/glossary#whitebit-codes) created by my account. + The endpoint retrieves the list of [WhiteBIT codes](/glossary#whitebit-codes) created by my account. Rate limit: 1000 requests/10 sec. - Response is cached for: NONE + The API does not cache the response. operationId: getMyCodes requestBody: @@ -2213,7 +2213,7 @@ paths: minimum: 0 maximum: 10000 default: 0 - description: If you want the request to return entries starting from a particular line, you can use OFFSET clause to tell it where it should start. + description: Use the OFFSET clause to return entries starting from a particular line. request: type: string description: Request signature @@ -2297,14 +2297,14 @@ paths: - Codes summary: Get codes history description: | - This endpoint retrieves the whole [codes](/glossary#whitebit-codes) history on your account. + The endpoint retrieves the whole [codes](/glossary#whitebit-codes) history for the account. Rate limit: 1000 requests/10 sec. - Response is cached for: NONE + The API does not cache the response. operationId: getCodesHistory requestBody: @@ -2328,7 +2328,7 @@ paths: minimum: 0 maximum: 10000 default: 0 - description: If you want the request to return entries starting from a particular line, you can use OFFSET clause to tell it where it should start. + description: Use the OFFSET clause to return entries starting from a particular line. request: type: string description: Request signature @@ -2418,16 +2418,16 @@ paths: - Crypto Lending - Fixed summary: Get plans description: | - This endpoint retrieves all active [plans](/glossary#crypto-lending). + The endpoint retrieves all active [plans](/glossary#crypto-lending). - These endpoints are available only for B2B partner services. You need to fill the institutional services form in order to get permissions to use these endpoints. + These endpoints are available only for B2B partner services. Fill the institutional services form to get permissions to use these endpoints. **Note:** When target currency is different from source currency, interest amount in target currency will be calculated using `interestRatio` value. **Examples:** - - When source currency = USDT, target currency = BTC and interest ratio = 40000, it means that you will receive interest in BTC that equals interest amount in USDT divided by interest ratio (in this case 0.000025 BTC per each 1 USDT of interest amount). + - When source currency = USDT, target currency = BTC and interest ratio = 40000, interest is received in BTC and equals the USDT interest amount divided by the interest ratio (e.g. 0.000025 BTC per 1 USDT of interest). - When source currency equals target currency, interest ratio equals 1. @@ -2435,7 +2435,7 @@ paths: - Response is cached for: NONE + The API does not cache the response. operationId: getFixedPlans requestBody: @@ -2502,14 +2502,14 @@ paths: - Crypto Lending - Fixed summary: Invest description: | - This endpoint creates a new investment to the specified [invest plan](/glossary#crypto-lending). + The endpoint creates a new investment to the specified [invest plan](/glossary#crypto-lending). Rate limit: 1000 requests/10 sec. - Response is cached for: NONE + The API does not cache the response. operationId: createFixedInvestment requestBody: @@ -2683,14 +2683,14 @@ paths: - Crypto Lending - Fixed summary: Close investment description: | - This endpoint closes active investment. + The endpoint closes active investment. Rate limit: 1000 requests/10 sec. - Response is cached for: NONE + The API does not cache the response. operationId: closeFixedInvestment requestBody: @@ -2746,14 +2746,14 @@ paths: - Crypto Lending - Fixed summary: Get investments history description: | - This endpoint retrieves an investments history. + The endpoint retrieves an investments history. Rate limit: 1000 requests/10 sec. - Response is cached for: NONE + The API does not cache the response. operationId: getFixedInvestmentsHistory requestBody: @@ -2787,7 +2787,7 @@ paths: minimum: 0 maximum: 10000 default: 0 - description: If you want the request to return entries starting from a particular line, you can use OFFSET clause to tell it where it should start. + description: Use the OFFSET clause to return entries starting from a particular line. request: type: string description: Request signature @@ -2861,14 +2861,14 @@ paths: - Crypto Lending - Fixed summary: Get interest payments history description: | - This endpoint retrieves the history of interest payments. + The endpoint retrieves the history of interest payments. Rate limit: 1000 requests/10 sec. - Response is cached for: NONE + The API does not cache the response. operationId: getInterestPaymentHistory requestBody: @@ -2898,7 +2898,7 @@ paths: minimum: 0 maximum: 10000 default: 0 - description: If you want the request to return entries starting from a particular line, you can use OFFSET clause to tell it where it should start. + description: Use the OFFSET clause to return entries starting from a particular line. request: type: string description: Request signature @@ -2966,7 +2966,7 @@ paths: - Response is cached for: NONE + The API does not cache the response. operationId: getFlexPlans requestBody: @@ -3062,7 +3062,7 @@ paths: - Response is cached for: NONE + The API does not cache the response. operationId: getUserFlexInvestments requestBody: @@ -3179,7 +3179,7 @@ paths: - Response is cached for: NONE + The API does not cache the response. operationId: getFlexInvestmentHistory requestBody: @@ -3290,14 +3290,14 @@ paths: description: | Retrieve investment earnings history (ONLY DAILY_EARNING operations). - **Note:** This endpoint automatically filters to show ONLY DAILY_EARNING operations (type 4). + **Note:** The endpoint automatically filters to show ONLY DAILY_EARNING operations (type 4). Rate limit: 1000 requests/10 sec. - Response is cached for: NONE + The API does not cache the response. operationId: getFlexPaymentHistory requestBody: @@ -3405,7 +3405,7 @@ paths: - Response is cached for: NONE + The API does not cache the response. operationId: createFlexInvestment requestBody: @@ -3504,7 +3504,7 @@ paths: - Response is cached for: NONE + The API does not cache the response. operationId: withdrawFromFlexInvestment requestBody: @@ -3595,7 +3595,7 @@ paths: - Response is cached for: NONE + The API does not cache the response. operationId: closeFlexInvestment requestBody: @@ -3679,7 +3679,7 @@ paths: - Response is cached for: NONE + The API does not cache the response. operationId: updateFlexAutoReinvestment requestBody: @@ -3763,7 +3763,7 @@ paths: - Response is cached for: NONE + The API does not cache the response. operationId: getFees requestBody: @@ -3798,7 +3798,7 @@ paths: - Sub-Account summary: Create Sub-Account description: | - This endpoint creates new [sub-account](/glossary#sub-account). + The endpoint creates new [sub-account](/glossary#sub-account). The `email` field requirement depends on the `shareKyc` parameter: @@ -3811,7 +3811,7 @@ paths: - Response is cached for: NONE + The API does not cache the response. operationId: createSubAccount requestBody: @@ -3881,14 +3881,14 @@ paths: - Sub-Account summary: Delete Sub-Account description: | - This endpoint deletes [sub-account](/glossary#sub-account). + The endpoint deletes [sub-account](/glossary#sub-account). Rate limit: 1000 requests/10 sec. - Response is cached for: NONE + The API does not cache the response. operationId: deleteSubAccount requestBody: @@ -3923,14 +3923,14 @@ paths: - Sub-Account summary: Edit Sub-Account description: | - This endpoint edits [sub-account](/glossary#sub-account). + The endpoint edits [sub-account](/glossary#sub-account). Rate limit: 1000 requests/10 sec. - Response is cached for: NONE + The API does not cache the response. operationId: editSubAccount requestBody: @@ -3982,14 +3982,14 @@ paths: - Sub-Account summary: List of Sub-Accounts description: | - This endpoint returns list of current user [sub-accounts](/glossary#sub-account). + The endpoint returns list of current user [sub-accounts](/glossary#sub-account). Rate limit: 1000 requests/10 sec. - Response is cached for: NONE + The API does not cache the response. operationId: listSubAccounts requestBody: @@ -4041,14 +4041,14 @@ paths: - Sub-Account summary: Sub-Account Transfer description: | - This endpoint creates transfer from main account to [sub-account](/glossary#sub-account) or vice versa. + The endpoint creates transfer from main account to [sub-account](/glossary#sub-account) or vice versa. Rate limit: 1000 requests/10 sec. - Response is cached for: NONE + The API does not cache the response. operationId: subAccountTransfer requestBody: @@ -4100,14 +4100,14 @@ paths: - Sub-Account summary: Block Sub-Account description: | - This endpoint blocks [sub-account](/glossary#sub-account). + The endpoint blocks [sub-account](/glossary#sub-account). Rate limit: 1000 requests/10 sec. - Response is cached for: NONE + The API does not cache the response. operationId: blockSubAccount requestBody: @@ -4142,14 +4142,14 @@ paths: - Sub-Account summary: Unblock Sub-Account description: | - This endpoint unblocks [sub-account](/glossary#sub-account). + The endpoint unblocks [sub-account](/glossary#sub-account). Rate limit: 1000 requests/10 sec. - Response is cached for: NONE + The API does not cache the response. operationId: unblockSubAccount requestBody: @@ -4184,14 +4184,14 @@ paths: - Sub-Account summary: Sub-Account Balances description: | - This endpoint returns [sub-account](/glossary#sub-account) balances. + The endpoint returns [sub-account](/glossary#sub-account) balances. Rate limit: 1000 requests/10 sec. - Response is cached for: NONE + The API does not cache the response. operationId: getSubAccountBalances requestBody: @@ -4245,14 +4245,14 @@ paths: - Sub-Account summary: Get Sub-Account Transfer History description: | - This endpoint returns history of transfers between main account and [sub-account](/glossary#sub-account). + The endpoint returns history of transfers between main account and [sub-account](/glossary#sub-account). Rate limit: 1000 requests/10 sec. - Response is cached for: NONE + The API does not cache the response. operationId: getSubAccountTransferHistory requestBody: @@ -4306,14 +4306,14 @@ paths: - Sub-Account API Keys summary: Create Sub-Account API Key description: | - This endpoint creates a new API key for a [sub-account](/glossary#sub-account). + The endpoint creates a new API key for a [sub-account](/glossary#sub-account). Rate limit: 1000 requests/10 sec. - Response is cached for: NONE + The API does not cache the response. operationId: createSubAccountApiKey requestBody: @@ -4356,14 +4356,14 @@ paths: - Sub-Account API Keys summary: Edit Sub-Account API Key description: | - This endpoint updates an existing [sub-account](/glossary#sub-account) API key. + The endpoint updates an existing [sub-account](/glossary#sub-account) API key. Rate limit: 1000 requests/10 sec. - Response is cached for: NONE + The API does not cache the response. operationId: editSubAccountApiKey requestBody: @@ -4413,14 +4413,14 @@ paths: - Sub-Account API Keys summary: Delete Sub-Account API Key description: | - This endpoint deletes a [sub-account](/glossary#sub-account) API key. + The endpoint deletes a [sub-account](/glossary#sub-account) API key. Rate limit: 1000 requests/10 sec. - Response is cached for: NONE + The API does not cache the response. operationId: deleteSubAccountApiKey requestBody: @@ -4455,7 +4455,7 @@ paths: - Sub-Account API Keys summary: List Sub-Account API Keys description: | - This endpoint retrieves a list of API keys for a [sub-account](/glossary#sub-account). + The endpoint retrieves a list of API keys for a [sub-account](/glossary#sub-account). Note: For security reasons, the apiSecret field returns an empty string. @@ -4463,7 +4463,7 @@ paths: - Response is cached for: NONE + The API does not cache the response. operationId: listSubAccountApiKeys requestBody: @@ -4515,14 +4515,14 @@ paths: - Sub-Account API Keys summary: Reset Sub-Account API Key description: | - This endpoint resets (regenerates) an existing [sub-account](/glossary#sub-account) API key. + The endpoint resets (regenerates) an existing [sub-account](/glossary#sub-account) API key. Rate limit: 1000 requests/10 sec. - Response is cached for: NONE + The API does not cache the response. operationId: resetSubAccountApiKey requestBody: @@ -4557,14 +4557,14 @@ paths: - Sub-Account API Keys summary: List Sub-Account API Key IP Addresses description: | - This endpoint retrieves the list of IP addresses allowed for a [sub-account](/glossary#sub-account) API key. + The endpoint retrieves the list of IP addresses allowed for a [sub-account](/glossary#sub-account) API key. Rate limit: 1000 requests/10 sec. - Response is cached for: NONE + The API does not cache the response. operationId: listSubAccountApiKeyIpAddresses requestBody: @@ -4604,14 +4604,14 @@ paths: - Sub-Account API Keys summary: Create Sub-Account API Key IP Address description: | - This endpoint adds a new IP address to the allowed list for a [sub-account](/glossary#sub-account) API key. + The endpoint adds a new IP address to the allowed list for a [sub-account](/glossary#sub-account) API key. Rate limit: 1000 requests/10 sec. - Response is cached for: NONE + The API does not cache the response. operationId: createSubAccountApiKeyIpAddress requestBody: @@ -4655,14 +4655,14 @@ paths: - Sub-Account API Keys summary: Delete Sub-Account API Key IP Address description: | - This endpoint removes an IP address from the allowed list for a [sub-account](/glossary#sub-account) API key. + The endpoint removes an IP address from the allowed list for a [sub-account](/glossary#sub-account) API key. Rate limit: 1000 requests/10 sec. - Response is cached for: NONE + The API does not cache the response. operationId: deleteSubAccountApiKeyIpAddress requestBody: @@ -4706,14 +4706,14 @@ paths: - Mining Pool summary: Get Rewards description: | - This endpoint returns rewards received from mining. + The endpoint returns rewards received from mining. Rate limit: 1000 requests/10 sec. - Response is cached for: NONE + The API does not cache the response. operationId: getMiningRewards requestBody: @@ -4779,14 +4779,14 @@ paths: - Mining Pool summary: Get Mining Account Hashrate description: | - This endpoint returns hashrate of mining pool account. + The endpoint returns hashrate of mining pool account. Rate limit: 1000 requests/10 sec. - Response is cached for: NONE + The API does not cache the response. operationId: getMiningHashrate requestBody: @@ -4855,15 +4855,15 @@ paths: - Credit Line summary: List Credit Lines description: | - This endpoint returns an active loan. - This endpoint works on demand - contact WhiteBIT support to get access. + The endpoint returns an active loan. + The endpoint works on demand - contact WhiteBIT support to get access. Rate limit: 1000 requests/10 sec. - Response is cached for: NONE + The API does not cache the response. operationId: getCreditLineInfo requestBody: @@ -4979,7 +4979,7 @@ components: description: "Currencies [ticker](/glossary#ticker). Example: BTC ⚠️ Currencies ticker must have \"can_deposit\" status equal to \"true\". Use [Asset Status endpoint](/public/http-v4/asset-status-list) to know more about currency." amount: type: string - description: "Withdraw amount (including [fee](/glossary#fee)). If you want fee to be added to the specified amount, you need to use /main-account/withdraw-pay request" + description: "Withdraw amount (including [fee](/glossary#fee)). To add the fee to the specified amount, use the /main-account/withdraw-pay request" address: type: string description: "Target address (wallet address for cryptocurrencies, identifier/[card token](/glossary#card-token) for [fiat](/glossary#fiat) currencies)" @@ -4988,7 +4988,7 @@ components: description: "Required if currency is memoable. See [memo](/glossary#memodestination-tag) for details." uniqueId: type: string - description: "Unique transaction identifier. ⚠️ Note that you should generate new unique id for each withdrawal request." + description: "Unique transaction identifier. ⚠️ Generate a new unique ID for each withdrawal request." provider: type: string description: "[Fiat](/glossary#fiat) currency [provider](/glossary#provider). Example: VISAMASTER ⚠️ Currency provider should be taken from [Asset Status endpoint](/public/http-v4/asset-status-list) response. Required if currency is fiat." @@ -4997,7 +4997,7 @@ components: description: "Cryptocurrency network. Available for [multinetwork](/glossary#multinetwork) currencies. Example: OMNI ⚠️ Currency network should be taken from [Asset Status endpoint](/public/http-v4/asset-status-list) response. Default for USDT is ERC20" partialEnable: type: boolean - description: "Optional parameter for [FIAT](/glossary#fiat) withdrawals with increased Maximum Limit if set as \"true\". In order to use this parameter your application should support \"Partially successful\" withdrawal status and latest updates in deposit/withdrawal history." + description: "Optional parameter for [FIAT](/glossary#fiat) withdrawals with increased Maximum Limit if set as \"true\". To use this parameter, the application must support \"Partially successful\" withdrawal status and latest updates in deposit/withdrawal history." beneficiary: type: object description: "Beneficiary information data. Required if currency [ticker](/glossary#ticker) is one of: UAH_IBAN, USD_VISAMASTER, EUR_VISAMASTER, USD, EUR" diff --git a/openapi/public/http-v1.yaml b/openapi/public/http-v1.yaml index f9e4d60..fd179fc 100644 --- a/openapi/public/http-v1.yaml +++ b/openapi/public/http-v1.yaml @@ -6,9 +6,9 @@ info: Base URL: https://whitebit.com All endpoints return time in Unix-time format. All endpoints return either a JSON object or array. - For receiving responses from API calls please use http method GET. - If an endpoint requires parameters you should send them as query string. - Response is cached for specified duration per endpoint. + Use HTTP method GET for API requests. + If an endpoint requires parameters, send them as query string. + The API caches responses for a specified duration per endpoint. Rate limit: 1000 requests/10 sec for all endpoints. @@ -25,10 +25,10 @@ paths: get: summary: Market Info description: | - This endpoint retrieves all information about available markets. + The endpoint retrieves all information about available markets. - Response is cached for: 1 second + The API caches the response for: 1 second @@ -104,10 +104,10 @@ paths: get: summary: Market Activity description: | - This endpoint retrieves information about recent trading activity on all markets. + The endpoint retrieves information about recent trading activity on all markets. - Response is cached for: 1 second + The API caches the response for: 1 second @@ -186,10 +186,10 @@ paths: get: summary: Single market activity description: | - This endpoint retrieves information about recent trading activity on the requested market. + The endpoint retrieves information about recent trading activity on the requested market. - Response is cached for: 1 second + The API caches the response for: 1 second @@ -270,10 +270,10 @@ paths: get: summary: Kline description: | - This endpoint retrieves information about market kline. + The endpoint retrieves information about market kline. - Response is cached for: 1 second + The API caches the response for: 1 second @@ -360,10 +360,10 @@ paths: get: summary: Symbols description: | - This endpoint retrieves information about all available markets for trading. + The endpoint retrieves information about all available markets for trading. - Response is cached for: 1 second + The API caches the response for: 1 second @@ -404,10 +404,10 @@ paths: get: summary: Order depth description: | - This endpoint retrieves the current [order book](/glossary/#order-book) as two arrays ([bids](/glossary/#bid) / [asks](/glossary/#ask)). + The endpoint retrieves the current [order book](/glossary/#order-book) as two arrays ([bids](/glossary/#bid) / [asks](/glossary/#ask)). - Response is cached for: 100 ms + The API caches the response for: 100 ms @@ -474,10 +474,10 @@ paths: get: summary: Trade History description: | - This endpoint retrieves [trades](/glossary/#trade) that have been executed for the requested [market](/glossary/#market). + The endpoint retrieves [trades](/glossary/#trade) that have been executed for the requested [market](/glossary/#market). - Response is cached for: 1 second + The API caches the response for: 1 second diff --git a/openapi/public/http-v2.yaml b/openapi/public/http-v2.yaml index b95651d..c343d23 100644 --- a/openapi/public/http-v2.yaml +++ b/openapi/public/http-v2.yaml @@ -8,10 +8,10 @@ info: All endpoints return time in Unix-time format. All endpoints return either a JSON object array. - For receiving responses from API calls please use http method GET. - If endpoint required parameters you will need to send them as query string. + Use HTTP method GET for API requests. + If an endpoint requires parameters, send them as query string. - Response is cached for specified duration per endpoint. + The API caches responses for a specified duration per endpoint. version: 2.0.0 servers: - url: https://whitebit.com @@ -24,10 +24,10 @@ paths: get: summary: Market Info description: | - This endpoint retrieves all information about available [markets](/glossary#market). + The endpoint retrieves all information about available [markets](/glossary#market). - Response is cached for: 1 second + The API caches the response for: 1 second tags: - Public API V2 @@ -107,10 +107,10 @@ paths: get: summary: Market activity description: | - This endpoint retrieves information on recent trading activity on all [markets](/glossary#market). + The endpoint retrieves information on recent trading activity on all [markets](/glossary#market). - Response is cached for: 1 second + The API caches the response for: 1 second tags: - Public API V2 @@ -179,10 +179,10 @@ paths: get: summary: Recent Trades description: | - This endpoint retrieves the [trades](/glossary#trades) that have been executed recently on the requested [market](/glossary#market). + The endpoint retrieves the [trades](/glossary#trades) that have been executed recently on the requested [market](/glossary#market). - Response is cached for: 1 second + The API caches the response for: 1 second tags: - Public API V2 @@ -246,10 +246,10 @@ paths: get: summary: Fee description: | - This endpoint retrieves the trading [fee](/glossary#fee). + The endpoint retrieves the trading [fee](/glossary#fee). - Response is cached for: 1 second + The API caches the response for: 1 second tags: - Public API V2 @@ -291,10 +291,10 @@ paths: get: summary: Asset Status List description: | - This endpoint retrieves the [assets](/glossary#assets) status. + The endpoint retrieves the [assets](/glossary#assets) status. - Response is cached for: 1 second + The API caches the response for: 1 second tags: - Public API V2 @@ -368,10 +368,10 @@ paths: get: summary: Orderbook description: | - This endpoint retrieves the current [order book](/glossary/#order-book) as two arrays ([bids](/glossary/#bid) / [asks](/glossary/#ask)). + The endpoint retrieves the current [order book](/glossary/#order-book) as two arrays ([bids](/glossary/#bid) / [asks](/glossary/#ask)). - Response is cached for: 100 ms + The API caches the response for: 100 ms tags: - Public API V2 diff --git a/openapi/public/http-v4.yaml b/openapi/public/http-v4.yaml index c8b2e9f..884ecae 100644 --- a/openapi/public/http-v4.yaml +++ b/openapi/public/http-v4.yaml @@ -6,8 +6,8 @@ info: Base URL: https://whitebit.com All endpoints return time in Unix-time format. All endpoints return either a JSON object or array. - For receiving responses from API calls please use http method GET. - If an endpoint requires parameters you should send them as query string. + Use HTTP method GET for API calls. + Send parameters as query string when an endpoint requires them. Rate limit: 2000 requests/10 sec for most endpoints (specific limits noted per endpoint). @@ -23,7 +23,7 @@ paths: /api/v4/public/platform/status: get: summary: Maintenance status - description: This endpoint retrieves maintenance status + description: The endpoint retrieves maintenance status tags: - Public API V4 parameters: [] @@ -44,10 +44,10 @@ paths: get: summary: Market Info description: | - This endpoint retrieves all information about available spot and futures markets. + The endpoint retrieves all information about available spot and futures markets. - Response is cached for: 1 second + The API caches the response for 1 second @@ -109,15 +109,15 @@ paths: example: "0.001" maxTotal: type: string - description: Maximum total(amount * price) of money to trade + description: Maximum total (amount * price) of money to trade example: "10000000000" tradesEnabled: type: boolean - description: Is trading enabled + description: Indicates whether trading is enabled example: true isCollateral: type: boolean - description: Is margin trading enabled + description: Indicates whether margin trading is enabled example: true type: type: string @@ -135,10 +135,10 @@ paths: get: summary: Market activity description: | - This endpoint retrieves a 24-hour pricing and volume summary for each market pair available on the exchange. + The endpoint retrieves a 24-hour pricing and volume summary for each market pair available on the exchange. - Response is cached for: 1 second + The API caches the response for 1 second @@ -159,11 +159,11 @@ paths: properties: base_id: type: integer - description: "CoinmarketCap Id of base currency; 0 - if unknown" + description: "CoinMarketCap ID of base currency; 0 - if unknown" example: 1 quote_id: type: integer - description: "CoinmarketCap Id of quote currency; 0 - if unknown" + description: "CoinMarketCap ID of quote currency; 0 - if unknown" example: 825 last_price: type: string @@ -179,7 +179,7 @@ paths: example: "4723.286463" isFrozen: type: boolean - description: Identifies if trades are closed + description: Indicates whether trading is disabled example: false change: type: string @@ -205,10 +205,10 @@ paths: get: summary: Asset Status List description: | - This endpoint retrieves the assets status. + The endpoint retrieves the assets status. - Response is cached for: 1 second + The API caches the response for 1 second @@ -303,10 +303,10 @@ paths: get: summary: Orderbook description: | - This endpoint retrieves the current [order book](/glossary#order-book) as two arrays ([bids](/glossary#bid) / [asks](/glossary#ask)) with additional parameters. + The endpoint retrieves the current [order book](/glossary#order-book) as two arrays ([bids](/glossary#bid) / [asks](/glossary#ask)) with additional parameters. - Response is cached for: 100 ms + The API caches the response for 100 ms @@ -335,7 +335,7 @@ paths: - name: level in: query required: false - description: "Optional parameter that allows API user to see different level of aggregation. Level 0 – default level, no aggregation. Starting from level 1 (lowest possible aggregation) and up to level 5 - different levels of aggregated orderbook." + description: "Optional parameter that controls the aggregation level. Level 0 – default, no aggregation. Levels 1–5 provide increasing aggregation of the order book." schema: type: integer minimum: 0 @@ -359,10 +359,10 @@ paths: get: summary: Depth description: | - This endpoint retrieves depth price levels within ±2% of the market last price. Use it when you need lightweight order book data for a narrow price band around the current market price. The ±2% constraint limits the response to price levels near the last traded price, reducing payload size compared to the full order book. + The endpoint retrieves depth price levels within ±2% of the market last price. Use when lightweight order book data is needed for a narrow price band around the current market price. The ±2% constraint limits the response to price levels near the last traded price, reducing payload size compared to the full order book. - Response is cached for: 1 sec + The API caches the response for 1 sec @@ -396,14 +396,14 @@ paths: get: summary: Recent Trades description: | - This endpoint retrieves the [trades](/glossary#deal-trade) that have been executed recently on the requested [market](/glossary#market). + The endpoint retrieves the [trades](/glossary#deal-trade) that have been executed recently on the requested [market](/glossary#market). - Response is cached for: 1 second + The API caches the response for 1 second - Public trade data can include executions that originate from RPI orders. Public order book feeds (`depth`, `bookTicker`) exclude RPI orders. Users view RPI orders only in private active orders and in the exchange UI order book (web and mobile). + Public trade data can include executions that originate from RPI orders. Public order book feeds (`depth`, `bookTicker`) exclude RPI orders. RPI orders appear only in private active orders and in the exchange UI order book (web and mobile). @@ -493,10 +493,10 @@ paths: get: summary: Fee description: | - This endpoint retrieves the list of [fees](/glossary#fee) and min/max amount for deposits and withdraws + The endpoint retrieves the list of [fees](/glossary#fee) and min/max amounts for deposits and withdrawals - Response is cached for: 1 second + The API caches the response for 1 second @@ -571,10 +571,10 @@ paths: get: summary: Server Time description: | - This endpoint retrieves the current server time. + The endpoint retrieves the current server time. - Response is cached for: 1 second + The API caches the response for 1 second @@ -600,10 +600,10 @@ paths: get: summary: Server Status description: | - This endpoint retrieves the current API life-state. + The endpoint retrieves the current API life-state. - Response is cached for: 1 second + The API caches the response for 1 second @@ -627,10 +627,10 @@ paths: get: summary: Collateral Markets List description: | - This endpoint returns the list of [markets](/glossary#market) that available for [collateral](/glossary#collateral) trading + The endpoint returns the list of [markets](/glossary#market) that are available for [collateral](/glossary#collateral) trading - Response is cached for: 1 second + The API caches the response for 1 second @@ -655,10 +655,10 @@ paths: get: summary: Available Futures Markets List description: | - This endpoint returns the list of available futures markets. + The endpoint returns the list of available futures markets. - Response is cached for: 1 second + The API caches the response for 1 second @@ -723,7 +723,7 @@ paths: get: summary: Funding History description: | - This endpoint returns the funding rate history for a specified futures market. + The endpoint returns the funding rate history for a specified futures market. Rate limit 2000 requests/10 sec. @@ -783,7 +783,7 @@ paths: properties: fundingTime: type: string - description: Timestamp when funding was executed + description: Timestamp when the funding executed example: "1752537600" fundingRate: type: string @@ -795,20 +795,20 @@ paths: example: BTC_PERP settlementPrice: type: string - description: Price at which funding was settled + description: Price at which the funding settled example: "119816.5" rateCalculatedTime: type: string - description: Timestamp when the funding rate was calculated + description: Timestamp of the funding rate calculation example: "1752508800" /api/v4/public/mining-pool: get: summary: Mining Pool Overview description: | - This endpoint returns an overall information about the current mining pool state. + The endpoint returns overall information about the current mining pool state. - HashRate info represents in the H units. + Hash rate is expressed in H units. Rate limit 1000 requests/10 sec. @@ -907,19 +907,19 @@ components: example: 1 can_withdraw: type: boolean - description: Identifies whether withdrawals are enabled or disabled + description: Indicates withdrawal status (enabled or disabled) example: true can_deposit: type: boolean - description: Identifies whether deposits are enabled or disabled + description: Indicates deposit status (enabled or disabled) example: true min_withdraw: type: string - description: Identifies the single minimum withdrawal amount of a cryptocurrency + description: Minimum withdrawal amount for the asset example: "0.001" max_withdraw: type: string - description: Identifies the single maximum withdrawal amount of a cryptocurrency + description: Maximum withdrawal amount for the asset example: "2" maker_fee: type: string @@ -935,7 +935,7 @@ components: example: "0.0001" max_deposit: type: string - description: "Max deposit amount, will not be returned if there is no limit, 0 if unlimited" + description: "Max deposit amount; omitted if no limit, 0 if unlimited" example: "0" currency_precision: type: integer @@ -943,11 +943,11 @@ components: example: 18 is_memo: type: boolean - description: Identifies if currency has memo address + description: Indicates whether the asset requires a memo address example: false memo: type: object - description: Identifies if currency requires memo for deposits/withdraws + description: Indicates whether the asset requires a memo for deposits and withdrawals properties: deposit: type: boolean diff --git a/platform/colocation.mdx b/platform/colocation.mdx index 5fd5b19..708d53f 100644 --- a/platform/colocation.mdx +++ b/platform/colocation.mdx @@ -1,7 +1,7 @@ --- title: "Colocation Services" sidebarTitle: "Colocation" -description: "WhiteBIT offers professional-grade [colocation](https://docs.whitebit.com/glossary/#colocation) services for [high-frequency trading (HFT)](https://docs.whitebit.com/glossary/#high-frequency-trading-hft) and algorithmic trading operations. Place your trading servers close to our exchange’s [matching engine](https://docs.whitebit.com/glossary/#matching-engine) to achieve minimal [latency](https://docs.whitebit.com/glossary/#latency) and enhanced trading performance." +description: "WhiteBIT offers professional-grade [colocation](https://docs.whitebit.com/glossary/#colocation) services for [high-frequency trading (HFT)](https://docs.whitebit.com/glossary/#high-frequency-trading-hft) and algorithmic trading operations. Place trading servers close to the exchange’s [matching engine](https://docs.whitebit.com/glossary/#matching-engine) to achieve minimal [latency](https://docs.whitebit.com/glossary/#latency) and enhanced trading performance." --- # Performance Highlights @@ -21,7 +21,7 @@ description: "WhiteBIT offers professional-grade [colocation](https://docs.white - 1. [Contact our institutional sales team](#contact-options) + 1. [Contact the institutional sales team](#contact-options) 2. Complete KYB verification 3. Sign service agreement 4. Provide technical requirements @@ -37,10 +37,10 @@ description: "WhiteBIT offers professional-grade [colocation](https://docs.white - Primary: eu-central-1a (recommended) - Alternative: eu-central-1c - Asia Option: ap-northeast-1 (Tokyo) - - Choose based on your trading requirements + - Choose based on trading requirements - Our technical team will assist with: + The technical team will assist with: - Network configuration including aws cloud latency optimized proxy - Performance testing - Trading system integration @@ -53,4 +53,4 @@ For detailed pricing and technical specifications: - Email: institutional@whitebit.com - Web Form: [institutional.whitebit.com/colocation](https://institutional.whitebit.com/colocation#anchor-form) -Service availability and specifications may vary by region. Contact our team for location-specific details. +Service availability and specifications may vary by region. Contact the team for location-specific details. diff --git a/platform/oauth/overview.mdx b/platform/oauth/overview.mdx index feb3a72..6c3dfef 100644 --- a/platform/oauth/overview.mdx +++ b/platform/oauth/overview.mdx @@ -10,7 +10,7 @@ import { RegionBaseUrl } from '/components/RegionBaseUrl.jsx'; ## Key Benefits -- **Enhanced Security**: Users grant access without sharing their WhiteBIT credentials with third-party applications +- **Enhanced Security**: Users grant access without sharing WhiteBIT credentials with third-party applications - **Granular Permissions**: Fine-grained scope controls allow users to limit what third-party applications can access - **Streamlined Trading Experience**: Enables seamless integration with portfolio trackers, trading bots, and analysis tools - **Developer-Friendly**: Standardized implementation familiar to developers across the ecosystem @@ -46,7 +46,7 @@ Enable business systems to securely connect to WhiteBIT for institutional tradin ## Available Scopes -WhiteBIT OAuth 2.0 implementation supports a wide range of permission scopes that can be requested during client setup, including: +WhiteBIT OAuth 2.0 implementation supports a wide range of permission scopes available for request during client setup, including: - Account information access - Balance and transaction history @@ -59,18 +59,18 @@ For a complete list of available scopes and detailed implementation instructions ## Getting Started -**WhiteBIT OAuth 2.0 integration is exclusively offered to close ecosystem partners.** To integrate WhiteBIT OAuth 2.0 with your application, please contact our support team at [support@whitebit.com](mailto:support@whitebit.com). Our team will guide you through the OAuth integration process, including: +**WhiteBIT OAuth 2.0 integration is exclusively offered to close ecosystem partners.** To integrate WhiteBIT OAuth 2.0 with an application, contact support at [support@whitebit.com](mailto:support@whitebit.com). The support team guides through the OAuth integration process, including: 1. Application registration and approval 2. Scope request and configuration 3. Implementation support for the OAuth 2.0 authorization flow 4. Technical documentation for token exchange and API authentication -Once your integration request is approved, you'll receive detailed instructions for implementing the OAuth 2.0 flow with your application. +Once the integration request is approved, detailed instructions are provided for implementing the OAuth 2.0 flow. ## Next Steps: Implementation Details -Now that you understand the benefits and use cases of WhiteBIT's OAuth 2.0 implementation, you're ready to dive into the technical details. Our [Usage](/platform/oauth/usage/overview) page provides comprehensive documentation on: +The [Usage](/platform/oauth/usage/overview) page provides comprehensive documentation on: - Endpoint specifications for authorization and token exchange - Request and response formats with example code @@ -78,8 +78,8 @@ Now that you understand the benefits and use cases of WhiteBIT's OAuth 2.0 imple - Step-by-step implementation guides for common scenarios - Troubleshooting tips and best practices -The usage documentation will guide you through the entire implementation process from initial setup to making your first authenticated API calls. +The usage documentation guides through the entire implementation process from initial setup to making the first authenticated API calls. ## Support -If you have questions or need assistance with OAuth 2.0 integration, please contact our developer support team at [support@whitebit.com](mailto:support@whitebit.com). +For questions or assistance with OAuth 2.0 integration, contact support at [support@whitebit.com](mailto:support@whitebit.com). diff --git a/platform/oauth/usage/overview.mdx b/platform/oauth/usage/overview.mdx index 4fd3c57..871341e 100644 --- a/platform/oauth/usage/overview.mdx +++ b/platform/oauth/usage/overview.mdx @@ -108,7 +108,7 @@ import urllib.parse import urllib.request from typing import Dict, Any, Optional, Tuple -# Region-aware base URL - set based on your region: +# Region-aware base URL - set based on the region: # Global: "https://whitebit.com" # EU: "https://whitebit.eu" BASE_URL = "https://whitebit.com" @@ -324,7 +324,7 @@ import { URL, URLSearchParams } from 'url'; import { parse as parseUrl } from 'url'; import { parse as parseQueryString } from 'querystring'; -// Region-aware base URL - set based on your region: +// Region-aware base URL - set based on the region: // Global: "https://whitebit.com" // EU: "https://whitebit.eu" const BASE_URL = "https://whitebit.com"; @@ -513,7 +513,7 @@ import com.sun.net.httpserver.HttpHandler; import com.sun.net.httpserver.HttpServer; public class OAuthServer { - // Region-aware base URL - set based on your region: + // Region-aware base URL - set based on the region: // Global: "https://whitebit.com" // EU: "https://whitebit.eu" private static final String BASE_URL = "https://whitebit.com"; @@ -764,7 +764,7 @@ public class OAuthServer { */ private static TokenResponse parseTokenResponse(String json) { // In a real application, use a proper JSON library like Jackson or Gson - // This is a simplified example that assumes valid JSON + // Simplified example assuming valid JSON TokenResponse response = new TokenResponse(); // Extract access_token @@ -804,7 +804,7 @@ public class OAuthServer { -Please pay attention that secret key will be shown only once, so make sure you save it in any secure key store +The secret key is shown only once. Save it in a secure key store. ## Requirements ### For web hook keys generation -Before starting using webhooks, you'll be asked to verify ownership of the domain, you are set as webhook destination. You can do it in one of three ways +Before using webhooks, verify ownership of the domain set as the webhook destination. Use one of three methods: -1. You can add TXT DNS record to your domain with your webhook public key. -2. You can add plain text file `whiteBIT-verification.txt` into your root domain folder and provide public web access to this file from your server. In this file should be placed your public webhook key. -3. You can implement `/whiteBIT-verification` endpoint. This endpoint should respond with 200 OK and return JSON array which contains your public webhook key. For example: `[""]` +1. Add a TXT DNS record to the domain with the webhook public key. +2. Add the plain text file `whiteBIT-verification.txt` to the root domain folder and provide public web access. Place the public webhook key in the file. +3. Implement the `/whiteBIT-verification` endpoint to respond with 200 OK and return a JSON array containing the public webhook key. Example: `[""]` -Passing just one of these checks will be able you to switch webhook on +Passing one of these checks enables the webhook. ### For processing web-hook requests @@ -81,18 +81,18 @@ All web-hook requests are performing with **id** - string. Uuid to identify every request. -**params** - the request payload. Here you can find useful data about passed actions, which triggered web hook call. Also in this field placed a [nonce](/glossary#nonce). **'nonce'** - a number that is always **greater** than the previous request’s nonce number +**params** - the request payload. Contains data about the actions triggering the webhook call. The field also contains a [nonce](/glossary#nonce). **'nonce'** - a number always **greater** than the previous request’s nonce number #### Request headers Also, all request contains additional data in headers: 1. `'Content-type': 'application/json'` -2. `'X-TXC-APIKEY': api_key` - where api_key is your WhiteBit webhook API key +2. `'X-TXC-APIKEY': api_key` - the WhiteBIT webhook API key 3. `'X-TXC-PAYLOAD': payload'` - where payload is base64-encoded body data 4. `'X-TXC-SIGNATURE': signature` - where signature is `hex(HMAC_SHA512(payload), key=api_secret))` -On consumer side you can process security headers to be sure request was performed by WhiteBIT. +On the consumer side, process the security headers to verify the request originated from WhiteBIT. ## WebHook Methods @@ -170,7 +170,7 @@ Performed when deposit was update. Request example: } ``` -Performed when deposit was processed, so it is available on your balance. Request example: +Performed when the deposit was processed and is available on the balance. Request example: ```json { diff --git a/private/http-trade-v1/overview.mdx b/private/http-trade-v1/overview.mdx index dd348e0..5bdefb2 100644 --- a/private/http-trade-v1/overview.mdx +++ b/private/http-trade-v1/overview.mdx @@ -19,7 +19,7 @@ All endpoints return time in Unix-time format. All endpoints return either a **JSON** object or array. -For receiving responses from API calls please use http method **POST** +Use HTTP method **POST** for API requests. ## Error messages V1 format diff --git a/sdks.mdx b/sdks.mdx index a5eb000..f88b454 100644 --- a/sdks.mdx +++ b/sdks.mdx @@ -1,6 +1,6 @@ --- title: "SDKs" -description: "Our SDKs – your gateway to effortless integration! Our Software Development Kits (SDKs) are tailored for various languages, providing a streamlined connection between your application and our APIs." +description: "WhiteBIT SDKs provide a gateway to effortless integration. The Software Development Kits (SDKs) are tailored for various languages, providing a streamlined connection between applications and the WhiteBIT APIs." --- @@ -9,7 +9,7 @@ description: "Our SDKs – your gateway to effortless integration! Our Software - Effortlessly integrate our APIs with just a few lines of code, eliminating manual configuration hassles. + Effortlessly integrate the WhiteBIT APIs with just a few lines of code, eliminating manual configuration hassles. @@ -17,7 +17,7 @@ description: "Our SDKs – your gateway to effortless integration! Our Software - Stay current with the latest features through automatic updates for your SDK. + Stay current with the latest features through automatic SDK updates. @@ -25,7 +25,7 @@ description: "Our SDKs – your gateway to effortless integration! Our Software ## Official SDKs -Choose your preferred programming language to get started: +Choose a programming language to get started: -This is a private channel. You must [authorize](/websocket/account-streams/authorize) your WebSocket connection before subscribing. +This is a private channel. [Authorize](/websocket/account-streams/authorize) the WebSocket connection before subscribing. diff --git a/websocket/account-streams/balance-spot.mdx b/websocket/account-streams/balance-spot.mdx index b002908..b80914a 100644 --- a/websocket/account-streams/balance-spot.mdx +++ b/websocket/account-streams/balance-spot.mdx @@ -4,11 +4,11 @@ title: Balance Spot --- -This is a private channel. You must [authorize](/websocket/account-streams/authorize) your WebSocket connection before subscribing. +This is a private channel. [Authorize](/websocket/account-streams/authorize) the WebSocket connection before subscribing. Get and subscribe to [spot balance](/glossary#balance-spotbalance-trade) updates. - + **Update interval**: 1 second - + diff --git a/websocket/account-streams/borrows-events.mdx b/websocket/account-streams/borrows-events.mdx index cac0c6d..4ed915c 100644 --- a/websocket/account-streams/borrows-events.mdx +++ b/websocket/account-streams/borrows-events.mdx @@ -4,5 +4,5 @@ title: Borrows Events --- -This is a private channel. You must [authorize](/websocket/account-streams/authorize) your WebSocket connection before subscribing. +This is a private channel. [Authorize](/websocket/account-streams/authorize) the WebSocket connection before subscribing. diff --git a/websocket/account-streams/borrows.mdx b/websocket/account-streams/borrows.mdx index 716950e..facddb0 100644 --- a/websocket/account-streams/borrows.mdx +++ b/websocket/account-streams/borrows.mdx @@ -4,5 +4,5 @@ title: Borrows --- -This is a private channel. You must [authorize](/websocket/account-streams/authorize) your WebSocket connection before subscribing. +This is a private channel. [Authorize](/websocket/account-streams/authorize) the WebSocket connection before subscribing. diff --git a/websocket/account-streams/deals.mdx b/websocket/account-streams/deals.mdx index 86820cb..0674bd3 100644 --- a/websocket/account-streams/deals.mdx +++ b/websocket/account-streams/deals.mdx @@ -4,5 +4,5 @@ title: Deals --- -This is a private channel. You must [authorize](/websocket/account-streams/authorize) your WebSocket connection before subscribing. +This is a private channel. [Authorize](/websocket/account-streams/authorize) the WebSocket connection before subscribing. diff --git a/websocket/account-streams/margin-positions-events.mdx b/websocket/account-streams/margin-positions-events.mdx index cf9e12e..12564b8 100644 --- a/websocket/account-streams/margin-positions-events.mdx +++ b/websocket/account-streams/margin-positions-events.mdx @@ -4,5 +4,5 @@ title: Margin Positions Events --- -This is a private channel. You must [authorize](/websocket/account-streams/authorize) your WebSocket connection before subscribing. +This is a private channel. [Authorize](/websocket/account-streams/authorize) the WebSocket connection before subscribing. diff --git a/websocket/account-streams/orders-executed.mdx b/websocket/account-streams/orders-executed.mdx index 4f2e092..3b667be 100644 --- a/websocket/account-streams/orders-executed.mdx +++ b/websocket/account-streams/orders-executed.mdx @@ -4,9 +4,9 @@ title: Orders Executed --- -This is a private channel. You must [authorize](/websocket/account-streams/authorize) your WebSocket connection before subscribing. +This is a private channel. [Authorize](/websocket/account-streams/authorize) the WebSocket connection before subscribing. - This private stream returns executed orders, including orders that use Retail Price Improvement (RPI) mode. + The private stream returns executed orders, including orders using Retail Price Improvement (RPI) mode. \ No newline at end of file diff --git a/websocket/account-streams/orders-pending.mdx b/websocket/account-streams/orders-pending.mdx index ccb8104..3c73fd9 100644 --- a/websocket/account-streams/orders-pending.mdx +++ b/websocket/account-streams/orders-pending.mdx @@ -4,9 +4,9 @@ title: Orders Pending --- -This is a private channel. You must [authorize](/websocket/account-streams/authorize) your WebSocket connection before subscribing. +This is a private channel. [Authorize](/websocket/account-streams/authorize) the WebSocket connection before subscribing. - This private stream returns active orders, including orders that use Retail Price Improvement (RPI) mode. + The private stream returns active orders, including orders using Retail Price Improvement (RPI) mode. \ No newline at end of file diff --git a/websocket/account-streams/overview.mdx b/websocket/account-streams/overview.mdx index a1aa609..39b7743 100644 --- a/websocket/account-streams/overview.mdx +++ b/websocket/account-streams/overview.mdx @@ -7,13 +7,13 @@ Browse the available private WebSocket channels below. For connection details, m - Authenticate your WebSocket connection to access private channels + Authenticate the WebSocket connection to access private channels - Real-time spot balance updates for your account + Real-time spot balance updates for the account - Real-time margin balance updates for your account + Real-time margin balance updates for the account Stream of pending (open) orders and their updates diff --git a/websocket/account-streams/positions.mdx b/websocket/account-streams/positions.mdx index 6e944a7..0337326 100644 --- a/websocket/account-streams/positions.mdx +++ b/websocket/account-streams/positions.mdx @@ -4,15 +4,15 @@ title: Positions --- -This is a private channel. You must [authorize](/websocket/account-streams/authorize) your WebSocket connection before subscribing. +This is a private channel. [Authorize](/websocket/account-streams/authorize) the WebSocket connection before subscribing. Subscribe to positions updates. -This endpoint does **NOT** support query operations - only subscribe/update/unsubscribe. +This channel does **NOT** support query operations - only subscribe/update/unsubscribe. - + **Update interval**: 1 second - + diff --git a/websocket/market-streams/book-ticker.mdx b/websocket/market-streams/book-ticker.mdx index 13cae05..45ea545 100644 --- a/websocket/market-streams/book-ticker.mdx +++ b/websocket/market-streams/book-ticker.mdx @@ -4,7 +4,7 @@ title: Book Ticker --- ## Overview -The Book Ticker endpoint provides real-time best bid and best ask updates for a market. +The Book Ticker channel provides real-time best bid and best ask updates for a market. The stream sends updates whenever the best bid or best ask price changes. diff --git a/websocket/market-streams/depth.mdx b/websocket/market-streams/depth.mdx index 1a091d9..e31eb1c 100644 --- a/websocket/market-streams/depth.mdx +++ b/websocket/market-streams/depth.mdx @@ -5,7 +5,7 @@ title: Order Book Depth ## Overview -The Market Depth endpoint provides real-time order book data with support for both one-time queries and subscription-based updates. +The Market Depth channel provides real-time order book data with support for both one-time queries and subscription-based updates. ### Update Behavior @@ -23,23 +23,23 @@ Private active order endpoints and private WebSocket streams return RPI orders. - **First message** (`past_update_id` is absent): Full order book snapshot with all price levels - **Subsequent messages** (`past_update_id` is present): Only changed price levels -- **Removed levels**: Shown as `[price, "0"]` - when amount is "0", remove that price level from your local order book +- **Removed levels**: Shown as `[price, "0"]` - when amount is "0", remove the price level from the local order book - -If 10 seconds elapse without any order book changes, the server will push a full snapshot again as a keepalive mechanism. - + +If 10 seconds elapse without any order book changes, the server pushes a full snapshot again as a keepalive mechanism. + ## Maintaining a Local Order Book -To maintain an accurate local order book, follow this algorithm: +To maintain an accurate local order book, follow the algorithm below: 1. Subscribe to depth updates -2. Receive the first message (full snapshot) - initialize your order book +2. Receive the first message (full snapshot) - initialize the order book 3. For each incremental update: - - If amount is "0" → remove that price level + - If amount is "0" → remove the price level - If amount is not "0" → update existing level or insert new level at the correct sorted position 4. Keep order book sorted: asks ascending, bids descending -5. Truncate to your desired limit after each update +5. Truncate to the desired limit after each update ## Code Examples @@ -91,10 +91,10 @@ ws.addEventListener("message", (event: MessageEvent) => { function applyUpdates(orderBookSide: IDepth[], updates: IDepth[] | undefined, side: "ask" | "bid") { if (updates === undefined) return; for (const [price, amount] of updates) { - // Find the index of an entry in orderBookSide that matches the given price. + // Find the index of an entry in orderBookSide matching the given price. const priceIndex = orderBookSide.findIndex((level) => level[0] === price); - // If the amount is '0', it means this price level should be removed from the orderBookSide. + // If the amount is '0', remove the price level from the orderBookSide. if (amount === "0") { if (priceIndex !== -1) { // Remove the existing price level since the amount is '0'. diff --git a/websocket/market-streams/kline.mdx b/websocket/market-streams/kline.mdx index a7e66f4..6ad3ab7 100644 --- a/websocket/market-streams/kline.mdx +++ b/websocket/market-streams/kline.mdx @@ -16,21 +16,21 @@ The requested interval must meet specific mathematical conditions to ensure prop ### Rules by Interval Size -- 60 must be divisible by your interval without remainder +- 60 must be divisible by the interval without remainder - Valid examples: 1s, 2s, 3s, 4s, 5s, 6s, 10s, 12s, 15s, 20s, 30s - Invalid examples: 7s, 11s, 13s, 17s - Interval must be divisible by 60 without remainder -- 3600 must be divisible by your interval without remainder +- 3600 must be divisible by the interval without remainder - Valid examples: 1m (60s), 2m (120s), 3m (180s), 5m (300s), 15m (900s), 30m (1800s) - Invalid examples: 7m (420s), 11m (660s) - Interval must be divisible by 3600 without remainder -- 86400 must be divisible by your interval without remainder +- 86400 must be divisible by the interval without remainder - Valid examples: 1h (3600s), 2h (7200s), 4h (14400s), 6h (21600s), 12h (43200s) - Invalid examples: 5h (18000s), 7h (25200s) diff --git a/websocket/market-streams/market-today.mdx b/websocket/market-streams/market-today.mdx index cd0323c..2ce9c10 100644 --- a/websocket/market-streams/market-today.mdx +++ b/websocket/market-streams/market-today.mdx @@ -5,7 +5,7 @@ title: Market statistics for current day UTC ## Overview -This endpoint provides market statistics for the current day in UTC timezone, resetting daily at UTC midnight. +This channel provides market statistics for the current day in UTC timezone, resetting daily at UTC midnight. ## Field Descriptions @@ -22,6 +22,6 @@ All statistics reset to zero at UTC midnight (00:00 UTC) each day. ## Query Limitation - + The query method (`marketToday_query`) accepts **only one market per request**. To get data for multiple markets, make separate requests or use the subscription method. - + diff --git a/websocket/market-streams/market.mdx b/websocket/market-streams/market.mdx index cc34d29..dcf04af 100644 --- a/websocket/market-streams/market.mdx +++ b/websocket/market-streams/market.mdx @@ -10,7 +10,7 @@ Understanding the market statistics fields: - **period**: The time window in seconds for the statistics - **last**: Current last trade price - **open**: The price at the beginning of the period (at 'now - period' time) -- **close**: The price that closes/ends the period (typically same as `last` for current period) +- **close**: The closing price for the period (typically same as `last` for current period) - **high**: Highest price reached during the period - **low**: Lowest price reached during the period - **volume**: Total trading volume in [stock](/glossary#stock) currency (base currency) @@ -19,7 +19,7 @@ Understanding the market statistics fields: ## Subscription Limitation -You can only subscribe for a **24-hour period** (86400 seconds). Custom period subscriptions are not supported. +Subscriptions support only a **24-hour period** (86400 seconds). Custom period subscriptions are not supported. -For queries (`market_request`), you can specify any valid period. For subscriptions (`market_subscribe`), the period is fixed at 24 hours from the current time. +For queries (`market_request`), specify any valid period. For subscriptions (`market_subscribe`), the period is fixed at 24 hours from the current time. diff --git a/websocket/market-streams/trades.mdx b/websocket/market-streams/trades.mdx index a193261..1c32a67 100644 --- a/websocket/market-streams/trades.mdx +++ b/websocket/market-streams/trades.mdx @@ -6,7 +6,7 @@ title: Market Trades ## Subscription Behavior -For each WebSocket connection, you can subscribe to either specific markets or all markets. **Every new subscription replaces the existing one.** +For each WebSocket connection, subscribe to either specific markets or all markets. **Every new subscription replaces the existing one.** ### Subscribe to Specific Markets @@ -43,12 +43,12 @@ Trade updates may include an `rpi` field: - `rpi: true` - The trade involved a Retail Price Improvement (RPI) order - `rpi: false` or absent - Regular trade - + RPI orders provide better execution prices than the current best bid/ask for retail traders. - + -Public trade updates can include executions that originate from RPI orders. +Public trade updates can include executions originating from RPI orders. Public market data feeds do not expose RPI orders as visible liquidity in `depth` or `bookTicker`. RPI orders remain visible only in private active orders and in the exchange UI order book (web and mobile). diff --git a/websocket/overview.mdx b/websocket/overview.mdx index 1f73b92..6a60c4e 100644 --- a/websocket/overview.mdx +++ b/websocket/overview.mdx @@ -14,7 +14,7 @@ WebSocket endpoint: **`wss://api.whitebit.com/ws`** The API is based on [JSON RPC](https://www.jsonrpc.org/specification) over the WebSocket protocol. -All endpoints return time in Unix-time format. +The API returns time in Unix-time format. ## Connection Timeout @@ -50,7 +50,7 @@ JSON structure of a request message: | Field | Type | Description | |-------|------|-------------| -| `id` | Integer | Unique identifier to match the response to your request | +| `id` | Integer | Unique identifier to match the response to the request | | `method` | String | Name of the method to call | | `params` | Array | Parameters for the method | @@ -121,7 +121,7 @@ JSON structure of a response message: ## Authentication -Private channels (Account Streams) require authorization before you can subscribe. After connecting, send an `authorize` request with your API credentials to gain access to private data such as balances, orders, deals, and positions. +Private channels (Account Streams) require authorization before subscribing. After connecting, send an `authorize` request with API credentials to gain access to private data such as balances, orders, deals, and positions. See the [Authorize](/websocket/account-streams/authorize) channel page for the full request format, parameters, and examples. From b15516105d320218a87ea744e13fb8b0ab04ec0f Mon Sep 17 00:00:00 2001 From: whitebit-robot Date: Fri, 20 Feb 2026 17:59:38 +0100 Subject: [PATCH 33/84] docs(api): add quickstart and rate-limits pages; restructure navigation - Add api-reference/quickstart and rate-limits (REST-only) pages - Add websocket/quickstart page - Add AI Tools guide pages (use-with-ai, ai-context-menu, ai-ide-setup) - Restructure docs.json navigation (icons, groups, AI Tools group) - Fix AsyncAPI YAML descriptions for voice and structure consistency --- api-reference/authentication.mdx | 2 + api-reference/overview.mdx | 6 +- api-reference/quickstart.mdx | 135 ++++++++++++++ api-reference/rate-limits.mdx | 93 ++++++++++ asyncapi/private/authorize.yaml | 7 +- asyncapi/private/balance_margin.yaml | 16 +- asyncapi/private/balance_spot.yaml | 16 +- asyncapi/private/borrows.yaml | 13 +- asyncapi/private/borrows_events.yaml | 13 +- asyncapi/private/deals.yaml | 16 +- asyncapi/private/margin_positions_events.yaml | 13 +- asyncapi/private/orders_executed.yaml | 16 +- asyncapi/private/orders_pending.yaml | 16 +- asyncapi/private/positions.yaml | 13 +- asyncapi/public/book_ticker.yaml | 10 +- asyncapi/public/depth.yaml | 12 +- asyncapi/public/kline.yaml | 12 +- asyncapi/public/lastprice.yaml | 12 +- asyncapi/public/market.yaml | 12 +- asyncapi/public/market_today.yaml | 12 +- asyncapi/public/service.yaml | 4 + asyncapi/public/trades.yaml | 12 +- docs.json | 99 +++++++++-- guides/ai-context-menu.mdx | 109 ++++++++++++ guides/ai-ide-setup.mdx | 116 ++++++++++++ guides/use-with-ai.mdx | 26 +++ platform/overview.mdx | 1 + websocket/overview.mdx | 17 +- websocket/quickstart.mdx | 168 ++++++++++++++++++ 29 files changed, 907 insertions(+), 90 deletions(-) create mode 100644 api-reference/quickstart.mdx create mode 100644 api-reference/rate-limits.mdx create mode 100644 guides/ai-context-menu.mdx create mode 100644 guides/ai-ide-setup.mdx create mode 100644 guides/use-with-ai.mdx create mode 100644 websocket/quickstart.mdx diff --git a/api-reference/authentication.mdx b/api-reference/authentication.mdx index ea5ea67..60b9eaf 100644 --- a/api-reference/authentication.mdx +++ b/api-reference/authentication.mdx @@ -111,6 +111,8 @@ WhiteBIT provides the [API Quick Start Helper](https://github.com/whitebit-excha | ”Invalid nonceWindow.” | nonceWindow is not a boolean | Ensure nonceWindow is set to true or false | | ”Request not provided.” | Missing request path in body | Include request path in all requests | +For rate limits and REST error format, see [Rate limits and error codes](/api-reference/rate-limits). + ## Related resources - [API Reference Overview](/api-reference/overview) — Base URL, rate limits, and error format diff --git a/api-reference/overview.mdx b/api-reference/overview.mdx index 55344e1..3c81abe 100644 --- a/api-reference/overview.mdx +++ b/api-reference/overview.mdx @@ -22,7 +22,7 @@ https://whitebit.com/api/v4/{endpoint} ## Authentication -Private endpoints require API key authentication with HMAC-SHA512 signed requests. See the [Authentication Guide](/api-reference/authentication) for setup instructions, header requirements, and code examples. +Private endpoints require API key authentication with HMAC-SHA512 signed requests. See the [Authentication Guide](/api-reference/authentication) for setup instructions, header requirements, and code examples. For a step-by-step tutorial, see the [Quickstart](/api-reference/quickstart). ## Rate Limits @@ -31,6 +31,8 @@ Private endpoints require API key authentication with HMAC-SHA512 signed request | Public REST endpoints | 2000 requests / 10 sec | | Private REST endpoints | Varies per endpoint (see individual docs) | +For complete rate limits, error codes, and best practices, see [Rate Limits & Error Codes](/api-reference/rate-limits). + ## Error Format All V4 endpoints return errors as JSON. The format differs slightly between public and private APIs: @@ -58,7 +60,7 @@ All V4 endpoints return errors as JSON. The format differs slightly between publ } ``` -For full details, see the [Market Data overview](/api-reference/market-data/overview) and [Spot Trading overview](/api-reference/spot-trading/overview). +For full details, see the [Market Data overview](/api-reference/market-data/overview) and [Spot Trading overview](/api-reference/spot-trading/overview). For all error codes and troubleshooting, see [Rate Limits & Error Codes](/api-reference/rate-limits). --- diff --git a/api-reference/quickstart.mdx b/api-reference/quickstart.mdx new file mode 100644 index 0000000..c4139fa --- /dev/null +++ b/api-reference/quickstart.mdx @@ -0,0 +1,135 @@ +--- +title: "REST API Quickstart" +sidebarTitle: "Quickstart" +description: "Step-by-step guide to make the first public and private REST API calls to the WhiteBIT API." +--- + +import { RegionBaseUrl } from '/components/RegionBaseUrl.jsx'; +import { ApiMonitorTable } from '/snippets/api-monitor.jsx'; + +This guide explains how to make the first public and private REST API calls to the WhiteBIT API. + +## Prerequisites + +- A WhiteBIT account ([Sign up](https://whitebit.com/auth)) +- An API key with appropriate permissions ([API Settings](https://whitebit.com/settings/api)) +- A programming language or HTTP client (cURL, Python, JavaScript, or similar) + +## Base URL and region + + + +All REST API endpoints use the base path `/api/v4/{endpoint}`. Public endpoints use `GET`; private endpoints use `POST` with JSON in the request body. + +## Step 1: First public API call + +The [Server Status](/api-reference/market-data/server-status) endpoint returns the API life-state. No authentication is required. + +**Request:** + + + +```bash +curl -X GET "https://whitebit.com/api/v4/public/ping" +``` + + +```python +import requests + +response = requests.get("https://whitebit.com/api/v4/public/ping") +print(response.json()) +``` + + +```javascript +const response = await fetch("https://whitebit.com/api/v4/public/ping"); +const data = await response.json(); +console.log(data); +``` + + + +**Expected response:** + +```json +["pong"] +``` + +A response of `["pong"]` confirms the API is operational. + +## Step 2: Authentication setup + +Private endpoints require HMAC-SHA512 signed requests. The [Authentication](/api-reference/authentication) guide covers the full signing process. + +WhiteBIT provides the [API Quick Start Helper](https://github.com/whitebit-exchange/api-quickstart) library with examples in Python, PHP, Node.js, Go, JavaScript, Kotlin, .NET, Ruby, C++, and Rust. Use the helper for production integrations. + +**Required headers for private endpoints:** + +| Header | Value | +|--------|-------| +| `Content-type` | `application/json` | +| `X-TXC-APIKEY` | The public API key | +| `X-TXC-PAYLOAD` | Base64-encoded request body | +| `X-TXC-SIGNATURE` | HMAC-SHA512 signature (hex encoded) | + +## Step 3: First authenticated API call + +The [Main Balance](/api-reference/account-wallet/main-balance) endpoint retrieves the main account balance. The request body must include `request` (the endpoint path) and `nonce` (unique identifier). + +**Request body:** + +```json +{ + "request": "/api/v4/main-account/balance", + "nonce": "1594297865000" +} +``` + +**Example with cURL** (replace `YOUR_API_KEY` and `YOUR_SIGNATURE` with the signed payload): + + + +```bash +curl -X POST "https://whitebit.com/api/v4/main-account/balance" \ + -H "Content-type: application/json" \ + -H "X-TXC-APIKEY: YOUR_API_KEY" \ + -H "X-TXC-PAYLOAD: BASE64_ENCODED_PAYLOAD" \ + -H "X-TXC-SIGNATURE: YOUR_SIGNATURE" \ + -d '{"request":"/api/v4/main-account/balance","nonce":"1594297865000"}' +``` + + +```python +# Use the API Quick Start Helper: https://github.com/whitebit-exchange/api-quickstart +from whitebit import Whitebit + +wb = Whitebit(api_key="YOUR_API_KEY", api_secret="YOUR_API_SECRET") +balance = wb.main_account_balance() +print(balance) +``` + + + +**Expected response:** + +```json +{ + "BTC": { "main_balance": "0" }, + "USDT": { "main_balance": "100.50" } +} +``` + +The response contains balance data for each asset. Omitted assets have a zero balance. + +## Live API activity + + + +## What's next + +- [Authentication](/api-reference/authentication) — Full signing process and common errors +- [Market Data](/api-reference/market-data/overview) — Public endpoints for orderbook, trades, and market info +- [Spot Trading](/api-reference/spot-trading/overview) — Place and manage orders +- [WebSocket Quickstart](/websocket/quickstart) — Real-time market data streams +- [API Quick Start Helper](https://github.com/whitebit-exchange/api-quickstart) — Multi-language SDK for authentication and requests diff --git a/api-reference/rate-limits.mdx b/api-reference/rate-limits.mdx new file mode 100644 index 0000000..fca9d3d --- /dev/null +++ b/api-reference/rate-limits.mdx @@ -0,0 +1,93 @@ +--- +title: "REST API rate limits and error codes" +sidebarTitle: "Rate limits and errors" +description: "Reference for REST API rate limits, error formats, authentication error codes, and best practices." +--- + +Reference for REST API rate limits, error formats, and error codes. + +## REST API rate limits + +| Scope | Limit | +|-------|-------| +| Public REST endpoints | 2000 requests / 10 sec | +| Private REST endpoints | Varies per endpoint (see individual endpoint pages) | + +Private endpoints such as [Main Balance](/api-reference/account-wallet/main-balance) have a rate limit of 1000 requests / 10 sec. Check each endpoint page for the endpoint-specific limit. + +When the rate limit is exceeded, the API returns HTTP status `429` (Too Many Requests). Use exponential backoff before retrying (see Best practices below). + +## REST API error format + +All v4 endpoints return errors as JSON. The format differs between public and private APIs. + +### Public endpoints + +```json +{ + "success": false, + "message": "ERROR MESSAGE", + "params": [] +} +``` + +### Private endpoints + +```json +{ + "code": 0, + "message": "MESSAGE", + "errors": { + "PARAM1": ["MESSAGE"], + "PARAM2": ["MESSAGE"] + } +} +``` + +## Authentication error reference + +The following errors are returned by private REST endpoints when the request signature or credentials are invalid. + +| Error message | Cause | Resolution | +|---------------|-------|------------| +| "Too many requests." | Nonce value is not greater than previous request | Use incrementing nonce values | +| "This action is unauthorized. Enable your key in API settings" | Using a disabled API key | Enable the key in API settings or check IP restrictions | +| "You don't have permission to use this endpoint." | Endpoint access is restricted | Update endpoint access in API key settings | +| "Invalid payload" | Payload does not match the decoded value | Ensure proper base64 encoding of the request body | +| "Unauthorized request." | Request signed incorrectly | Verify the signature creation process | +| "Nonce not provided." | Missing nonce in request body | Include nonce in all requests | +| "Your nonce is more than 5 seconds lesser than the current nonce" | Invalid timestamp when using nonceWindow | Use current Unix timestamp in milliseconds | +| "Invalid nonceWindow." | nonceWindow is not a boolean | Set nonceWindow to `true` or `false` | +| "Request not provided." | Missing request path in body | Include the request path in all requests | + +## HTTP status codes + +| Status | Meaning | +|--------|---------| +| `200` | Success | +| `400` | Bad request — invalid parameters | +| `401` | Unauthorized — missing or invalid authentication | +| `403` | Forbidden — insufficient permissions | +| `404` | Not found — endpoint does not exist | +| `429` | Too Many Requests — rate limit exceeded | +| `500` | Internal server error — retry with backoff | + +## Best practices + +### Exponential backoff + +When rate limited, wait before retrying. Double the wait time after each failed attempt (1s → 2s → 4s → 8s). + +### Batch requests + +Combine multiple operations when the API supports batch endpoints. For example, use [Bulk Limit Order](/api-reference/spot-trading/bulk-limit-order) instead of multiple single order requests. + +### Nonce management + +For private endpoints, ensure each request uses a unique, incrementing nonce. Use Unix timestamp in milliseconds when `nonceWindow` is enabled. Avoid concurrent requests with the same nonce. + +## Related resources + +- [API Reference Overview](/api-reference/overview) — Base URL and endpoint groups +- [Authentication](/api-reference/authentication) — Signing and header requirements +- [WebSocket Overview](/websocket/overview) — WebSocket rate limits, error codes, and connection details diff --git a/asyncapi/private/authorize.yaml b/asyncapi/private/authorize.yaml index 12e3a4f..132a61a 100644 --- a/asyncapi/private/authorize.yaml +++ b/asyncapi/private/authorize.yaml @@ -93,8 +93,9 @@ components: type: integer description: Unique request identifier method: + type: string const: authorize - description: Method name for authorization + description: "Method name. Fixed value: `authorize`." params: type: array minItems: 2 @@ -124,8 +125,8 @@ components: properties: status: type: string - enum: [success] - description: Authorization status + const: success + description: "Fixed value: `success`." error: type: "null" description: Error object (null on success) \ No newline at end of file diff --git a/asyncapi/private/balance_margin.yaml b/asyncapi/private/balance_margin.yaml index cd974fe..41c9b35 100644 --- a/asyncapi/private/balance_margin.yaml +++ b/asyncapi/private/balance_margin.yaml @@ -239,8 +239,9 @@ components: type: integer description: Unique request identifier method: + type: string const: balanceMargin_request - description: Method name for margin balance query + description: "Method name. Fixed value: `balanceMargin_request`." params: type: array items: @@ -291,8 +292,9 @@ components: type: integer description: Unique request identifier method: + type: string const: balanceMargin_subscribe - description: Method name for margin balance subscription + description: "Method name. Fixed value: `balanceMargin_subscribe`." params: type: array items: @@ -317,8 +319,8 @@ components: properties: status: type: string - enum: [success] - description: Subscription status + const: success + description: "Fixed value: `success`." error: type: "null" description: Error object (null on success) @@ -334,8 +336,9 @@ components: type: "null" description: Update events have null id method: + type: string const: balanceMargin_update - description: Method name for margin balance updates + description: "Method name. Fixed value: `balanceMargin_update`." params: type: array items: @@ -371,7 +374,8 @@ components: description: Unique request identifier method: type: string - description: Unsubscribe method name + const: balanceMargin_unsubscribe + description: "Method name. Fixed value: `balanceMargin_unsubscribe`." params: type: array items: {} diff --git a/asyncapi/private/balance_spot.yaml b/asyncapi/private/balance_spot.yaml index e6eb2dc..a4e9183 100644 --- a/asyncapi/private/balance_spot.yaml +++ b/asyncapi/private/balance_spot.yaml @@ -221,8 +221,9 @@ components: type: integer description: Unique request identifier method: + type: string const: balanceSpot_request - description: Method name for balance query + description: "Method name. Fixed value: `balanceSpot_request`." params: type: array items: @@ -267,8 +268,9 @@ components: type: integer description: Unique request identifier method: + type: string const: balanceSpot_subscribe - description: Method name for balance subscription + description: "Method name. Fixed value: `balanceSpot_subscribe`." params: type: array items: @@ -293,8 +295,8 @@ components: properties: status: type: string - enum: [success] - description: Subscription status + const: success + description: "Fixed value: `success`." error: type: "null" description: Error object (null on success) @@ -310,8 +312,9 @@ components: type: "null" description: Update events have null id method: + type: string const: balanceSpot_update - description: Method name for balance updates + description: "Method name. Fixed value: `balanceSpot_update`." params: type: array items: @@ -340,7 +343,8 @@ components: description: Unique request identifier method: type: string - description: Unsubscribe method name + const: balanceSpot_unsubscribe + description: "Method name. Fixed value: `balanceSpot_unsubscribe`." params: type: array items: {} diff --git a/asyncapi/private/borrows.yaml b/asyncapi/private/borrows.yaml index a5bbc10..93ff2da 100644 --- a/asyncapi/private/borrows.yaml +++ b/asyncapi/private/borrows.yaml @@ -167,8 +167,9 @@ components: type: integer description: Unique request identifier method: + type: string const: borrowsMargin_subscribe - description: Method name for borrows subscription + description: "Method name. Fixed value: `borrowsMargin_subscribe`." params: type: array items: {} @@ -192,8 +193,8 @@ components: properties: status: type: string - enum: [success] - description: Subscription status + const: success + description: "Fixed value: `success`." error: type: "null" description: Error object (null on success) @@ -209,8 +210,9 @@ components: type: "null" description: Update events have null id method: + type: string const: borrowsMargin_update - description: Method name for borrows updates + description: "Method name. Fixed value: `borrowsMargin_update`." params: type: object properties: @@ -253,7 +255,8 @@ components: description: Unique request identifier method: type: string - description: Unsubscribe method name + const: borrowsMargin_unsubscribe + description: "Method name. Fixed value: `borrowsMargin_unsubscribe`." params: type: array items: {} diff --git a/asyncapi/private/borrows_events.yaml b/asyncapi/private/borrows_events.yaml index cd6502d..8ab70e4 100644 --- a/asyncapi/private/borrows_events.yaml +++ b/asyncapi/private/borrows_events.yaml @@ -174,8 +174,9 @@ components: type: integer description: Unique request identifier method: + type: string const: borrowsAccountMargin_subscribe - description: Method name for borrows events subscription + description: "Method name. Fixed value: `borrowsAccountMargin_subscribe`." params: type: array items: {} @@ -199,8 +200,8 @@ components: properties: status: type: string - enum: [success] - description: Subscription status + const: success + description: "Fixed value: `success`." error: type: "null" description: Error object (null on success) @@ -216,8 +217,9 @@ components: type: "null" description: Update events have null id method: + type: string const: borrowsAccountMargin_update - description: Method name for borrows events updates + description: "Method name. Fixed value: `borrowsAccountMargin_update`." params: type: array description: | @@ -264,7 +266,8 @@ components: description: Unique request identifier method: type: string - description: Unsubscribe method name + const: borrowsAccountMargin_unsubscribe + description: "Method name. Fixed value: `borrowsAccountMargin_unsubscribe`." params: type: array items: {} diff --git a/asyncapi/private/deals.yaml b/asyncapi/private/deals.yaml index a5272a4..3a5449b 100644 --- a/asyncapi/private/deals.yaml +++ b/asyncapi/private/deals.yaml @@ -254,8 +254,9 @@ components: type: integer description: Unique request identifier method: + type: string const: deals_request - description: Method name for deals query + description: "Method name. Fixed value: `deals_request`." params: type: array description: | @@ -353,8 +354,9 @@ components: type: integer description: Unique request identifier method: + type: string const: deals_subscribe - description: Method name for deals subscription + description: "Method name. Fixed value: `deals_subscribe`." params: type: array minItems: 1 @@ -383,8 +385,8 @@ components: properties: status: type: string - enum: [success] - description: Subscription status + const: success + description: "Fixed value: `success`." error: type: "null" description: Error object (null on success) @@ -400,8 +402,9 @@ components: type: "null" description: Update events have null id method: + type: string const: deals_update - description: Method name for deals updates + description: "Method name. Fixed value: `deals_update`." params: type: array description: | @@ -457,7 +460,8 @@ components: description: Unique request identifier method: type: string - description: Unsubscribe method name + const: deals_unsubscribe + description: "Method name. Fixed value: `deals_unsubscribe`." params: type: array items: {} diff --git a/asyncapi/private/margin_positions_events.yaml b/asyncapi/private/margin_positions_events.yaml index 35341b3..e563852 100644 --- a/asyncapi/private/margin_positions_events.yaml +++ b/asyncapi/private/margin_positions_events.yaml @@ -184,8 +184,9 @@ components: type: integer description: Unique request identifier method: + type: string const: positionsAccountMargin_subscribe - description: Method name for margin positions events subscription + description: "Method name. Fixed value: `positionsAccountMargin_subscribe`." params: type: array items: {} @@ -209,8 +210,8 @@ components: properties: status: type: string - enum: [success] - description: Subscription status + const: success + description: "Fixed value: `success`." error: type: "null" description: Error object (null on success) @@ -226,8 +227,9 @@ components: type: "null" description: Update events have null id method: + type: string const: positionsAccountMargin_update - description: Method name for margin positions events updates + description: "Method name. Fixed value: `positionsAccountMargin_update`." params: type: array description: | @@ -307,7 +309,8 @@ components: description: Unique request identifier method: type: string - description: Unsubscribe method name + const: positionsAccountMargin_unsubscribe + description: "Method name. Fixed value: `positionsAccountMargin_unsubscribe`." params: type: array items: {} diff --git a/asyncapi/private/orders_executed.yaml b/asyncapi/private/orders_executed.yaml index ab7a8fd..5350360 100644 --- a/asyncapi/private/orders_executed.yaml +++ b/asyncapi/private/orders_executed.yaml @@ -266,8 +266,9 @@ components: type: integer description: Unique request identifier method: + type: string const: ordersExecuted_request - description: Method name for executed orders query + description: "Method name. Fixed value: `ordersExecuted_request`." params: type: array description: | @@ -332,8 +333,9 @@ components: type: integer description: Unique request identifier method: + type: string const: ordersExecuted_subscribe - description: Method name for executed orders subscription + description: "Method name. Fixed value: `ordersExecuted_subscribe`." params: type: array description: | @@ -369,8 +371,8 @@ components: properties: status: type: string - enum: [success] - description: Subscription status + const: success + description: "Fixed value: `success`." error: type: "null" description: Error object (null on success) @@ -386,8 +388,9 @@ components: type: "null" description: Update events have null id method: + type: string const: ordersExecuted_update - description: Method name for executed orders updates + description: "Method name. Fixed value: `ordersExecuted_update`." params: type: array items: @@ -481,7 +484,8 @@ components: description: Unique request identifier method: type: string - description: Unsubscribe method name + const: ordersExecuted_unsubscribe + description: "Method name. Fixed value: `ordersExecuted_unsubscribe`." params: type: array items: {} diff --git a/asyncapi/private/orders_pending.yaml b/asyncapi/private/orders_pending.yaml index 9d0d564..a71ae52 100644 --- a/asyncapi/private/orders_pending.yaml +++ b/asyncapi/private/orders_pending.yaml @@ -272,8 +272,9 @@ components: type: integer description: Unique request identifier method: + type: string const: ordersPending_request - description: Method name for pending orders query + description: "Method name. Fixed value: `ordersPending_request`." params: type: array minItems: 3 @@ -328,8 +329,9 @@ components: type: integer description: Unique request identifier method: + type: string const: ordersPending_subscribe - description: Method name for pending orders subscription + description: "Method name. Fixed value: `ordersPending_subscribe`." params: type: array items: @@ -354,8 +356,8 @@ components: properties: status: type: string - enum: [success] - description: Subscription status + const: success + description: "Fixed value: `success`." error: type: "null" description: Error object (null on success) @@ -371,8 +373,9 @@ components: type: "null" description: Update events have null id method: + type: string const: ordersPending_update - description: Method name for pending orders updates + description: "Method name. Fixed value: `ordersPending_update`." params: type: array minItems: 2 @@ -462,7 +465,8 @@ components: description: Unique request identifier method: type: string - description: Unsubscribe method name + const: ordersPending_unsubscribe + description: "Method name. Fixed value: `ordersPending_unsubscribe`." params: type: array items: {} diff --git a/asyncapi/private/positions.yaml b/asyncapi/private/positions.yaml index 7faaead..fe9a492 100644 --- a/asyncapi/private/positions.yaml +++ b/asyncapi/private/positions.yaml @@ -177,8 +177,9 @@ components: type: integer description: Unique request identifier method: + type: string const: positionsMargin_subscribe - description: Method name for positions subscription + description: "Method name. Fixed value: `positionsMargin_subscribe`." params: type: array items: {} @@ -202,8 +203,8 @@ components: properties: status: type: string - enum: [success] - description: Subscription status + const: success + description: "Fixed value: `success`." error: type: "null" description: Error object (null on success) @@ -219,8 +220,9 @@ components: type: "null" description: Update events have null id method: + type: string const: positionsMargin_update - description: Method name for positions updates + description: "Method name. Fixed value: `positionsMargin_update`." params: type: object properties: @@ -296,7 +298,8 @@ components: description: Unique request identifier method: type: string - description: Unsubscribe method name + const: positionsMargin_unsubscribe + description: "Method name. Fixed value: `positionsMargin_unsubscribe`." params: type: array items: {} diff --git a/asyncapi/public/book_ticker.yaml b/asyncapi/public/book_ticker.yaml index dc48167..a79408e 100644 --- a/asyncapi/public/book_ticker.yaml +++ b/asyncapi/public/book_ticker.yaml @@ -161,7 +161,9 @@ components: type: integer description: Unique request identifier method: + type: string const: bookTicker_subscribe + description: "Method name. Fixed value: `bookTicker_subscribe`." params: type: array minItems: 0 @@ -186,7 +188,8 @@ components: properties: status: type: string - enum: [success] + const: success + description: "Fixed value: `success`." error: type: "null" @@ -232,7 +235,9 @@ components: id: type: "null" method: + type: string const: bookTicker_update + description: "Method name. Fixed value: `bookTicker_update`." params: type: array minItems: 1 @@ -252,7 +257,8 @@ components: description: Unique request identifier method: type: string - enum: [bookTicker_unsubscribe] + const: bookTicker_unsubscribe + description: "Method name. Fixed value: `bookTicker_unsubscribe`." params: type: array items: {} diff --git a/asyncapi/public/depth.yaml b/asyncapi/public/depth.yaml index d8fe02d..bd88dca 100644 --- a/asyncapi/public/depth.yaml +++ b/asyncapi/public/depth.yaml @@ -305,7 +305,9 @@ components: type: integer description: Unique request identifier method: + type: string const: depth_request + description: "Method name. Fixed value: `depth_request`." params: type: array description: | @@ -347,7 +349,9 @@ components: id: type: integer method: + type: string const: depth_subscribe + description: "Method name. Fixed value: `depth_subscribe`." params: type: array description: | @@ -385,7 +389,8 @@ components: properties: status: type: string - enum: [success] + const: success + description: "Fixed value: `success`." error: type: "null" @@ -399,7 +404,9 @@ components: id: type: "null" method: + type: string const: depth_update + description: "Method name. Fixed value: `depth_update`." params: type: array description: | @@ -427,7 +434,8 @@ components: type: integer method: type: string - enum: [depth_unsubscribe] + const: depth_unsubscribe + description: "Method name. Fixed value: `depth_unsubscribe`." params: type: array items: {} diff --git a/asyncapi/public/kline.yaml b/asyncapi/public/kline.yaml index 57bc075..552f35a 100644 --- a/asyncapi/public/kline.yaml +++ b/asyncapi/public/kline.yaml @@ -256,7 +256,9 @@ components: type: integer description: Unique request identifier method: + type: string const: candles_request + description: "Method name. Fixed value: `candles_request`." params: type: array description: | @@ -305,7 +307,9 @@ components: type: integer description: Unique request identifier method: + type: string const: candles_subscribe + description: "Method name. Fixed value: `candles_subscribe`." params: type: array description: | @@ -336,7 +340,8 @@ components: properties: status: type: string - enum: [success] + const: success + description: "Fixed value: `success`." error: type: "null" @@ -350,7 +355,9 @@ components: id: type: "null" method: + type: string const: candles_update + description: "Method name. Fixed value: `candles_update`." params: type: array minItems: 1 @@ -369,7 +376,8 @@ components: description: Unique request identifier method: type: string - enum: [candles_unsubscribe] + const: candles_unsubscribe + description: "Method name. Fixed value: `candles_unsubscribe`." params: type: array items: {} diff --git a/asyncapi/public/lastprice.yaml b/asyncapi/public/lastprice.yaml index 3db4c94..6013c53 100644 --- a/asyncapi/public/lastprice.yaml +++ b/asyncapi/public/lastprice.yaml @@ -190,7 +190,9 @@ components: type: integer description: Unique request identifier method: + type: string const: lastprice_request + description: "Method name. Fixed value: `lastprice_request`." params: type: array minItems: 1 @@ -225,7 +227,9 @@ components: type: integer description: Unique request identifier method: + type: string const: lastprice_subscribe + description: "Method name. Fixed value: `lastprice_subscribe`." params: type: array items: @@ -248,7 +252,8 @@ components: properties: status: type: string - enum: [success] + const: success + description: "Fixed value: `success`." error: type: "null" @@ -262,7 +267,9 @@ components: id: type: "null" method: + type: string const: lastprice_update + description: "Method name. Fixed value: `lastprice_update`." params: type: array description: | @@ -289,7 +296,8 @@ components: description: Unique request identifier method: type: string - enum: [lastprice_unsubscribe] + const: lastprice_unsubscribe + description: "Method name. Fixed value: `lastprice_unsubscribe`." params: type: array items: {} diff --git a/asyncapi/public/market.yaml b/asyncapi/public/market.yaml index cdb3738..a29b1f1 100644 --- a/asyncapi/public/market.yaml +++ b/asyncapi/public/market.yaml @@ -243,7 +243,9 @@ components: type: integer description: Unique request identifier method: + type: string const: market_request + description: "Method name. Fixed value: `market_request`." params: type: array description: | @@ -281,7 +283,9 @@ components: id: type: integer method: + type: string const: market_subscribe + description: "Method name. Fixed value: `market_subscribe`." params: type: array items: @@ -304,7 +308,8 @@ components: properties: status: type: string - enum: [success] + const: success + description: "Fixed value: `success`." error: type: "null" @@ -318,7 +323,9 @@ components: id: type: "null" method: + type: string const: market_update + description: "Method name. Fixed value: `market_update`." params: type: array description: | @@ -343,7 +350,8 @@ components: type: integer method: type: string - enum: [market_unsubscribe] + const: market_unsubscribe + description: "Method name. Fixed value: `market_unsubscribe`." params: type: array items: {} diff --git a/asyncapi/public/market_today.yaml b/asyncapi/public/market_today.yaml index e9b844d..6cefb90 100644 --- a/asyncapi/public/market_today.yaml +++ b/asyncapi/public/market_today.yaml @@ -229,7 +229,9 @@ components: type: integer description: Unique request identifier method: + type: string const: marketToday_query + description: "Method name. Fixed value: `marketToday_query`." params: type: array minItems: 1 @@ -262,7 +264,9 @@ components: id: type: integer method: + type: string const: marketToday_subscribe + description: "Method name. Fixed value: `marketToday_subscribe`." params: type: array items: @@ -285,7 +289,8 @@ components: properties: status: type: string - enum: [success] + const: success + description: "Fixed value: `success`." error: type: "null" @@ -299,7 +304,9 @@ components: id: type: "null" method: + type: string const: marketToday_update + description: "Method name. Fixed value: `marketToday_update`." params: type: array description: | @@ -324,7 +331,8 @@ components: type: integer method: type: string - enum: [marketToday_unsubscribe] + const: marketToday_unsubscribe + description: "Method name. Fixed value: `marketToday_unsubscribe`." params: type: array items: {} diff --git a/asyncapi/public/service.yaml b/asyncapi/public/service.yaml index d50f696..da00d32 100644 --- a/asyncapi/public/service.yaml +++ b/asyncapi/public/service.yaml @@ -151,7 +151,9 @@ components: - type: object properties: method: + type: string const: ping + description: "Method name. Fixed value: `ping`." params: type: array items: {} @@ -172,7 +174,9 @@ components: - type: object properties: method: + type: string const: time + description: "Method name. Fixed value: `time`." params: type: array items: {} diff --git a/asyncapi/public/trades.yaml b/asyncapi/public/trades.yaml index 9f96f89..00f7de5 100644 --- a/asyncapi/public/trades.yaml +++ b/asyncapi/public/trades.yaml @@ -241,7 +241,9 @@ components: type: integer description: Unique request identifier method: + type: string const: trades_request + description: "Method name. Fixed value: `trades_request`." params: type: array description: | @@ -285,7 +287,9 @@ components: id: type: integer method: + type: string const: trades_subscribe + description: "Method name. Fixed value: `trades_subscribe`." params: type: array description: Market names (empty array to subscribe to all markets) @@ -308,7 +312,8 @@ components: properties: status: type: string - enum: [success] + const: success + description: "Fixed value: `success`." error: type: "null" @@ -322,7 +327,9 @@ components: id: type: "null" method: + type: string const: trades_update + description: "Method name. Fixed value: `trades_update`." params: type: array description: | @@ -350,7 +357,8 @@ components: type: integer method: type: string - enum: [trades_unsubscribe] + const: trades_unsubscribe + description: "Method name. Fixed value: `trades_unsubscribe`." params: type: array items: {} diff --git a/docs.json b/docs.json index 391b92c..6d32b55 100644 --- a/docs.json +++ b/docs.json @@ -19,10 +19,28 @@ } }, "favicon": "/favicon.ico", + "styling": { + "eyebrows": "breadcrumbs" + }, "navigation": { + "global": { + "anchors": [ + { + "anchor": "SDKs", + "icon": "code", + "href": "/sdks" + }, + { + "anchor": "Changelog", + "icon": "clock-rotate-left", + "href": "/changelog" + } + ] + }, "tabs": [ { "tab": "Docs", + "icon": "book-open", "groups": [ { "group": " ", @@ -32,27 +50,32 @@ }, { "group": "Getting Started", + "icon": "rocket", + "root": "platform/overview", "pages": [ "platform/overview" ] }, { - "group": "OAuth", - "pages": [ - "platform/oauth/overview", - "platform/oauth/usage/overview" - ] - }, - { - "group": " ", + "group": "Platform Features", + "icon": "gear", "pages": [ "platform/webhook", "platform/colocation", - "platform/self-trade-prevention" + "platform/self-trade-prevention", + { + "group": "OAuth", + "icon": "key", + "pages": [ + "platform/oauth/overview", + "platform/oauth/usage/overview" + ] + } ] }, { "group": "Guides", + "icon": "book", "pages": [ "guides/client-order-id", "guides/fireblocks", @@ -60,10 +83,19 @@ ] }, { - "group": " ", + "group": "AI Tools", + "icon": "sparkles", + "root": "guides/use-with-ai", + "pages": [ + "guides/use-with-ai", + "guides/ai-context-menu", + "guides/ai-ide-setup" + ] + }, + { + "group": "Resources", + "icon": "circle-info", "pages": [ - "sdks", - "changelog", "glossary", "faq" ] @@ -72,16 +104,23 @@ }, { "tab": "API Reference", + "icon": "square-terminal", "groups": [ { - "group": " ", + "group": "Getting Started", + "icon": "rocket", + "root": "api-reference/overview", "pages": [ "api-reference/overview", - "api-reference/authentication" + "api-reference/authentication", + "api-reference/quickstart", + "api-reference/rate-limits" ] }, { "group": "Market Data", + "icon": "chart-bar", + "root": "api-reference/market-data/overview", "pages": [ "api-reference/market-data/overview", { @@ -122,6 +161,8 @@ }, { "group": "Spot Trading", + "icon": "arrow-right-arrow-left", + "root": "api-reference/spot-trading/overview", "pages": [ "api-reference/spot-trading/overview", { @@ -166,6 +207,8 @@ }, { "group": "Collateral Trading", + "icon": "scale-balanced", + "root": "api-reference/collateral-trading/overview", "pages": [ "api-reference/collateral-trading/overview", { @@ -213,6 +256,7 @@ }, { "group": "Convert", + "icon": "rotate", "pages": [ "api-reference/convert/convert-estimate", "api-reference/convert/convert-confirm", @@ -221,6 +265,8 @@ }, { "group": "Account & Wallet", + "icon": "wallet", + "root": "api-reference/account-wallet/overview", "pages": [ "api-reference/account-wallet/overview", { @@ -279,12 +325,19 @@ "api-reference/account-wallet/get-mining-account-hashrate" ] }, - "api-reference/account-wallet/get-fees", - "api-reference/account-wallet/list-credit-lines" + { + "group": "Fees & Credit", + "pages": [ + "api-reference/account-wallet/get-fees", + "api-reference/account-wallet/list-credit-lines" + ] + } ] }, { "group": "Sub-Accounts", + "icon": "users", + "root": "api-reference/sub-accounts/overview", "pages": [ "api-reference/sub-accounts/overview", { @@ -323,6 +376,7 @@ }, { "group": "OAuth", + "icon": "key", "pages": [ "api-reference/oauth/usage/oauth", "api-reference/oauth/usage/get-access-token", @@ -339,15 +393,21 @@ }, { "tab": "WebSocket", + "icon": "plug", "groups": [ { - "group": " ", + "group": "Getting Started", + "icon": "rocket", + "root": "websocket/overview", "pages": [ - "websocket/overview" + "websocket/overview", + "websocket/quickstart" ] }, { "group": "Market Streams", + "icon": "chart-bar", + "root": "websocket/market-streams/overview", "pages": [ "websocket/market-streams/overview", "websocket/market-streams/service", @@ -362,6 +422,8 @@ }, { "group": "Account Streams", + "icon": "user-shield", + "root": "websocket/account-streams/overview", "pages": [ "websocket/account-streams/overview", "websocket/account-streams/authorize", @@ -405,6 +467,7 @@ "chatgpt", "claude", "perplexity", + "grok", "mcp", "cursor", "vscode" diff --git a/guides/ai-context-menu.mdx b/guides/ai-context-menu.mdx new file mode 100644 index 0000000..ca01685 --- /dev/null +++ b/guides/ai-context-menu.mdx @@ -0,0 +1,109 @@ +--- +title: "Contextual AI menu" +sidebarTitle: "Contextual AI menu" +description: "All options in the Copy page dropdown on every WhiteBIT documentation page — copy for AI, open in AI chat tools, and one-click IDE connections." +--- + +Access AI-optimized content and AI tool integrations via the **Copy page** dropdown on any WhiteBIT documentation page. + +The **Copy page** dropdown is available at the top of every documentation page. The menu provides options to copy page content for AI consumption, open pages directly in AI chat tools, and connect development environments to the full documentation via MCP. + +## Access the contextual menu + +Select the **Copy page** dropdown next to the document title on any page. The menu opens with all available options grouped by function. + +## Page content options + +### Copy page + +Copies the current page content as standard Markdown. Use when sharing documentation content or pasting into a text editor. + +### Copy page as Markdown for LLMs + +Copies the current page content in an AI-optimized Markdown format with additional context for language models. Use when feeding page content to an AI tool for analysis or asking questions about a specific page. + +### View as Markdown + +Opens a plain-text Markdown view of the current page. Use when previewing the raw content of a documentation page. + +## Open in AI tool + +Each option opens the current page content in the selected AI chat tool with the page pre-loaded as context. + +| Option | AI tool | Best for | +|--------|---------|----------| +| Open in ChatGPT | ChatGPT (OpenAI) | Quick questions about the current page | +| Open in Claude | Claude (Anthropic) | Detailed analysis or code generation from the current page | +| Open in Perplexity | Perplexity | Research-oriented questions about the current page | +| Open in Grok | Grok (xAI) | Questions and analysis with the current page as context | + +## MCP and IDE quick connect + +The contextual menu includes one-click options to connect a development environment to the WhiteBIT documentation MCP server at `https://docs.whitebit.com/mcp`. + +| Option | Action | +|--------|--------| +| Copy MCP Server URL | Copies `https://docs.whitebit.com/mcp` to the clipboard for manual configuration | +| Connect to Cursor | Opens Cursor with the WhiteBIT MCP server pre-configured | +| Connect to VS Code | Opens VS Code with the WhiteBIT MCP server pre-configured | + +For manual configuration steps in Cursor, VS Code, and Claude Desktop, see the [IDE and AI client setup](/guides/ai-ide-setup) guide. + +## Full documentation context + +The following URLs provide the complete WhiteBIT documentation in AI-optimized formats for use with any AI tool that accepts pasted or linked content. + +| Resource | URL | Use when | +|----------|-----|----------| +| Documentation index | `https://docs.whitebit.com/llms.txt` | Discovering all available pages before exploring further | +| Full documentation | `https://docs.whitebit.com/llms-full.txt` | Providing comprehensive documentation context across the entire API reference | + +## Common workflows + +### Ask questions about the current page + +1. Navigate to any WhiteBIT documentation page. +2. Select the **Copy page** dropdown next to the document title. +3. Select **Open in ChatGPT**, **Open in Claude**, **Open in Perplexity**, or **Open in Grok**. +4. The AI tool opens with the page content pre-loaded. Ask questions about the current page. + +### Copy content for a local AI tool + +1. Navigate to any WhiteBIT documentation page. +2. Select the **Copy page** dropdown next to the document title. +3. Select **Copy page as Markdown for LLMs**. +4. Paste the content into the preferred AI tool and ask questions. + +### Get comprehensive documentation context + +1. Navigate to `https://docs.whitebit.com/llms-full.txt`. +2. Copy the URL or file content. +3. Use when questions span multiple areas of the API documentation. + +### Connect an IDE to the documentation + +1. Navigate to any WhiteBIT documentation page. +2. Select the **Copy page** dropdown next to the document title. +3. Select **Connect to Cursor** or **Connect to VS Code**. +4. For manual configuration or Claude Desktop setup, see [IDE and AI client setup via MCP](/guides/ai-ide-setup). + +## Best practices + +**Provide context** + +Include relevant details when asking AI questions: +- Mention the specific API endpoint or feature in scope. +- Include code snippets when asking about implementation. +- For questions that span multiple pages, use `llms-full.txt` for comprehensive context. + +**Combine approaches** + +- Use the contextual menu for quick, page-specific questions and one-off tasks. +- Use the [IDE and AI client setup](/guides/ai-ide-setup) for ongoing development with full documentation search. +- Both approaches work together for optimal AI assistance. + +## What's next + +- [IDE and AI client setup via MCP](/guides/ai-ide-setup) — Manual configuration for Cursor, VS Code, and Claude Desktop +- [API Reference Quickstart](/api-reference/quickstart) — Step-by-step guide to the first REST API call +- [WebSocket Quickstart](/websocket/quickstart) — First steps connecting to real-time data streams diff --git a/guides/ai-ide-setup.mdx b/guides/ai-ide-setup.mdx new file mode 100644 index 0000000..0272282 --- /dev/null +++ b/guides/ai-ide-setup.mdx @@ -0,0 +1,116 @@ +--- +title: "IDE and AI client setup via MCP" +sidebarTitle: "IDE setup via MCP" +description: "Configure Cursor, VS Code, or Claude Desktop to search the full WhiteBIT documentation using the Model Context Protocol (MCP)." +--- + +Configure Cursor, VS Code, or Claude Desktop to connect to the WhiteBIT documentation MCP server. Once connected, AI tools gain direct, searchable access to all documentation pages and generate accurate code and answers from current documentation. + +**MCP server URL**: `https://docs.whitebit.com/mcp` + +## Prerequisites + +- Cursor, VS Code, or Claude Desktop installed +- An active internet connection + +## What MCP provides + +The Model Context Protocol (MCP) gives AI tools direct access to the WhiteBIT documentation. Instead of relying on training data, the AI tool searches current documentation pages to generate accurate API code, answer integration questions, and surface the correct endpoint parameters. + +## Cursor + +### Automatic setup + +1. Navigate to any WhiteBIT documentation page. +2. Select the **Copy page** dropdown next to the document title. +3. Select **Connect to Cursor**. +4. Cursor opens with the WhiteBIT MCP server configured automatically. + +### Manual setup + +1. Open the command palette with **Cmd+Shift+P** (macOS) or **Ctrl+Shift+P** (Windows/Linux). +2. Search for **Open MCP settings** and select the result. The `mcp.json` file opens. +3. Add the WhiteBIT documentation server configuration: + +```json +{ + "mcpServers": { + "whitebit-docs": { + "url": "https://docs.whitebit.com/mcp" + } + } +} +``` + +4. Save the file. +5. Restart Cursor. + +To verify the connection, ask Cursor: `What MCP tools do you have available?` The WhiteBIT documentation search tool appears in the response. + +## VS Code + +### Automatic setup + +1. Navigate to any WhiteBIT documentation page. +2. Select the **Copy page** dropdown next to the document title. +3. Select **Connect to VS Code**. +4. VS Code opens with the WhiteBIT MCP server configured automatically. + +### Manual setup + +1. Install an MCP-compatible extension in VS Code. +2. Open the extension's MCP server settings. +3. Add the server URL: `https://docs.whitebit.com/mcp`. +4. Save the configuration and restart VS Code. + + +VS Code MCP support varies by extension. Check the extension documentation for specific configuration instructions. + + +## Claude Desktop + +1. Navigate to [claude.ai/settings/connectors](https://claude.ai/settings/connectors) in a browser. +2. Select **Add custom connector**. +3. Enter the following details: + - **Name**: `WhiteBIT Docs` + - **URL**: `https://docs.whitebit.com/mcp` +4. Select **Add**. +5. When starting a Claude chat, select the attachments button and choose **WhiteBIT Docs** to activate the connector. + +## Test the connection + +After configuration, test the MCP connection by asking the AI tool: + +```text +What MCP tools do you have available? +``` + +The WhiteBIT documentation search tool appears in the response. Then verify search access: + +```text +Search for information about authentication in the WhiteBIT documentation. +``` + +The AI tool returns relevant content directly from the WhiteBIT API documentation. + +## Troubleshooting + +### MCP server connection failure + +Verify the server URL is exactly `https://docs.whitebit.com/mcp`. Check the internet connection, then restart the AI tool after making configuration changes. + +### Search tool not listed + +Confirm the MCP server was added correctly by reviewing the configuration. Remove the server entry, re-add it, and restart the AI tool. Check the AI tool's MCP support documentation for version requirements. + +### Search returns no results + +Try more general search terms. Use `authentication` instead of `HMAC-SHA512 private endpoint auth`. Confirm the MCP connection is active by asking `What MCP tools do you have available?` before searching. + +## What's next + +- [Contextual AI menu](/guides/ai-context-menu) — Copy page content and open pages in AI chat tools directly from the browser +- [API Reference Quickstart](/api-reference/quickstart) — Step-by-step guide to the first REST API call +- [Authentication](/api-reference/authentication) — Sign and authenticate private API requests +- [Model Context Protocol documentation](https://modelcontextprotocol.io/docs/tutorials/use-remote-mcp-server) — MCP protocol reference for advanced configuration +- [Mintlify MCP documentation](https://mintlify.com/docs/ai/model-context-protocol) — Mintlify-specific MCP server details diff --git a/guides/use-with-ai.mdx b/guides/use-with-ai.mdx new file mode 100644 index 0000000..797a274 --- /dev/null +++ b/guides/use-with-ai.mdx @@ -0,0 +1,26 @@ +--- +title: "Use the API docs with AI" +sidebarTitle: "Use with AI" +description: "AI tool integrations available on every WhiteBIT API documentation page — copy content for AI, open pages in AI chat tools, and connect development environments via MCP." +icon: "sparkles" +--- + +Every WhiteBIT API documentation page includes a contextual menu with AI tool integrations. The menu provides options to copy page content in AI-optimized formats, open pages directly in AI chat tools, and connect AI development environments to the full documentation via the Model Context Protocol (MCP). + +## Available integrations + + + + Copy page content for AI consumption, open pages in ChatGPT, Claude, Perplexity, or Grok, and access one-click IDE connections — all from the same dropdown on every documentation page. + + + Manually configure Cursor, VS Code, or Claude Desktop to search the full WhiteBIT documentation using MCP. The AI tool gains direct, searchable access to all documentation pages. + + + +## Related resources + +- [Contextual AI menu](/guides/ai-context-menu) — All copy and AI tool options available on every documentation page +- [IDE and AI client setup via MCP](/guides/ai-ide-setup) — Manual configuration for Cursor, VS Code, and Claude Desktop +- [API Reference Overview](/api-reference/overview) — REST API base URL, rate limits, and endpoint groups +- [Quickstart](/api-reference/quickstart) — Step-by-step guide to the first REST API call diff --git a/platform/overview.mdx b/platform/overview.mdx index b0e3ff4..07a59de 100644 --- a/platform/overview.mdx +++ b/platform/overview.mdx @@ -41,3 +41,4 @@ WebSocket connections provide real-time data streaming and interaction. See the - [**Glossary**](/glossary) - Terminology and definitions - [**FAQ**](/faq) - Frequently asked questions - [**Status Page**](https://status.whitebit.com/) - Real-time service status and incident monitoring +- [**AI Tools**](/guides/use-with-ai) - AI chat tools and IDE integrations for exploring the API documentation diff --git a/websocket/overview.mdx b/websocket/overview.mdx index 6a60c4e..3273376 100644 --- a/websocket/overview.mdx +++ b/websocket/overview.mdx @@ -40,9 +40,11 @@ setInterval(() => { ## Rate Limits - - Rate limit: 1000 WebSocket connections per minute and 200 requests per minute per connection. - + + Rate limit: 1,000 WebSocket connections per minute and 200 requests per minute per connection. + + +For REST API rate limits, see [REST API rate limits and error codes](/api-reference/rate-limits). ## Request Message @@ -137,3 +139,12 @@ See the [Authorize](/websocket/account-streams/authorize) channel page for the f Private channels for account data — balances, orders, deals, positions, and borrows. Requires authorization.
+ +## Connection best practices + +Reuse a single WebSocket connection for multiple subscriptions instead of opening a new connection per channel. Each connection counts toward the 1,000 connections per minute limit. + +## Related resources + +- [API Reference Overview](/api-reference/overview) — Base URL and endpoint groups +- [REST API rate limits and error codes](/api-reference/rate-limits) — REST rate limits, error formats, and authentication errors diff --git a/websocket/quickstart.mdx b/websocket/quickstart.mdx new file mode 100644 index 0000000..a1ea9d4 --- /dev/null +++ b/websocket/quickstart.mdx @@ -0,0 +1,168 @@ +--- +title: "WebSocket Quickstart" +sidebarTitle: "Quickstart" +description: "Step-by-step guide to connect to the WhiteBIT WebSocket API and subscribe to real-time market data." +--- + +import { RegionBaseUrl } from '/components/RegionBaseUrl.jsx'; + +Connect to the WhiteBIT WebSocket API and subscribe to real-time market data. The API uses JSON-RPC over WebSocket. + +## Prerequisites + +- A WebSocket client (browser, Node.js, Python, or similar) + + +No API key is required for public channels. + + +## Connection endpoint + + + +The WebSocket endpoint is `wss://api.whitebit.com/ws`. + +The API uses [JSON-RPC](https://www.jsonrpc.org/specification) over WebSocket. All messages are JSON objects with `id`, `method`, and `params` fields. + +## Step 1: Establish a connection + +Open a WebSocket connection to the endpoint. + + + +```javascript JavaScript +const socket = new WebSocket("wss://api.whitebit.com/ws"); + +socket.onopen = () => { + console.log("Connected"); +}; + +socket.onmessage = (event) => { + const data = JSON.parse(event.data); + console.log("Received:", data); +}; +``` + +```python Python +import asyncio +import websockets +import json + +async def connect(): + async with websockets.connect("wss://api.whitebit.com/ws") as ws: + print("Connected") + async for message in ws: + data = json.loads(message) + print("Received:", data) + +asyncio.run(connect()) +``` + + + +The connection opens when the WebSocket handshake completes. + +## Step 2: Keep the connection alive + +The server closes the connection after 60 seconds of inactivity. Send a ping message every 50 seconds to keep the connection alive. + + + +```javascript JavaScript +const socket = new WebSocket("wss://api.whitebit.com/ws"); + +setInterval(() => { + if (socket.readyState === WebSocket.OPEN) { + socket.send(JSON.stringify({ + id: 0, + method: "ping", + params: [], + })); + } +}, 50000); +``` + +```python Python +import asyncio +import websockets +import json + +async def connect(): + async with websockets.connect("wss://api.whitebit.com/ws") as ws: + async def keepalive(): + while True: + await asyncio.sleep(50) + await ws.send(json.dumps({"id": 0, "method": "ping", "params": []})) + + asyncio.create_task(keepalive()) + async for message in ws: + data = json.loads(message) + print("Received:", data) + +asyncio.run(connect()) +``` + + + +**Expected response:** + +```json +{ "id": 0, "result": "pong", "error": null } +``` + +## Step 3: Subscribe to last price updates + +Subscribe to the [Last Price](/websocket/market-streams/lastprice) channel to receive real-time price updates for one or more markets. + + + +```javascript JavaScript +socket.send(JSON.stringify({ + id: 1, + method: "lastprice_subscribe", + params: ["BTC_USDT", "ETH_USDT"] +})); +``` + +```python Python +await ws.send(json.dumps({ + "id": 1, + "method": "lastprice_subscribe", + "params": ["BTC_USDT", "ETH_USDT"] +})) +``` + + + +**Expected subscription response:** + +```json +{ "id": 1, "result": { "status": "success" }, "error": null } +``` + +## Step 4: Receive update events + +After a successful subscription, the server sends update events every second. Each event contains the market name and the latest price. + +**Example update event:** + +```json +{ + "id": null, + "method": "lastprice_update", + "params": ["BTC_USDT", "67500.50"] +} +``` + +The `params` array contains `[market_name, last_price]`. Parse each `lastprice_update` event to display real-time prices. + +## Rate limits + +For rate limits, connection details, and error codes, see [WebSocket Overview](/websocket/overview). + +## What's next + +- [WebSocket Overview](/websocket/overview) — Connection details, error codes, and reconnection best practices +- [Market Streams](/websocket/market-streams/overview) — All public channels (kline, trades, depth, book ticker) +- [Account Streams](/websocket/account-streams/overview) — Private channels for balances, orders, and positions +- [Authorize](/websocket/account-streams/authorize) — Authentication for private channels From 29b27b3f101602c5fb9934cdf1b7c51a5554805c Mon Sep 17 00:00:00 2001 From: whitebit-robot Date: Mon, 23 Feb 2026 10:55:19 +0100 Subject: [PATCH 34/84] Global anchors were removed --- docs.json | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/docs.json b/docs.json index 6d32b55..f06498f 100644 --- a/docs.json +++ b/docs.json @@ -23,20 +23,6 @@ "eyebrows": "breadcrumbs" }, "navigation": { - "global": { - "anchors": [ - { - "anchor": "SDKs", - "icon": "code", - "href": "/sdks" - }, - { - "anchor": "Changelog", - "icon": "clock-rotate-left", - "href": "/changelog" - } - ] - }, "tabs": [ { "tab": "Docs", From 70f2c1c939725f2c93d3ca61c477fda24c73e165 Mon Sep 17 00:00:00 2001 From: whitebit-robot Date: Tue, 24 Feb 2026 08:56:06 +0100 Subject: [PATCH 35/84] docs(api): flatten nav and merge quickstart pages --- api-reference/overview.mdx | 126 ++++++++++++++++++++++- api-reference/quickstart.mdx | 135 ------------------------ docs.json | 32 ++---- guides/ai-context-menu.mdx | 4 +- guides/ai-ide-setup.mdx | 2 +- guides/use-with-ai.mdx | 2 +- index.mdx | 94 ++++++++--------- websocket/overview.mdx | 193 +++++++++++++++++++++++++++++------ websocket/quickstart.mdx | 168 ------------------------------ 9 files changed, 335 insertions(+), 421 deletions(-) delete mode 100644 api-reference/quickstart.mdx delete mode 100644 websocket/quickstart.mdx diff --git a/api-reference/overview.mdx b/api-reference/overview.mdx index 3c81abe..1a32cc8 100644 --- a/api-reference/overview.mdx +++ b/api-reference/overview.mdx @@ -1,7 +1,7 @@ --- title: API Reference sidebarTitle: Overview -description: "WhiteBIT REST API overview — base URLs, rate limits, error formats, and quick links to all endpoint groups." +description: "WhiteBIT REST API overview — base URL, authentication, quickstart examples, rate limits, and links to all endpoint groups." --- import { RegionBaseUrl } from '/components/RegionBaseUrl.jsx'; @@ -20,9 +20,118 @@ https://whitebit.com/api/v4/{endpoint} - **Private endpoints** use the `POST` method and accept parameters as JSON in the request body. - All endpoints return time in Unix-time format and respond with JSON. -## Authentication +--- + +## Quickstart + +### Prerequisites + +- A WhiteBIT account ([Sign up](https://whitebit.com/auth)) +- An API key with appropriate permissions ([API Settings](https://whitebit.com/settings/api)) +- A programming language or HTTP client (cURL, Python, JavaScript, or similar) + +### Step 1: First public API call + +The [Server Status](/api-reference/market-data/server-status) endpoint returns the API life-state. No authentication is required. + +**Request:** + + + +```bash +curl -X GET "https://whitebit.com/api/v4/public/ping" +``` + + +```python +import requests + +response = requests.get("https://whitebit.com/api/v4/public/ping") +print(response.json()) +``` + + +```javascript +const response = await fetch("https://whitebit.com/api/v4/public/ping"); +const data = await response.json(); +console.log(data); +``` + + + +**Expected response:** + +```json +["pong"] +``` + +A response of `["pong"]` confirms the API is operational. + +### Step 2: Authentication setup + +Private endpoints require HMAC-SHA512 signed requests. See the [Authentication](/api-reference/authentication) guide for the full signing process. + +WhiteBIT provides the [API Quick Start Helper](https://github.com/whitebit-exchange/api-quickstart) with examples in Python, PHP, Node.js, Go, JavaScript, Kotlin, .NET, Ruby, C++, and Rust. + +**Required headers for private endpoints:** + +| Header | Value | +|--------|-------| +| `Content-type` | `application/json` | +| `X-TXC-APIKEY` | The public API key | +| `X-TXC-PAYLOAD` | Base64-encoded request body | +| `X-TXC-SIGNATURE` | HMAC-SHA512 signature (hex encoded) | -Private endpoints require API key authentication with HMAC-SHA512 signed requests. See the [Authentication Guide](/api-reference/authentication) for setup instructions, header requirements, and code examples. For a step-by-step tutorial, see the [Quickstart](/api-reference/quickstart). +### Step 3: First authenticated API call + +The [Main Balance](/api-reference/account-wallet/main-balance) endpoint retrieves the main account balance. The request body must include `request` (the endpoint path) and `nonce` (unique identifier). + +**Request body:** + +```json +{ + "request": "/api/v4/main-account/balance", + "nonce": "1594297865000" +} +``` + +**Example with cURL** (replace `YOUR_API_KEY` and `YOUR_SIGNATURE` with the signed payload): + + + +```bash +curl -X POST "https://whitebit.com/api/v4/main-account/balance" \ + -H "Content-type: application/json" \ + -H "X-TXC-APIKEY: YOUR_API_KEY" \ + -H "X-TXC-PAYLOAD: BASE64_ENCODED_PAYLOAD" \ + -H "X-TXC-SIGNATURE: YOUR_SIGNATURE" \ + -d '{"request":"/api/v4/main-account/balance","nonce":"1594297865000"}' +``` + + +```python +# Use the API Quick Start Helper: https://github.com/whitebit-exchange/api-quickstart +from whitebit import Whitebit + +wb = Whitebit(api_key="YOUR_API_KEY", api_secret="YOUR_API_SECRET") +balance = wb.main_account_balance() +print(balance) +``` + + + +**Expected response:** + +```json +{ + "BTC": { "main_balance": "0" }, + "USDT": { "main_balance": "100.50" } +} +``` + +The response contains balance data for each asset. Omitted assets have a zero balance. + +--- ## Rate Limits @@ -60,8 +169,6 @@ All V4 endpoints return errors as JSON. The format differs slightly between publ } ``` -For full details, see the [Market Data overview](/api-reference/market-data/overview) and [Spot Trading overview](/api-reference/spot-trading/overview). For all error codes and troubleshooting, see [Rate Limits & Error Codes](/api-reference/rate-limits). - --- ## Endpoint Groups @@ -89,3 +196,12 @@ For full details, see the [Market Data overview](/api-reference/market-data/over Third-party authorization: token exchange, refresh, and account endpoints. + +## What's next + +- [Authentication](/api-reference/authentication) — Full signing process and common errors +- [Rate Limits & Error Codes](/api-reference/rate-limits) — Per-endpoint limits, error formats, and troubleshooting +- [Market Data](/api-reference/market-data/overview) — Public endpoints for orderbook, trades, and market info +- [Spot Trading](/api-reference/spot-trading/overview) — Place and manage orders +- [WebSocket API](/websocket/overview) — Real-time market data and account streams +- [API Quick Start Helper](https://github.com/whitebit-exchange/api-quickstart) — Multi-language SDK for authentication and requests diff --git a/api-reference/quickstart.mdx b/api-reference/quickstart.mdx deleted file mode 100644 index c4139fa..0000000 --- a/api-reference/quickstart.mdx +++ /dev/null @@ -1,135 +0,0 @@ ---- -title: "REST API Quickstart" -sidebarTitle: "Quickstart" -description: "Step-by-step guide to make the first public and private REST API calls to the WhiteBIT API." ---- - -import { RegionBaseUrl } from '/components/RegionBaseUrl.jsx'; -import { ApiMonitorTable } from '/snippets/api-monitor.jsx'; - -This guide explains how to make the first public and private REST API calls to the WhiteBIT API. - -## Prerequisites - -- A WhiteBIT account ([Sign up](https://whitebit.com/auth)) -- An API key with appropriate permissions ([API Settings](https://whitebit.com/settings/api)) -- A programming language or HTTP client (cURL, Python, JavaScript, or similar) - -## Base URL and region - - - -All REST API endpoints use the base path `/api/v4/{endpoint}`. Public endpoints use `GET`; private endpoints use `POST` with JSON in the request body. - -## Step 1: First public API call - -The [Server Status](/api-reference/market-data/server-status) endpoint returns the API life-state. No authentication is required. - -**Request:** - - - -```bash -curl -X GET "https://whitebit.com/api/v4/public/ping" -``` - - -```python -import requests - -response = requests.get("https://whitebit.com/api/v4/public/ping") -print(response.json()) -``` - - -```javascript -const response = await fetch("https://whitebit.com/api/v4/public/ping"); -const data = await response.json(); -console.log(data); -``` - - - -**Expected response:** - -```json -["pong"] -``` - -A response of `["pong"]` confirms the API is operational. - -## Step 2: Authentication setup - -Private endpoints require HMAC-SHA512 signed requests. The [Authentication](/api-reference/authentication) guide covers the full signing process. - -WhiteBIT provides the [API Quick Start Helper](https://github.com/whitebit-exchange/api-quickstart) library with examples in Python, PHP, Node.js, Go, JavaScript, Kotlin, .NET, Ruby, C++, and Rust. Use the helper for production integrations. - -**Required headers for private endpoints:** - -| Header | Value | -|--------|-------| -| `Content-type` | `application/json` | -| `X-TXC-APIKEY` | The public API key | -| `X-TXC-PAYLOAD` | Base64-encoded request body | -| `X-TXC-SIGNATURE` | HMAC-SHA512 signature (hex encoded) | - -## Step 3: First authenticated API call - -The [Main Balance](/api-reference/account-wallet/main-balance) endpoint retrieves the main account balance. The request body must include `request` (the endpoint path) and `nonce` (unique identifier). - -**Request body:** - -```json -{ - "request": "/api/v4/main-account/balance", - "nonce": "1594297865000" -} -``` - -**Example with cURL** (replace `YOUR_API_KEY` and `YOUR_SIGNATURE` with the signed payload): - - - -```bash -curl -X POST "https://whitebit.com/api/v4/main-account/balance" \ - -H "Content-type: application/json" \ - -H "X-TXC-APIKEY: YOUR_API_KEY" \ - -H "X-TXC-PAYLOAD: BASE64_ENCODED_PAYLOAD" \ - -H "X-TXC-SIGNATURE: YOUR_SIGNATURE" \ - -d '{"request":"/api/v4/main-account/balance","nonce":"1594297865000"}' -``` - - -```python -# Use the API Quick Start Helper: https://github.com/whitebit-exchange/api-quickstart -from whitebit import Whitebit - -wb = Whitebit(api_key="YOUR_API_KEY", api_secret="YOUR_API_SECRET") -balance = wb.main_account_balance() -print(balance) -``` - - - -**Expected response:** - -```json -{ - "BTC": { "main_balance": "0" }, - "USDT": { "main_balance": "100.50" } -} -``` - -The response contains balance data for each asset. Omitted assets have a zero balance. - -## Live API activity - - - -## What's next - -- [Authentication](/api-reference/authentication) — Full signing process and common errors -- [Market Data](/api-reference/market-data/overview) — Public endpoints for orderbook, trades, and market info -- [Spot Trading](/api-reference/spot-trading/overview) — Place and manage orders -- [WebSocket Quickstart](/websocket/quickstart) — Real-time market data streams -- [API Quick Start Helper](https://github.com/whitebit-exchange/api-quickstart) — Multi-language SDK for authentication and requests diff --git a/docs.json b/docs.json index f06498f..66f9226 100644 --- a/docs.json +++ b/docs.json @@ -30,14 +30,6 @@ "groups": [ { "group": " ", - "pages": [ - "index" - ] - }, - { - "group": "Getting Started", - "icon": "rocket", - "root": "platform/overview", "pages": [ "platform/overview" ] @@ -71,7 +63,6 @@ { "group": "AI Tools", "icon": "sparkles", - "root": "guides/use-with-ai", "pages": [ "guides/use-with-ai", "guides/ai-context-menu", @@ -99,14 +90,12 @@ "pages": [ "api-reference/overview", "api-reference/authentication", - "api-reference/quickstart", "api-reference/rate-limits" ] }, { "group": "Market Data", "icon": "chart-bar", - "root": "api-reference/market-data/overview", "pages": [ "api-reference/market-data/overview", { @@ -148,7 +137,6 @@ { "group": "Spot Trading", "icon": "arrow-right-arrow-left", - "root": "api-reference/spot-trading/overview", "pages": [ "api-reference/spot-trading/overview", { @@ -194,7 +182,6 @@ { "group": "Collateral Trading", "icon": "scale-balanced", - "root": "api-reference/collateral-trading/overview", "pages": [ "api-reference/collateral-trading/overview", { @@ -252,7 +239,6 @@ { "group": "Account & Wallet", "icon": "wallet", - "root": "api-reference/account-wallet/overview", "pages": [ "api-reference/account-wallet/overview", { @@ -323,7 +309,6 @@ { "group": "Sub-Accounts", "icon": "users", - "root": "api-reference/sub-accounts/overview", "pages": [ "api-reference/sub-accounts/overview", { @@ -382,18 +367,14 @@ "icon": "plug", "groups": [ { - "group": "Getting Started", - "icon": "rocket", - "root": "websocket/overview", + "group": " ", "pages": [ - "websocket/overview", - "websocket/quickstart" + "websocket/overview" ] }, { "group": "Market Streams", "icon": "chart-bar", - "root": "websocket/market-streams/overview", "pages": [ "websocket/market-streams/overview", "websocket/market-streams/service", @@ -409,7 +390,6 @@ { "group": "Account Streams", "icon": "user-shield", - "root": "websocket/account-streams/overview", "pages": [ "websocket/account-streams/overview", "websocket/account-streams/authorize", @@ -472,6 +452,14 @@ } }, "redirects": [ + { + "source": "/api-reference/quickstart", + "destination": "/api-reference/overview" + }, + { + "source": "/websocket/quickstart", + "destination": "/websocket/overview" + }, { "source": "/private/http-auth", "destination": "/api-reference/authentication" diff --git a/guides/ai-context-menu.mdx b/guides/ai-context-menu.mdx index ca01685..3f02c92 100644 --- a/guides/ai-context-menu.mdx +++ b/guides/ai-context-menu.mdx @@ -105,5 +105,5 @@ Include relevant details when asking AI questions: ## What's next - [IDE and AI client setup via MCP](/guides/ai-ide-setup) — Manual configuration for Cursor, VS Code, and Claude Desktop -- [API Reference Quickstart](/api-reference/quickstart) — Step-by-step guide to the first REST API call -- [WebSocket Quickstart](/websocket/quickstart) — First steps connecting to real-time data streams +- [API Reference Overview](/api-reference/overview) — Base URL, quickstart examples, and endpoint groups +- [WebSocket Overview](/websocket/overview) — Connection details, quickstart, and channel index diff --git a/guides/ai-ide-setup.mdx b/guides/ai-ide-setup.mdx index 0272282..c103ea5 100644 --- a/guides/ai-ide-setup.mdx +++ b/guides/ai-ide-setup.mdx @@ -110,7 +110,7 @@ Try more general search terms. Use `authentication` instead of `HMAC-SHA512 priv ## What's next - [Contextual AI menu](/guides/ai-context-menu) — Copy page content and open pages in AI chat tools directly from the browser -- [API Reference Quickstart](/api-reference/quickstart) — Step-by-step guide to the first REST API call +- [API Reference Overview](/api-reference/overview) — Base URL, quickstart examples, and endpoint groups - [Authentication](/api-reference/authentication) — Sign and authenticate private API requests - [Model Context Protocol documentation](https://modelcontextprotocol.io/docs/tutorials/use-remote-mcp-server) — MCP protocol reference for advanced configuration - [Mintlify MCP documentation](https://mintlify.com/docs/ai/model-context-protocol) — Mintlify-specific MCP server details diff --git a/guides/use-with-ai.mdx b/guides/use-with-ai.mdx index 797a274..ea4e7f0 100644 --- a/guides/use-with-ai.mdx +++ b/guides/use-with-ai.mdx @@ -23,4 +23,4 @@ Every WhiteBIT API documentation page includes a contextual menu with AI tool in - [Contextual AI menu](/guides/ai-context-menu) — All copy and AI tool options available on every documentation page - [IDE and AI client setup via MCP](/guides/ai-ide-setup) — Manual configuration for Cursor, VS Code, and Claude Desktop - [API Reference Overview](/api-reference/overview) — REST API base URL, rate limits, and endpoint groups -- [Quickstart](/api-reference/quickstart) — Step-by-step guide to the first REST API call +- [API Reference Overview](/api-reference/overview) — Base URL, quickstart examples, and endpoint groups diff --git a/index.mdx b/index.mdx index 03be1d9..75e1c9c 100644 --- a/index.mdx +++ b/index.mdx @@ -1,7 +1,6 @@ --- title: "Home" --- -import {ApiMonitorTable} from '/snippets/api-monitor.jsx';
-
-

API Activity

- -
- Live Demo -
+
+
+ Explore the APIs +
+

+ Three integration interfaces — pick the one that fits your use case +

-

Watch the high-performance API handle thousands of trading operations in real-time. From market orders to advanced trading strategies, see the full spectrum of what's possible.

- - + + + Full access to market data, spot trading, collateral trading, account management, and sub-accounts. Authenticated with HMAC-SHA512. + + + Real-time market streams and private account streams over persistent connections. Millisecond latency for prices, order books, and trades. + + + Webhooks, OAuth, colocation, and self-trade prevention. Extend your integration beyond core trading operations. + + -
+
-
-
-Everything for developers +
+
+ Common starting points
- -

- Build powerful trading applications with a comprehensive suite of APIs and tools - -

- +

+ Jump directly to the section that matches what you are building +

- - -Full access to spot trading, margin trading, and futures markets with high-performance execution. - - - - Live market data, order book updates, and trade execution via WebSocket with - millisecond latency. - - - - High-performance infrastructure with exceptional uptime and industry-leading - security measures. - - - - Built-in compliance tools and security features for safe trading across - jurisdictions. - - - - Comprehensive SDKs, detailed documentation, and code examples to accelerate - the development process. - - - -Access to a wide range of spot and derivative markets with support for multiple trading pairs and instruments. - - + + + + Public endpoints for order books, trade history, ticker prices, fees, and server status. No authentication required. + + + Place and manage limit, market, stop-limit, and stop-market orders. Query execution history and control kill-switch timers. + + + Main balance, deposits, withdrawals, internal transfers, codes, and crypto lending. + + + Multi-language API Quick Start Helper with examples in Python, Node.js, Go, PHP, Rust, and more. + -
+
-
+
diff --git a/websocket/overview.mdx b/websocket/overview.mdx index 3273376..6080ad4 100644 --- a/websocket/overview.mdx +++ b/websocket/overview.mdx @@ -1,7 +1,7 @@ --- title: WebSocket API sidebarTitle: Overview -description: "WhiteBIT WebSocket API — connection details, message formats, rate limits, and links to all available channels." +description: "WhiteBIT WebSocket API — connection details, quickstart examples, message formats, rate limits, and links to all available channels." --- import { RegionBaseUrl } from '/components/RegionBaseUrl.jsx'; @@ -16,15 +16,63 @@ The API is based on [JSON RPC](https://www.jsonrpc.org/specification) over the W The API returns time in Unix-time format. -## Connection Timeout +--- + +## Quickstart + +### Prerequisites + +- A WebSocket client (browser, Node.js, Python, or similar) + + +No API key is required for public channels. + + +### Step 1: Establish a connection + +Open a WebSocket connection to the endpoint. + + + +```javascript JavaScript +const socket = new WebSocket("wss://api.whitebit.com/ws"); + +socket.onopen = () => { + console.log("Connected"); +}; + +socket.onmessage = (event) => { + const data = JSON.parse(event.data); + console.log("Received:", data); +}; +``` + +```python Python +import asyncio +import websockets +import json + +async def connect(): + async with websockets.connect("wss://api.whitebit.com/ws") as ws: + print("Connected") + async for message in ws: + data = json.loads(message) + print("Received:", data) + +asyncio.run(connect()) +``` + + + +The connection opens when the WebSocket handshake completes. + +### Step 2: Keep the connection alive -- The server closes the connection after **60 seconds of inactivity**. -- Inactivity means no messages sent by the client. -- Send a ping message every **50 seconds** to keep the connection alive. +The server closes the connection after 60 seconds of inactivity. Send a ping message every 50 seconds to keep the connection alive. -### Ping Example + -```javascript +```javascript JavaScript const socket = new WebSocket("wss://api.whitebit.com/ws"); setInterval(() => { @@ -38,17 +86,85 @@ setInterval(() => { }, 50000); ``` -## Rate Limits +```python Python +import asyncio +import websockets +import json - - Rate limit: 1,000 WebSocket connections per minute and 200 requests per minute per connection. - +async def connect(): + async with websockets.connect("wss://api.whitebit.com/ws") as ws: + async def keepalive(): + while True: + await asyncio.sleep(50) + await ws.send(json.dumps({"id": 0, "method": "ping", "params": []})) + + asyncio.create_task(keepalive()) + async for message in ws: + data = json.loads(message) + print("Received:", data) + +asyncio.run(connect()) +``` + + + +**Expected response:** + +```json +{ "id": 0, "result": "pong", "error": null } +``` + +### Step 3: Subscribe to last price updates + +Subscribe to the [Last Price](/websocket/market-streams/lastprice) channel to receive real-time price updates for one or more markets. + + + +```javascript JavaScript +socket.send(JSON.stringify({ + id: 1, + method: "lastprice_subscribe", + params: ["BTC_USDT", "ETH_USDT"] +})); +``` + +```python Python +await ws.send(json.dumps({ + "id": 1, + "method": "lastprice_subscribe", + "params": ["BTC_USDT", "ETH_USDT"] +})) +``` + + -For REST API rate limits, see [REST API rate limits and error codes](/api-reference/rate-limits). +**Expected subscription response:** -## Request Message +```json +{ "id": 1, "result": { "status": "success" }, "error": null } +``` + +### Step 4: Receive update events + +After a successful subscription, the server sends update events every second. Each event contains the market name and the latest price. + +**Example update event:** + +```json +{ + "id": null, + "method": "lastprice_update", + "params": ["BTC_USDT", "67500.50"] +} +``` + +The `params` array contains `[market_name, last_price]`. Parse each `lastprice_update` event to display real-time prices. + +--- -JSON structure of a request message: +## Message Format + +### Request message | Field | Type | Description | |-------|------|-------------| @@ -58,14 +174,12 @@ JSON structure of a request message: 🚫 The connection will be closed if invalid JSON is sent. -### Types of Request Messages +**Types of request messages:** - **Query** — one-time requests (`ping`, `candles_request`, `balanceSpot_request`, etc.) - **Subscription** — streaming updates (`candles_subscribe`, `lastprice_subscribe`, `balanceSpot_subscribe`, etc.). Repeating a subscription cancels the previous one for the same data type. -## Response Message - -JSON structure of a response message: +### Response message | Field | Type | Description | |-------|------|-------------| @@ -73,25 +187,13 @@ JSON structure of a response message: | `result` | Object / null | `null` on failure; see channel docs for success payloads | | `error` | Object / null | `null` on success; error object on failure | -### Error Codes - -| Code | Message | -|------|---------| -| **1** | invalid argument | -| **2** | internal error | -| **3** | service unavailable | -| **4** | method not found | -| **5** | service timeout | - -### Types of Response Messages +**Types of response messages:** - **Query result** — direct response to a query request - **Subscription status** — success or failure of a subscription request - **Update events** — pushed by the server when subscribed data changes ---- - -## Examples +### Examples **Query — ping/pong:** @@ -121,6 +223,24 @@ JSON structure of a response message: --- +## Rate Limits + + + Rate limit: 1,000 WebSocket connections per minute and 200 requests per minute per connection. + + +### Error codes + +| Code | Message | +|------|---------| +| **1** | invalid argument | +| **2** | internal error | +| **3** | service unavailable | +| **4** | method not found | +| **5** | service timeout | + +--- + ## Authentication Private channels (Account Streams) require authorization before subscribing. After connecting, send an `authorize` request with API credentials to gain access to private data such as balances, orders, deals, and positions. @@ -140,11 +260,16 @@ See the [Authorize](/websocket/account-streams/authorize) channel page for the f +--- + ## Connection best practices Reuse a single WebSocket connection for multiple subscriptions instead of opening a new connection per channel. Each connection counts toward the 1,000 connections per minute limit. ## Related resources -- [API Reference Overview](/api-reference/overview) — Base URL and endpoint groups -- [REST API rate limits and error codes](/api-reference/rate-limits) — REST rate limits, error formats, and authentication errors +- [API Reference Overview](/api-reference/overview) — Base URL, quickstart, and endpoint groups +- [Rate Limits & Error Codes](/api-reference/rate-limits) — REST rate limits, error formats, and authentication errors +- [Market Streams](/websocket/market-streams/overview) — All public channels (kline, trades, depth, book ticker) +- [Account Streams](/websocket/account-streams/overview) — Private channels for balances, orders, and positions +- [Authorize](/websocket/account-streams/authorize) — Authentication for private channels diff --git a/websocket/quickstart.mdx b/websocket/quickstart.mdx deleted file mode 100644 index a1ea9d4..0000000 --- a/websocket/quickstart.mdx +++ /dev/null @@ -1,168 +0,0 @@ ---- -title: "WebSocket Quickstart" -sidebarTitle: "Quickstart" -description: "Step-by-step guide to connect to the WhiteBIT WebSocket API and subscribe to real-time market data." ---- - -import { RegionBaseUrl } from '/components/RegionBaseUrl.jsx'; - -Connect to the WhiteBIT WebSocket API and subscribe to real-time market data. The API uses JSON-RPC over WebSocket. - -## Prerequisites - -- A WebSocket client (browser, Node.js, Python, or similar) - - -No API key is required for public channels. - - -## Connection endpoint - - - -The WebSocket endpoint is `wss://api.whitebit.com/ws`. - -The API uses [JSON-RPC](https://www.jsonrpc.org/specification) over WebSocket. All messages are JSON objects with `id`, `method`, and `params` fields. - -## Step 1: Establish a connection - -Open a WebSocket connection to the endpoint. - - - -```javascript JavaScript -const socket = new WebSocket("wss://api.whitebit.com/ws"); - -socket.onopen = () => { - console.log("Connected"); -}; - -socket.onmessage = (event) => { - const data = JSON.parse(event.data); - console.log("Received:", data); -}; -``` - -```python Python -import asyncio -import websockets -import json - -async def connect(): - async with websockets.connect("wss://api.whitebit.com/ws") as ws: - print("Connected") - async for message in ws: - data = json.loads(message) - print("Received:", data) - -asyncio.run(connect()) -``` - - - -The connection opens when the WebSocket handshake completes. - -## Step 2: Keep the connection alive - -The server closes the connection after 60 seconds of inactivity. Send a ping message every 50 seconds to keep the connection alive. - - - -```javascript JavaScript -const socket = new WebSocket("wss://api.whitebit.com/ws"); - -setInterval(() => { - if (socket.readyState === WebSocket.OPEN) { - socket.send(JSON.stringify({ - id: 0, - method: "ping", - params: [], - })); - } -}, 50000); -``` - -```python Python -import asyncio -import websockets -import json - -async def connect(): - async with websockets.connect("wss://api.whitebit.com/ws") as ws: - async def keepalive(): - while True: - await asyncio.sleep(50) - await ws.send(json.dumps({"id": 0, "method": "ping", "params": []})) - - asyncio.create_task(keepalive()) - async for message in ws: - data = json.loads(message) - print("Received:", data) - -asyncio.run(connect()) -``` - - - -**Expected response:** - -```json -{ "id": 0, "result": "pong", "error": null } -``` - -## Step 3: Subscribe to last price updates - -Subscribe to the [Last Price](/websocket/market-streams/lastprice) channel to receive real-time price updates for one or more markets. - - - -```javascript JavaScript -socket.send(JSON.stringify({ - id: 1, - method: "lastprice_subscribe", - params: ["BTC_USDT", "ETH_USDT"] -})); -``` - -```python Python -await ws.send(json.dumps({ - "id": 1, - "method": "lastprice_subscribe", - "params": ["BTC_USDT", "ETH_USDT"] -})) -``` - - - -**Expected subscription response:** - -```json -{ "id": 1, "result": { "status": "success" }, "error": null } -``` - -## Step 4: Receive update events - -After a successful subscription, the server sends update events every second. Each event contains the market name and the latest price. - -**Example update event:** - -```json -{ - "id": null, - "method": "lastprice_update", - "params": ["BTC_USDT", "67500.50"] -} -``` - -The `params` array contains `[market_name, last_price]`. Parse each `lastprice_update` event to display real-time prices. - -## Rate limits - -For rate limits, connection details, and error codes, see [WebSocket Overview](/websocket/overview). - -## What's next - -- [WebSocket Overview](/websocket/overview) — Connection details, error codes, and reconnection best practices -- [Market Streams](/websocket/market-streams/overview) — All public channels (kline, trades, depth, book ticker) -- [Account Streams](/websocket/account-streams/overview) — Private channels for balances, orders, and positions -- [Authorize](/websocket/account-streams/authorize) — Authentication for private channels From 3de91ae6333e3c74b79a538b814963017d66c90a Mon Sep 17 00:00:00 2001 From: whitebit-robot Date: Tue, 24 Feb 2026 09:19:32 +0100 Subject: [PATCH 36/84] docs(websocket): add auth and rate-limits pages; add channel overviews --- api-reference/rate-limits.mdx | 2 +- docs.json | 8 +- websocket/account-streams/authorize.mdx | 2 + websocket/account-streams/balance-margin.mdx | 4 +- websocket/account-streams/balance-spot.mdx | 2 +- websocket/account-streams/borrows-events.mdx | 4 +- websocket/account-streams/borrows.mdx | 4 +- websocket/account-streams/deals.mdx | 4 +- .../margin-positions-events.mdx | 4 +- websocket/account-streams/orders-executed.mdx | 4 +- websocket/account-streams/orders-pending.mdx | 4 +- websocket/account-streams/overview.mdx | 2 +- websocket/account-streams/positions.mdx | 2 +- websocket/authentication.mdx | 112 ++++++++++++++++++ websocket/market-streams/lastprice.mdx | 2 + websocket/market-streams/overview.mdx | 2 +- websocket/market-streams/service.mdx | 2 + websocket/overview.mdx | 34 ++---- websocket/rate-limits.mdx | 111 +++++++++++++++++ 19 files changed, 267 insertions(+), 42 deletions(-) create mode 100644 websocket/authentication.mdx create mode 100644 websocket/rate-limits.mdx diff --git a/api-reference/rate-limits.mdx b/api-reference/rate-limits.mdx index fca9d3d..ef1af6b 100644 --- a/api-reference/rate-limits.mdx +++ b/api-reference/rate-limits.mdx @@ -90,4 +90,4 @@ For private endpoints, ensure each request uses a unique, incrementing nonce. Us - [API Reference Overview](/api-reference/overview) — Base URL and endpoint groups - [Authentication](/api-reference/authentication) — Signing and header requirements -- [WebSocket Overview](/websocket/overview) — WebSocket rate limits, error codes, and connection details +- [WebSocket Rate Limits](/websocket/rate-limits) — WebSocket connection limits, error codes, and timeout behavior diff --git a/docs.json b/docs.json index 66f9226..019cc8b 100644 --- a/docs.json +++ b/docs.json @@ -86,7 +86,6 @@ { "group": "Getting Started", "icon": "rocket", - "root": "api-reference/overview", "pages": [ "api-reference/overview", "api-reference/authentication", @@ -367,9 +366,12 @@ "icon": "plug", "groups": [ { - "group": " ", + "group": "Getting Started", + "icon": "rocket", "pages": [ - "websocket/overview" + "websocket/overview", + "websocket/authentication", + "websocket/rate-limits" ] }, { diff --git a/websocket/account-streams/authorize.mdx b/websocket/account-streams/authorize.mdx index e04304e..0bbadd0 100644 --- a/websocket/account-streams/authorize.mdx +++ b/websocket/account-streams/authorize.mdx @@ -2,3 +2,5 @@ asyncapi: "/asyncapi/private/authorize.yaml /ws" title: Authorize --- + +Authorize the WebSocket connection for private channel access. Send a WebSocket token obtained from the REST API. Authorization is required once per connection. See [WebSocket Authentication](/websocket/authentication) for the full token flow and error handling. diff --git a/websocket/account-streams/balance-margin.mdx b/websocket/account-streams/balance-margin.mdx index 69e0f2a..c14e97a 100644 --- a/websocket/account-streams/balance-margin.mdx +++ b/websocket/account-streams/balance-margin.mdx @@ -4,5 +4,7 @@ title: Balance Margin --- -This is a private channel. [Authorize](/websocket/account-streams/authorize) the WebSocket connection before subscribing. +This is a private channel. [Authorize](/websocket/authentication) the WebSocket connection before subscribing. + +Query or subscribe to collateral (margin) balance updates. The response includes total balance, borrowed amount, and available amounts with and without borrowing. Update interval: 1.5 seconds. diff --git a/websocket/account-streams/balance-spot.mdx b/websocket/account-streams/balance-spot.mdx index b80914a..131a221 100644 --- a/websocket/account-streams/balance-spot.mdx +++ b/websocket/account-streams/balance-spot.mdx @@ -4,7 +4,7 @@ title: Balance Spot --- -This is a private channel. [Authorize](/websocket/account-streams/authorize) the WebSocket connection before subscribing. +This is a private channel. [Authorize](/websocket/authentication) the WebSocket connection before subscribing. Get and subscribe to [spot balance](/glossary#balance-spotbalance-trade) updates. diff --git a/websocket/account-streams/borrows-events.mdx b/websocket/account-streams/borrows-events.mdx index 4ed915c..9f2ec50 100644 --- a/websocket/account-streams/borrows-events.mdx +++ b/websocket/account-streams/borrows-events.mdx @@ -4,5 +4,7 @@ title: Borrows Events --- -This is a private channel. [Authorize](/websocket/account-streams/authorize) the WebSocket connection before subscribing. +This is a private channel. [Authorize](/websocket/authentication) the WebSocket connection before subscribing. + +Subscribe to margin call and liquidation event notifications for collateral borrows. Events fire when a borrow enters margin call or liquidation state. diff --git a/websocket/account-streams/borrows.mdx b/websocket/account-streams/borrows.mdx index facddb0..7888d98 100644 --- a/websocket/account-streams/borrows.mdx +++ b/websocket/account-streams/borrows.mdx @@ -4,5 +4,7 @@ title: Borrows --- -This is a private channel. [Authorize](/websocket/account-streams/authorize) the WebSocket connection before subscribing. +This is a private channel. [Authorize](/websocket/authentication) the WebSocket connection before subscribing. + +Subscribe to collateral borrow status updates including borrow amounts, unrealized funding, and liquidation prices. Update interval: 1.5 seconds. diff --git a/websocket/account-streams/deals.mdx b/websocket/account-streams/deals.mdx index 0674bd3..96579e6 100644 --- a/websocket/account-streams/deals.mdx +++ b/websocket/account-streams/deals.mdx @@ -4,5 +4,7 @@ title: Deals --- -This is a private channel. [Authorize](/websocket/account-streams/authorize) the WebSocket connection before subscribing. +This is a private channel. [Authorize](/websocket/authentication) the WebSocket connection before subscribing. + +Query or subscribe to real-time trade execution (deal) notifications. Each deal represents a matched trade with price, amount, fee, and counterparty details. Update interval: real-time. diff --git a/websocket/account-streams/margin-positions-events.mdx b/websocket/account-streams/margin-positions-events.mdx index 12564b8..ba39a56 100644 --- a/websocket/account-streams/margin-positions-events.mdx +++ b/websocket/account-streams/margin-positions-events.mdx @@ -4,5 +4,7 @@ title: Margin Positions Events --- -This is a private channel. [Authorize](/websocket/account-streams/authorize) the WebSocket connection before subscribing. +This is a private channel. [Authorize](/websocket/authentication) the WebSocket connection before subscribing. + +Subscribe to margin call and liquidation event notifications for collateral positions. Events fire when a position enters margin call or liquidation state. diff --git a/websocket/account-streams/orders-executed.mdx b/websocket/account-streams/orders-executed.mdx index 3b667be..3f9df37 100644 --- a/websocket/account-streams/orders-executed.mdx +++ b/websocket/account-streams/orders-executed.mdx @@ -4,9 +4,11 @@ title: Orders Executed --- -This is a private channel. [Authorize](/websocket/account-streams/authorize) the WebSocket connection before subscribing. +This is a private channel. [Authorize](/websocket/authentication) the WebSocket connection before subscribing. +Query or subscribe to executed order history with optional filtering by order type (limit, market, or both). Each record includes execution details, fees, and status. Update interval: real-time. + The private stream returns executed orders, including orders using Retail Price Improvement (RPI) mode. \ No newline at end of file diff --git a/websocket/account-streams/orders-pending.mdx b/websocket/account-streams/orders-pending.mdx index 3c73fd9..406eea1 100644 --- a/websocket/account-streams/orders-pending.mdx +++ b/websocket/account-streams/orders-pending.mdx @@ -4,9 +4,11 @@ title: Orders Pending --- -This is a private channel. [Authorize](/websocket/account-streams/authorize) the WebSocket connection before subscribing. +This is a private channel. [Authorize](/websocket/authentication) the WebSocket connection before subscribing. +Query or subscribe to active (unexecuted) orders across specified markets. Each update includes order ID, type, side, price, amounts, and execution status. Update interval: real-time. + The private stream returns active orders, including orders using Retail Price Improvement (RPI) mode. \ No newline at end of file diff --git a/websocket/account-streams/overview.mdx b/websocket/account-streams/overview.mdx index 39b7743..48081a5 100644 --- a/websocket/account-streams/overview.mdx +++ b/websocket/account-streams/overview.mdx @@ -3,7 +3,7 @@ title: Account Streams sidebarTitle: Overview --- -Browse the available private WebSocket channels below. For connection details, message format, and rate limits, see the [WebSocket Overview](/websocket/overview). +Browse the available private WebSocket channels below. For connection details and message format, see the [WebSocket Overview](/websocket/overview). For rate limits, see [WebSocket Rate Limits](/websocket/rate-limits). diff --git a/websocket/account-streams/positions.mdx b/websocket/account-streams/positions.mdx index 0337326..6f33aca 100644 --- a/websocket/account-streams/positions.mdx +++ b/websocket/account-streams/positions.mdx @@ -4,7 +4,7 @@ title: Positions --- -This is a private channel. [Authorize](/websocket/account-streams/authorize) the WebSocket connection before subscribing. +This is a private channel. [Authorize](/websocket/authentication) the WebSocket connection before subscribing. Subscribe to positions updates. diff --git a/websocket/authentication.mdx b/websocket/authentication.mdx new file mode 100644 index 0000000..4814744 --- /dev/null +++ b/websocket/authentication.mdx @@ -0,0 +1,112 @@ +--- +title: "WebSocket Authentication" +sidebarTitle: "Authentication" +description: "How to authorize a WebSocket connection for access to private Account Stream channels." +--- + +Private WebSocket channels (Account Streams) require authorization before subscribing. Use a two-step flow: obtain a short-lived token via the REST API, then send an `authorize` request on the WebSocket connection. + +Authorization is required once per connection. After a successful `authorize` response, the connection can subscribe to any private channel without re-authorizing. + +--- + +## Step 1: Get a WebSocket token + +Call `POST /api/v4/profile/websocket_token` to obtain a token. Sign the request using the standard [HMAC-SHA512 authentication](/api-reference/authentication) process — authentication is required for this endpoint. + + +Rate limit: 10 requests per 60 seconds. + + +**Request body:** + +```json +{ + "request": "/api/v4/profile/websocket_token", + "nonce": "1594297865000" +} +``` + +**Response:** + +```json +{ + "websocket_token": "your_current_token" +} +``` + +The `websocket_token` value is used as the credential in the next step. Tokens are short-lived — request a fresh token before each new WebSocket connection. + +See [Get WebSocket Token](/api-reference/account-wallet/profile-websocket-token) for the full endpoint reference. + +--- + +## Step 2: Authorize the connection + +After establishing the WebSocket connection, send an `authorize` request before subscribing to any private channel. + +**Request:** + +```json +{ + "id": 0, + "method": "authorize", + "params": [ + "your_websocket_token", + "public" + ] +} +``` + +| Parameter | Type | Description | +|-----------|------|-------------| +| `params[0]` | STRING | The WebSocket token from Step 1 | +| `params[1]` | STRING | Constant value — always `"public"` | + +**Success response:** + +```json +{ + "id": 0, + "result": { + "status": "success" + }, + "error": null +} +``` + +Once the connection receives `"status": "success"`, subscribe to any Account Stream channel without further authorization. + +--- + +## Error handling + +If authorization fails, the `error` field contains a non-null object: + +```json +{ + "id": 0, + "result": null, + "error": { + "code": 1, + "message": "invalid argument" + } +} +``` + +Common causes: + +| Cause | Resolution | +|-------|------------| +| Expired or invalid token | Request a new token from `POST /api/v4/profile/websocket_token` | +| Incorrect `params[1]` value | Always pass the string `"public"` as the second parameter | +| Connection not established | Ensure the WebSocket handshake completes before sending `authorize` | + +--- + +## Related resources + +- [Authorize channel](/websocket/account-streams/authorize) — AsyncAPI spec for the `authorize` method +- [Account Streams](/websocket/account-streams/overview) — All private channels requiring authorization +- [REST API Authentication](/api-reference/authentication) — How to sign the token request +- [Get WebSocket Token](/api-reference/account-wallet/profile-websocket-token) — REST endpoint reference diff --git a/websocket/market-streams/lastprice.mdx b/websocket/market-streams/lastprice.mdx index 25e2d99..478f791 100644 --- a/websocket/market-streams/lastprice.mdx +++ b/websocket/market-streams/lastprice.mdx @@ -2,3 +2,5 @@ asyncapi: "/asyncapi/public/lastprice.yaml /ws" title: Last Price --- + +Query or subscribe to real-time last traded price updates for one or more markets. Update interval: 1 second. diff --git a/websocket/market-streams/overview.mdx b/websocket/market-streams/overview.mdx index 423b453..56f1327 100644 --- a/websocket/market-streams/overview.mdx +++ b/websocket/market-streams/overview.mdx @@ -3,7 +3,7 @@ title: Market Streams sidebarTitle: Overview --- -Browse the available public WebSocket channels below. For connection details, message format, and rate limits, see the [WebSocket Overview](/websocket/overview). +Browse the available public WebSocket channels below. For connection details and message format, see the [WebSocket Overview](/websocket/overview). For rate limits, see [WebSocket Rate Limits](/websocket/rate-limits). diff --git a/websocket/market-streams/service.mdx b/websocket/market-streams/service.mdx index 5036d7d..a301be7 100644 --- a/websocket/market-streams/service.mdx +++ b/websocket/market-streams/service.mdx @@ -2,3 +2,5 @@ asyncapi: "/asyncapi/public/service.yaml /ws" title: Service --- + +Check API availability with ping/pong requests and query the current server time. The Service channel supports one-time queries only and does not emit subscription update events. diff --git a/websocket/overview.mdx b/websocket/overview.mdx index 6080ad4..e0143c1 100644 --- a/websocket/overview.mdx +++ b/websocket/overview.mdx @@ -1,7 +1,7 @@ --- title: WebSocket API sidebarTitle: Overview -description: "WhiteBIT WebSocket API — connection details, quickstart examples, message formats, rate limits, and links to all available channels." +description: "WhiteBIT WebSocket API — connection details, quickstart examples, message format, and links to all available channels." --- import { RegionBaseUrl } from '/components/RegionBaseUrl.jsx'; @@ -172,7 +172,7 @@ The `params` array contains `[market_name, last_price]`. Parse each `lastprice_u | `method` | String | Name of the method to call | | `params` | Array | Parameters for the method | -🚫 The connection will be closed if invalid JSON is sent. +The connection will be closed if invalid JSON is sent. **Types of request messages:** @@ -223,29 +223,9 @@ The `params` array contains `[market_name, last_price]`. Parse each `lastprice_u --- -## Rate Limits +For connection limits, request limits, and error codes, see [WebSocket Rate Limits & Error Codes](/websocket/rate-limits). - - Rate limit: 1,000 WebSocket connections per minute and 200 requests per minute per connection. - - -### Error codes - -| Code | Message | -|------|---------| -| **1** | invalid argument | -| **2** | internal error | -| **3** | service unavailable | -| **4** | method not found | -| **5** | service timeout | - ---- - -## Authentication - -Private channels (Account Streams) require authorization before subscribing. After connecting, send an `authorize` request with API credentials to gain access to private data such as balances, orders, deals, and positions. - -See the [Authorize](/websocket/account-streams/authorize) channel page for the full request format, parameters, and examples. +Private channels require authorization. See [WebSocket Authentication](/websocket/authentication) for the full setup flow. --- @@ -264,12 +244,12 @@ See the [Authorize](/websocket/account-streams/authorize) channel page for the f ## Connection best practices -Reuse a single WebSocket connection for multiple subscriptions instead of opening a new connection per channel. Each connection counts toward the 1,000 connections per minute limit. +Reuse a single WebSocket connection for multiple subscriptions instead of opening a new connection per channel. See [WebSocket Rate Limits & Error Codes](/websocket/rate-limits) for connection and request limits, timeout behavior, and reconnection guidance. ## Related resources +- [WebSocket Authentication](/websocket/authentication) — Authorization flow for private Account Stream channels +- [WebSocket Rate Limits & Error Codes](/websocket/rate-limits) — Connection limits, request limits, and error codes - [API Reference Overview](/api-reference/overview) — Base URL, quickstart, and endpoint groups -- [Rate Limits & Error Codes](/api-reference/rate-limits) — REST rate limits, error formats, and authentication errors - [Market Streams](/websocket/market-streams/overview) — All public channels (kline, trades, depth, book ticker) - [Account Streams](/websocket/account-streams/overview) — Private channels for balances, orders, and positions -- [Authorize](/websocket/account-streams/authorize) — Authentication for private channels diff --git a/websocket/rate-limits.mdx b/websocket/rate-limits.mdx new file mode 100644 index 0000000..8a9a755 --- /dev/null +++ b/websocket/rate-limits.mdx @@ -0,0 +1,111 @@ +--- +title: "WebSocket Rate Limits & Error Codes" +sidebarTitle: "Rate limits and errors" +description: "Connection limits, request limits, timeout behavior, and error codes for the WhiteBIT WebSocket API." +--- + +Reference for WebSocket rate limits, connection timeout behavior, and error codes. + +--- + +## Connection limits + +| Scope | Limit | +|-------|-------| +| New connections | 1,000 per minute | +| Requests per connection | 200 per minute | + +Reuse a single WebSocket connection for multiple subscriptions. Opening a new connection per channel wastes the connection limit and adds latency. + +--- + +## Connection timeout + +The server closes the connection after **60 seconds of inactivity**. Inactivity means no messages sent by the client. + +Send a `ping` request every **50 seconds** to keep the connection alive: + +```json +{ + "id": 0, + "method": "ping", + "params": [] +} +``` + +**Expected response:** + +```json +{ + "id": 0, + "result": "pong", + "error": null +} +``` + +**Code example:** + +```javascript JavaScript +const socket = new WebSocket("wss://api.whitebit.com/ws"); + +setInterval(() => { + if (socket.readyState === WebSocket.OPEN) { + socket.send(JSON.stringify({ + id: 0, + method: "ping", + params: [] + })); + } +}, 50000); +``` + +--- + +## Error codes + +Errors are returned in the `error` field of a response message. The `error` object contains a `code` and a `message`. + +| Code | Message | +|------|---------| +| `1` | invalid argument | +| `2` | internal error | +| `3` | service unavailable | +| `4` | method not found | +| `5` | service timeout | + +**Error response format:** + +```json +{ + "id": 1, + "result": null, + "error": { + "code": 1, + "message": "invalid argument" + } +} +``` + + +The connection is closed immediately if invalid JSON is sent. + + +--- + +## Best practices + +**Reuse connections.** Each subscription does not require a new connection. Subscribe to multiple channels on a single connection to stay within the 1,000 connections per minute limit. + +**Implement reconnection logic.** Handle unexpected disconnections with exponential backoff (e.g., wait 1s, 2s, 4s, 8s between retries). Re-subscribe to all channels and re-authorize for private channels after reconnecting. + +**Batch subscriptions.** Subscribe to all required channels immediately after connecting rather than one at a time. Batching reduces round-trips and avoids hitting the 200 requests per minute per connection limit during setup. + +**Monitor ping latency.** A slow or missing `pong` response indicates network issues. Reconnect if no `pong` is received within 10 seconds of a `ping`. + +--- + +## Related resources + +- [WebSocket Overview](/websocket/overview) — Connection endpoint, message format, and quickstart +- [WebSocket Authentication](/websocket/authentication) — Authorization flow for private channels +- [REST API Rate Limits & Error Codes](/api-reference/rate-limits) — REST-specific limits and error formats From cebe44534541f97f2ff03a043aaf28eadce961c5 Mon Sep 17 00:00:00 2001 From: whitebit-robot Date: Tue, 24 Feb 2026 09:30:36 +0100 Subject: [PATCH 37/84] fix(websocket): fix quickstart code scope and duplicate related link --- guides/use-with-ai.mdx | 4 ++-- websocket/overview.mdx | 35 ++++++++++++++++++++++++++++------- 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/guides/use-with-ai.mdx b/guides/use-with-ai.mdx index ea4e7f0..8e10c37 100644 --- a/guides/use-with-ai.mdx +++ b/guides/use-with-ai.mdx @@ -22,5 +22,5 @@ Every WhiteBIT API documentation page includes a contextual menu with AI tool in - [Contextual AI menu](/guides/ai-context-menu) — All copy and AI tool options available on every documentation page - [IDE and AI client setup via MCP](/guides/ai-ide-setup) — Manual configuration for Cursor, VS Code, and Claude Desktop -- [API Reference Overview](/api-reference/overview) — REST API base URL, rate limits, and endpoint groups -- [API Reference Overview](/api-reference/overview) — Base URL, quickstart examples, and endpoint groups +- [API Reference Overview](/api-reference/overview) — REST API base URL, authentication, rate limits, and endpoint groups +- [WebSocket Overview](/websocket/overview) — WebSocket endpoint, message format, and channel overview diff --git a/websocket/overview.mdx b/websocket/overview.mdx index e0143c1..3a67711 100644 --- a/websocket/overview.mdx +++ b/websocket/overview.mdx @@ -70,11 +70,11 @@ The connection opens when the WebSocket handshake completes. The server closes the connection after 60 seconds of inactivity. Send a ping message every 50 seconds to keep the connection alive. +Add the following to the connection established in Step 1: + ```javascript JavaScript -const socket = new WebSocket("wss://api.whitebit.com/ws"); - setInterval(() => { if (socket.readyState === WebSocket.OPEN) { socket.send(JSON.stringify({ @@ -118,6 +118,8 @@ asyncio.run(connect()) Subscribe to the [Last Price](/websocket/market-streams/lastprice) channel to receive real-time price updates for one or more markets. +Send the subscription message using the connection from Step 1: + ```javascript JavaScript @@ -129,11 +131,30 @@ socket.send(JSON.stringify({ ``` ```python Python -await ws.send(json.dumps({ - "id": 1, - "method": "lastprice_subscribe", - "params": ["BTC_USDT", "ETH_USDT"] -})) +import asyncio +import websockets +import json + +async def connect(): + async with websockets.connect("wss://api.whitebit.com/ws") as ws: + async def keepalive(): + while True: + await asyncio.sleep(50) + await ws.send(json.dumps({"id": 0, "method": "ping", "params": []})) + + asyncio.create_task(keepalive()) + + await ws.send(json.dumps({ + "id": 1, + "method": "lastprice_subscribe", + "params": ["BTC_USDT", "ETH_USDT"] + })) + + async for message in ws: + data = json.loads(message) + print("Received:", data) + +asyncio.run(connect()) ``` From cecb702feaf434a2d771b9d779b24a3a8f1643d0 Mon Sep 17 00:00:00 2001 From: whitebit-robot Date: Wed, 25 Feb 2026 16:27:10 +0100 Subject: [PATCH 38/84] DR-89: Added webhooks for refund --- .mintignore | 1 + glossary.mdx | 5 ++++ openapi/private/main_api_v4.yaml | 2 +- platform/webhook.mdx | 49 ++++++++++++++++++++++++++++++++ 4 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 .mintignore diff --git a/.mintignore b/.mintignore new file mode 100644 index 0000000..158a1ab --- /dev/null +++ b/.mintignore @@ -0,0 +1 @@ +ai/ \ No newline at end of file diff --git a/glossary.mdx b/glossary.mdx index 4727bbc..b9f8d9a 100644 --- a/glossary.mdx +++ b/glossary.mdx @@ -323,6 +323,11 @@ The number of digits to the right of the decimal point. ## R + + +The process of returning funds for a canceled [deposit](#whitebit-deposit-to-main-balance). The refund address must support the same network and [asset](#assets) as the original deposit. The refund address cannot be a WhiteBIT address. Use the [Refund deposit endpoint](/api-reference/account-wallet/refund-deposit) to request a refund. + + Retail Price Improvement (RPI) defines a [limit order](#limit-order) mode improving execution for retail users and keeping the order out of public market data feeds. diff --git a/openapi/private/main_api_v4.yaml b/openapi/private/main_api_v4.yaml index 480e430..4336006 100644 --- a/openapi/private/main_api_v4.yaml +++ b/openapi/private/main_api_v4.yaml @@ -788,7 +788,7 @@ paths: - Refund processing is not instant. Use webhooks to receive status updates (coming soon). + Refund processing is not instant. Use the [refund.successful](/platform/webhook#whitebit-refund-successful) and [refund.failed](/platform/webhook#whitebit-refund-failed) webhooks to receive status updates. operationId: refundDeposit requestBody: diff --git a/platform/webhook.mdx b/platform/webhook.mdx index d512c1c..402518c 100644 --- a/platform/webhook.mdx +++ b/platform/webhook.mdx @@ -329,3 +329,52 @@ Performed when withdraw was completed. Request example: "id": "uuid" } ``` + +### WhiteBIT refund successful + +Performed when a refund was completed successfully. Request example: + +```json +{ + "method": "refund.successful", + "params": { + "transactionId": "5e112b38-...", + "status": "completed", + "refundAddress": "GDTSOI56...", + "depositAmount": "100", + "currency": "Tether USDT", + "ticker": "USDT", + "network": "ERC-20", + "createdAt": 1733924412, + "processedAt": 1733925012, + "refundNetworkFee": "1", + "refundAmount": "99", + "refundHash": "0x767ebd2...", + "nonce": 0 + }, + "id": "uuid" +} +``` + +### WhiteBIT refund failed + +Performed when a refund failed. The refund failed because the destination address is unsuitable or other reasons prevent the refund. Try a different address or contact support. Request example: + +```json +{ + "method": "refund.failed", + "params": { + "transactionId": "5e112b38-...", + "status": "failed", + "refundAddress": "GDTSOI56...", + "depositAmount": "100", + "currency": "Tether USDT", + "ticker": "USDT", + "network": "ERC-20", + "createdAt": 1733924412, + "processedAt": 1733925012, + "nonce": 0 + }, + "id": "uuid" +} +``` From 731d8e590cf0757065d29d9d4fb695aa41649770 Mon Sep 17 00:00:00 2001 From: whitebit-robot Date: Thu, 26 Feb 2026 13:29:34 +0200 Subject: [PATCH 39/84] DR-58: Added websocket error code 7 and rate limit sections. Files: websocket/rate-limits.mdx. --- websocket/rate-limits.mdx | 61 +++++++++++++++++++++++++-------------- 1 file changed, 40 insertions(+), 21 deletions(-) diff --git a/websocket/rate-limits.mdx b/websocket/rate-limits.mdx index 8a9a755..88c8644 100644 --- a/websocket/rate-limits.mdx +++ b/websocket/rate-limits.mdx @@ -4,9 +4,11 @@ sidebarTitle: "Rate limits and errors" description: "Connection limits, request limits, timeout behavior, and error codes for the WhiteBIT WebSocket API." --- -Reference for WebSocket rate limits, connection timeout behavior, and error codes. +Reference documentation for WebSocket connection limits, request limits, timeout behavior, and error codes. ---- + +Rate limit: `1000` WebSocket connections per minute and `200` JSON-RPC requests per minute per connection. + ## Connection limits @@ -15,15 +17,37 @@ Reference for WebSocket rate limits, connection timeout behavior, and error code | New connections | 1,000 per minute | | Requests per connection | 200 per minute | -Reuse a single WebSocket connection for multiple subscriptions. Opening a new connection per channel wastes the connection limit and adds latency. +Limit WebSocket connection creation to `1000` connections per minute. ---- +Limit JSON-RPC requests to `200` requests per minute per connection. + +Reuse a single WebSocket connection for multiple subscriptions. Opening a new connection per channel consumes the connection limit and increases latency. + +## Rate limit handling + +Implement request throttling on the client side. + +Queue subscription requests instead of sending bursts of requests. + +Apply exponential backoff with jitter after receiving error code `7`. + +Reuse active connections instead of creating new connections. + +### Rate limit error example + +```json +{ + "error": { "code": 7, "message": "too many requests" }, + "result": null, + "id": 2269 +} +``` ## Connection timeout -The server closes the connection after **60 seconds of inactivity**. Inactivity means no messages sent by the client. +The server closes the WebSocket connection after `60` seconds of inactivity. Inactivity means no messages sent by the client. -Send a `ping` request every **50 seconds** to keep the connection alive: +Send a `ping` request every `50` seconds to keep the connection alive: ```json { @@ -59,11 +83,9 @@ setInterval(() => { }, 50000); ``` ---- - ## Error codes -Errors are returned in the `error` field of a response message. The `error` object contains a `code` and a `message`. +The server returns errors in the `error` field of a response message. The `error` object contains a `code` and a `message`. | Code | Message | |------|---------| @@ -72,6 +94,7 @@ Errors are returned in the `error` field of a response message. The `error` obje | `3` | service unavailable | | `4` | method not found | | `5` | service timeout | +| `7` | too many requests | **Error response format:** @@ -87,25 +110,21 @@ Errors are returned in the `error` field of a response message. The `error` obje ``` -The connection is closed immediately if invalid JSON is sent. +The server closes the WebSocket connection immediately if the client sends invalid JSON. ---- - ## Best practices -**Reuse connections.** Each subscription does not require a new connection. Subscribe to multiple channels on a single connection to stay within the 1,000 connections per minute limit. +**Reuse connections**. Each subscription does not require a new connection. Subscribe to multiple channels on a single connection to stay within the `1,000` connections per minute limit. -**Implement reconnection logic.** Handle unexpected disconnections with exponential backoff (e.g., wait 1s, 2s, 4s, 8s between retries). Re-subscribe to all channels and re-authorize for private channels after reconnecting. +**Implement reconnection logic**. Handle unexpected disconnections with exponential backoff (for example, wait `1s`, `2s`, `4s`, `8s` between retries). Re-subscribe to all channels and re-authorize private channels after reconnecting. -**Batch subscriptions.** Subscribe to all required channels immediately after connecting rather than one at a time. Batching reduces round-trips and avoids hitting the 200 requests per minute per connection limit during setup. +**Batch subscriptions**. Subscribe to all required channels immediately after connecting rather than one at a time. Batching reduces round-trips and avoids hitting the `200` requests per minute per connection limit during setup. -**Monitor ping latency.** A slow or missing `pong` response indicates network issues. Reconnect if no `pong` is received within 10 seconds of a `ping`. - ---- +**Monitor ping latency**. A slow or missing `pong` response indicates network issues. Reconnect if the server does not return `pong` within `10` seconds after a `ping`. ## Related resources -- [WebSocket Overview](/websocket/overview) — Connection endpoint, message format, and quickstart -- [WebSocket Authentication](/websocket/authentication) — Authorization flow for private channels -- [REST API Rate Limits & Error Codes](/api-reference/rate-limits) — REST-specific limits and error formats +- [WebSocket Overview](/websocket/overview) — Connection endpoint, message format, and quickstart. +- [WebSocket Authentication](/websocket/authentication) — Authorization flow for private channels. +- [REST API Rate Limits & Error Codes](/api-reference/rate-limits) — REST-specific limits and error formats. From b73f9a22baa1ade3bd90d8a2a6c2cd69d8c58098 Mon Sep 17 00:00:00 2001 From: whitebit-robot Date: Thu, 26 Feb 2026 13:59:53 +0100 Subject: [PATCH 40/84] DR-89: Added changes according to comments --- glossary.mdx | 3 +-- openapi/private/main_api_v4.yaml | 2 +- platform/webhook.mdx | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/glossary.mdx b/glossary.mdx index b9f8d9a..45886bb 100644 --- a/glossary.mdx +++ b/glossary.mdx @@ -324,8 +324,7 @@ The number of digits to the right of the decimal point. - -The process of returning funds for a canceled [deposit](#whitebit-deposit-to-main-balance). The refund address must support the same network and [asset](#assets) as the original deposit. The refund address cannot be a WhiteBIT address. Use the [Refund deposit endpoint](/api-reference/account-wallet/refund-deposit) to request a refund. +Refund returns funds for a canceled [deposit](#whitebit-deposit-to-main-balance). The refund address must support the same network and [asset](#assets) as the original deposit. The refund address cannot be a WhiteBIT address. Use the [Refund deposit endpoint](/api-reference/account-wallet/refund-deposit) to request a refund. diff --git a/openapi/private/main_api_v4.yaml b/openapi/private/main_api_v4.yaml index 4336006..7d0a73c 100644 --- a/openapi/private/main_api_v4.yaml +++ b/openapi/private/main_api_v4.yaml @@ -788,7 +788,7 @@ paths: - Refund processing is not instant. Use the [refund.successful](/platform/webhook#whitebit-refund-successful) and [refund.failed](/platform/webhook#whitebit-refund-failed) webhooks to receive status updates. + Refund processing does not complete instantly. Use the [refund.successful](/platform/webhook#whitebit-refund-successful) and [refund.failed](/platform/webhook#whitebit-refund-failed) webhooks to receive refund status updates. operationId: refundDeposit requestBody: diff --git a/platform/webhook.mdx b/platform/webhook.mdx index 402518c..16149d3 100644 --- a/platform/webhook.mdx +++ b/platform/webhook.mdx @@ -332,7 +332,7 @@ Performed when withdraw was completed. Request example: ### WhiteBIT refund successful -Performed when a refund was completed successfully. Request example: +Triggered after the system successfully completes a refund. Request example: ```json { @@ -358,7 +358,7 @@ Performed when a refund was completed successfully. Request example: ### WhiteBIT refund failed -Performed when a refund failed. The refund failed because the destination address is unsuitable or other reasons prevent the refund. Try a different address or contact support. Request example: +Triggered after the system fails to complete a refund. The system rejects the refund if the destination address does not support the required network or asset, or if validation fails. Use a different address or contact support. Request example: ```json { From e366dab501532f054d58655cc5e9ac5cb2b1295b Mon Sep 17 00:00:00 2001 From: whitebit-robot Date: Thu, 26 Feb 2026 17:45:48 +0100 Subject: [PATCH 41/84] added missing responses and other changes related to comment --- openapi/private/http-trade-v4.yaml | 2112 +++++++++++++++++++++++++++- 1 file changed, 2090 insertions(+), 22 deletions(-) diff --git a/openapi/private/http-trade-v4.yaml b/openapi/private/http-trade-v4.yaml index 484b439..cfd08f9 100644 --- a/openapi/private/http-trade-v4.yaml +++ b/openapi/private/http-trade-v4.yaml @@ -287,7 +287,127 @@ paths: type: string responses: '200': - description: Order created + description: Successful response - order created + content: + application/json: + schema: + type: object + properties: + orderId: + type: integer + description: Unique order identifier + example: 4180284841 + clientOrderId: + type: string + description: Custom client order identifier. Empty string if not specified + example: "order1987111" + market: + type: string + description: Market name + example: "BTC_USDT" + side: + type: string + description: Order side + enum: [buy, sell] + example: "buy" + type: + type: string + description: Order type + example: "limit" + timestamp: + type: number + description: Timestamp of order creation in Unix format + example: 1595792396.165973 + dealMoney: + type: string + description: Amount in money currency that is finished + example: "0" + dealStock: + type: string + description: Amount in stock currency that is finished + example: "0" + amount: + type: string + description: Order amount + example: "0.01" + left: + type: string + description: Remaining amount that must be finished + example: "0.001" + dealFee: + type: string + description: Fee in money that is paid when order is finished + example: "0" + price: + type: string + description: Order price + example: "40000" + postOnly: + type: boolean + description: Post-only flag + example: false + ioc: + type: boolean + description: Immediate or cancel flag + example: false + status: + type: string + description: Order status + enum: [NEW, FILLED, PARTIALLY_FILLED, CANCELLED] + example: "FILLED" + stp: + type: string + description: Self trade prevention mode + example: "no" + oto: + type: object + description: OTO order data when stopLoss or takeProfit is specified + nullable: true + properties: + otoId: + type: integer + description: OTO order identifier + example: 29457221 + stopLoss: + type: string + description: Stop loss order price + example: "30000" + takeProfit: + type: string + description: Take profit order price + example: "50000" + positionSide: + type: string + description: Position side + enum: [LONG, SHORT, BOTH] + example: "LONG" + rpi: + type: boolean + description: Retail Price Improvement flag + example: true + example: + orderId: 4180284841 + clientOrderId: "order1987111" + market: "BTC_USDT" + side: "buy" + type: "limit" + timestamp: 1595792396.165973 + dealMoney: "0" + dealStock: "0" + amount: "0.01" + left: "0.001" + dealFee: "0" + price: "40000" + postOnly: false + ioc: false + status: "FILLED" + stp: "no" + oto: + otoId: 29457221 + stopLoss: "30000" + takeProfit: "50000" + positionSide: "LONG" + rpi: true '422': description: Inner validation failed content: @@ -387,7 +507,164 @@ paths: type: string responses: '200': - description: Orders created + description: Successful response - returns array of order results + content: + application/json: + schema: + type: array + description: Array of order creation results. Each item contains either a successful result or an error. + items: + type: object + properties: + result: + type: object + nullable: true + description: Order data when successful, null when failed + properties: + orderId: + type: integer + description: Unique order identifier + example: 4326248250 + clientOrderId: + type: string + description: Custom client order identifier. Empty string if not specified + example: "" + market: + type: string + description: Market name + example: "BTC_USDT" + side: + type: string + description: Order side + enum: [buy, sell] + example: "buy" + type: + type: string + description: Order type + example: "limit" + timestamp: + type: number + description: Timestamp of order creation in Unix format + example: 1684916268.825564 + dealMoney: + type: string + description: Amount in money currency that is finished + example: "641.988" + dealStock: + type: string + description: Amount in stock currency that is finished + example: "0.02" + amount: + type: string + description: Order amount + example: "0.02" + left: + type: string + description: Remaining amount that must be finished + example: "0" + dealFee: + type: string + description: Fee in money that is paid when order is finished + example: "1.283976" + price: + type: string + description: Order price + example: "40000" + postOnly: + type: boolean + description: Post-only flag + example: false + ioc: + type: boolean + description: Immediate or cancel flag + example: false + status: + type: string + description: Order status + enum: [NEW, FILLED, PARTIALLY_FILLED, CANCELLED] + example: "FILLED" + stp: + type: string + description: Self trade prevention mode + example: "no" + positionSide: + type: string + description: Position side + enum: [LONG, SHORT, BOTH] + example: "LONG" + rpi: + type: boolean + description: Retail Price Improvement flag + example: true + error: + type: object + nullable: true + description: Error details when order creation failed, null when successful + properties: + code: + type: integer + description: Error code + example: 32 + message: + type: string + description: Error message + example: "Validation failed" + errors: + type: object + description: Detailed validation errors + additionalProperties: + type: array + items: + type: string + example: + amount: ["Given amount is less than min amount 0.001."] + example: + - result: + orderId: 4326248250 + clientOrderId: "" + market: "BTC_USDT" + side: "buy" + type: "limit" + timestamp: 1684916268.825564 + dealMoney: "641.988" + dealStock: "0.02" + amount: "0.02" + left: "0" + dealFee: "1.283976" + ioc: false + postOnly: false + price: "40000" + status: "FILLED" + stp: "no" + positionSide: "LONG" + rpi: true + error: null + - result: null + error: + code: 32 + message: "Validation failed" + errors: + amount: ["Given amount is less than min amount 0.001."] + - result: + orderId: 4326248250 + clientOrderId: "" + market: "BTC_USDT" + side: "sell" + type: "limit" + timestamp: 1684916268.825564 + dealMoney: "641.988" + dealStock: "0.02" + amount: "0.02" + left: "0" + dealFee: "1.283976" + ioc: false + postOnly: false + price: "41000" + status: "FILLED" + stp: "no" + positionSide: "LONG" + rpi: true + error: null '400': description: Inner validation failed content: @@ -451,7 +728,107 @@ paths: type: string responses: '200': - description: Order created + description: Successful response - market order created + content: + application/json: + schema: + type: object + properties: + orderId: + type: integer + description: Unique order identifier + example: 4180284841 + clientOrderId: + type: string + description: Custom client order identifier. Empty string if not specified + example: "order1987111" + market: + type: string + description: Market name + example: "BTC_USDT" + side: + type: string + description: Order side + enum: [buy, sell] + example: "sell" + type: + type: string + description: Order type + example: "market" + timestamp: + type: number + description: Timestamp of order creation in Unix format + example: 1595792396.165973 + dealMoney: + type: string + description: Amount in money currency that is finished + example: "0" + dealStock: + type: string + description: Amount in stock currency that is finished + example: "0" + amount: + type: string + description: Order amount + example: "0.001" + left: + type: string + description: Remaining amount that must be finished + example: "0.001" + dealFee: + type: string + description: Fee in money that is paid when order is finished + example: "0" + status: + type: string + description: Order status + enum: [NEW, FILLED, PARTIALLY_FILLED, CANCELLED] + example: "FILLED" + stp: + type: string + description: Self trade prevention mode + example: "no" + oto: + type: object + description: OTO order data when stopLoss or takeProfit is specified + nullable: true + properties: + otoId: + type: integer + description: OTO order identifier + example: 29457221 + stopLoss: + type: string + description: Stop loss order price + example: "50000" + takeProfit: + type: string + description: Take profit order price + example: "40000" + positionSide: + type: string + description: Position side + enum: [LONG, SHORT, BOTH] + example: "LONG" + example: + orderId: 4180284841 + clientOrderId: "order1987111" + market: "BTC_USDT" + side: "sell" + type: "market" + timestamp: 1595792396.165973 + dealMoney: "0" + dealStock: "0" + amount: "0.001" + left: "0.001" + dealFee: "0" + status: "FILLED" + stp: "no" + oto: + otoId: 29457221 + stopLoss: "50000" + takeProfit: "40000" + positionSide: "LONG" '422': description: Internal validation failed content: @@ -515,7 +892,117 @@ paths: type: string responses: '200': - description: Order created + description: Successful response - stop-limit order created + content: + application/json: + schema: + type: object + properties: + orderId: + type: integer + description: Unique order identifier + example: 4180284841 + clientOrderId: + type: string + description: Custom client order identifier. Empty string if not specified + example: "order1987111" + market: + type: string + description: Market name + example: "BTC_USDT" + side: + type: string + description: Order side + enum: [buy, sell] + example: "buy" + type: + type: string + description: Order type + example: "stop limit" + timestamp: + type: number + description: Timestamp of order creation in Unix format + example: 1595792396.165973 + dealMoney: + type: string + description: Amount in money currency that is finished + example: "0" + dealStock: + type: string + description: Amount in stock currency that is finished + example: "0" + amount: + type: string + description: Order amount + example: "0.001" + left: + type: string + description: Remaining amount that must be finished + example: "0.001" + dealFee: + type: string + description: Fee in money that is paid when order is finished + example: "0" + price: + type: string + description: Order price + example: "40000" + activation_price: + type: string + description: Price at which the stop-limit order activates + example: "40000" + status: + type: string + description: Order status + enum: [NEW, FILLED, PARTIALLY_FILLED, CANCELLED] + example: "FILLED" + stp: + type: string + description: Self trade prevention mode + example: "no" + oto: + type: object + description: OTO order data when stopLoss or takeProfit is specified + nullable: true + properties: + otoId: + type: integer + description: OTO order identifier + example: 29457221 + stopLoss: + type: string + description: Stop loss order price + example: "30000" + takeProfit: + type: string + description: Take profit order price + example: "50000" + positionSide: + type: string + description: Position side + enum: [LONG, SHORT, BOTH] + example: "LONG" + example: + orderId: 4180284841 + clientOrderId: "order1987111" + market: "BTC_USDT" + side: "buy" + type: "stop limit" + timestamp: 1595792396.165973 + dealMoney: "0" + dealStock: "0" + amount: "0.001" + left: "0.001" + dealFee: "0" + price: "40000" + activation_price: "40000" + status: "FILLED" + stp: "no" + oto: + otoId: 29457221 + stopLoss: "30000" + takeProfit: "50000" + positionSide: "LONG" '400': description: Inner validation failed content: @@ -582,7 +1069,112 @@ paths: type: string responses: '200': - description: Order created + description: Successful response - trigger market order created + content: + application/json: + schema: + type: object + properties: + orderId: + type: integer + description: Unique order identifier + example: 4180284841 + clientOrderId: + type: string + description: Custom client order identifier. Empty string if not specified + example: "order1987111" + market: + type: string + description: Market name + example: "BTC_USDT" + side: + type: string + description: Order side + enum: [buy, sell] + example: "sell" + type: + type: string + description: Order type + example: "stop market" + timestamp: + type: number + description: Timestamp of order creation in Unix format + example: 1595792396.165973 + dealMoney: + type: string + description: Amount in money currency that is finished + example: "0" + dealStock: + type: string + description: Amount in stock currency that is finished + example: "0" + amount: + type: string + description: Order amount + example: "0.001" + left: + type: string + description: Remaining amount that must be finished + example: "0.001" + dealFee: + type: string + description: Fee in money that is paid when order is finished + example: "0" + activation_price: + type: string + description: Price at which the stop market order activates + example: "40000" + status: + type: string + description: Order status + enum: [NEW, FILLED, PARTIALLY_FILLED, CANCELLED] + example: "FILLED" + stp: + type: string + description: Self trade prevention mode + example: "no" + oto: + type: object + description: OTO order data when stopLoss or takeProfit is specified + nullable: true + properties: + otoId: + type: integer + description: OTO order identifier + example: 29457221 + stopLoss: + type: string + description: Stop loss order price + example: "50000" + takeProfit: + type: string + description: Take profit order price + example: "30000" + positionSide: + type: string + description: Position side + enum: [LONG, SHORT, BOTH] + example: "LONG" + example: + orderId: 4180284841 + clientOrderId: "order1987111" + market: "BTC_USDT" + side: "sell" + type: "stop market" + timestamp: 1595792396.165973 + dealMoney: "0" + dealStock: "0" + amount: "0.001" + left: "0.001" + dealFee: "0" + activation_price: "40000" + status: "FILLED" + stp: "no" + oto: + otoId: 29457221 + stopLoss: "50000" + takeProfit: "30000" + positionSide: "LONG" '422': description: Inner validation failed content: @@ -618,7 +1210,48 @@ paths: type: string responses: '200': - description: Account summary + description: Successful response - returns collateral account summary + content: + application/json: + schema: + type: object + properties: + equity: + type: string + description: Total equity value of the collateral account + example: "15000.50" + margin: + type: string + description: Total margin used + example: "5000.00" + freeMargin: + type: string + description: Available margin for trading + example: "10000.50" + unrealizedFunding: + type: string + description: Unrealized funding payments + example: "25.75" + pnl: + type: string + description: Unrealized profit and loss + example: "150.25" + leverage: + type: integer + description: Current leverage level + example: 3 + marginFraction: + type: string + description: Margin fraction ratio (margin / equity) + example: "0.3333" + example: + equity: "15000.50" + margin: "5000.00" + freeMargin: "10000.50" + unrealizedFunding: "25.75" + pnl: "150.25" + leverage: 3 + marginFraction: "0.3333" '503': description: Service temporarily unavailable @@ -627,7 +1260,7 @@ paths: summary: Open Positions description: | The endpoint retrieves open positions. - + Rate limit: 12000 requests/10 sec. @@ -644,13 +1277,162 @@ paths: properties: market: type: string + description: | + Filter by specific market. For example: BTC_USDT + + If not specified, returns all open positions. + example: BTC_USDT request: type: string + description: Request signature nonce: type: string + description: Unique request identifier + example: + market: "BTC_USDT" + request: "{{request}}" + nonce: "{{nonce}}" responses: '200': - description: Open positions + description: Successful response - returns array of open positions + content: + application/json: + schema: + type: array + items: + type: object + properties: + positionId: + type: integer + description: Unique position identifier + example: 527 + market: + type: string + description: Market name + example: "BTC_USDT" + amount: + type: string + description: Position amount + example: "0.1" + basePrice: + type: string + description: Base price of position + example: "45658.349" + liqPrice: + type: string + description: Liquidation price according to current state of position + example: "40000.00" + nullable: true + pnl: + type: string + description: Unrealized profit and loss in money + example: "-168.42" + pnlPercent: + type: string + description: Unrealized profit and loss in percentage + example: "-0.43" + margin: + type: string + description: Amount of funds in open position money + example: "8316.74" + freeMargin: + type: string + description: Free funds for trading + example: "619385.67" + funding: + type: string + description: Funding that will be paid on next position stage change + example: "0" + unrealizedPnl: + type: string + description: Unrealized profit and loss + example: "0.0019142920201966" + positionSide: + type: string + description: Position side + enum: [LONG, SHORT, BOTH] + example: "LONG" + openDate: + type: number + description: Date of position opening in Unix timestamp format + example: 1651568067.789679 + modifyDate: + type: number + description: Date of position modifying (current event) in Unix timestamp format + example: 1651568067.789679 + liquidationPrice: + type: string + description: Liquidation price according to current state of position + nullable: true + example: null + liquidationState: + type: string + description: State of liquidation + enum: [margin_call, liquidation] + nullable: true + example: null + tpsl: + type: object + description: Take profit and stop loss configuration + nullable: true + properties: + takeProfitId: + type: integer + description: Take profit order ID + example: 123 + takeProfit: + type: string + description: Take profit price + example: "50000" + stopLossId: + type: integer + description: Stop loss order ID + example: 124 + stopLoss: + type: string + description: Stop loss price + example: "35000" + unrealizedFunding: + type: string + description: Funding that will be paid on next position stage change + example: "0.0019142920201966" + example: + - positionId: 527 + market: "BTC_USDT" + openDate: 1651568067.789679 + modifyDate: 1651568067.789679 + amount: "0.1" + basePrice: "45658.349" + liquidationPrice: null + liquidationState: null + pnl: "-168.42" + pnlPercent: "-0.43" + margin: "8316.74" + freeMargin: "619385.67" + funding: "0" + unrealizedFunding: "0.0019142920201966" + tpsl: + takeProfitId: 123 + takeProfit: "50000" + stopLossId: 124 + stopLoss: "35000" + positionSide: "LONG" + - positionId: 528 + market: "ETH_USDT" + openDate: 1651568067.789679 + modifyDate: 1651568067.789679 + amount: "0.1" + basePrice: "5658.349" + liquidationPrice: null + liquidationState: null + pnl: "-168.42" + pnlPercent: "-0.43" + margin: "8316.74" + freeMargin: "19385.67" + funding: "0" + unrealizedFunding: "0.0020142920201966" + tpsl: null + positionSide: "LONG" '422': description: Inner validation failed content: @@ -746,7 +1528,107 @@ paths: type: string responses: '200': - description: Positions history + description: Successful response - returns array of position history + content: + application/json: + schema: + type: array + description: Array of position history entries + items: + type: object + properties: + positionId: + type: integer + description: Position identifier + example: 111 + market: + type: string + description: Position market + example: "BTC_USDT" + openDate: + type: number + description: Date of position opening in Unix timestamp format + example: 1650400589.882613 + modifyDate: + type: number + description: Date of position modification (current event) in Unix timestamp format + example: 1650400589.882613 + amount: + type: string + description: Position amount + example: "0.1" + basePrice: + type: string + description: Base price of position + example: "45658.349" + realizedFunding: + type: string + description: Funding fee for whole position lifetime till current state + example: "0" + liquidationPrice: + type: string + description: Liquidation price according to current state of position + nullable: true + example: null + liquidationState: + type: string + description: State of liquidation + enum: [margin_call, liquidation] + nullable: true + example: null + orderDetail: + type: object + description: Details of order which changes position + properties: + id: + type: integer + description: Order identifier + example: 97067934 + tradeAmount: + type: string + description: Trade amount of order + example: "0.1" + price: + type: string + description: Order price + example: "41507.59" + tradeFee: + type: string + description: Order trade fee + example: "415.07" + fundingFee: + type: string + description: Funding fee captured by this position change + nullable: true + example: null + realizedPnl: + type: string + description: Realized profit and loss + nullable: true + example: null + positionSide: + type: string + description: Position side + enum: [LONG, SHORT, BOTH] + example: "LONG" + example: + - positionId: 111 + market: "BTC_USDT" + openDate: 1650400589.882613 + modifyDate: 1650400589.882613 + amount: "0.1" + basePrice: "45658.349" + realizedFunding: "0" + liquidationPrice: null + liquidationState: null + orderDetail: + id: 97067934 + tradeAmount: "0.1" + price: "41507.59" + tradeFee: "415.07" + fundingFee: null + realizedPnl: null + positionSide: "LONG" '400': description: Inner validation failed content: @@ -769,7 +1651,7 @@ paths: summary: Funding History description: | The endpoint retrieves funding history. - + Rate limit: 12000 requests/10 sec. @@ -786,13 +1668,101 @@ paths: properties: market: type: string + description: | + Filter by specific market. For example: BTC_PERP + + If not specified, returns funding history for all markets. + example: BTC_PERP + limit: + type: integer + description: Number of records to return + example: 100 + default: 100 + offset: + type: integer + description: Number of records to skip + example: 0 + default: 0 request: type: string + description: Request signature nonce: type: string + description: Unique request identifier + example: + market: "BTC_PERP" + limit: 100 + offset: 0 + request: "{{request}}" + nonce: "{{nonce}}" responses: '200': - description: Funding history + description: Successful response - returns paginated funding history + content: + application/json: + schema: + type: object + properties: + records: + type: array + description: Array of funding history entries + items: + type: object + properties: + market: + type: string + description: Market name + example: "BTC_PERP" + fundingTime: + type: string + description: Funding time in Unix timestamp format + example: "1734451200" + fundingRate: + type: string + description: Funding rate applied + example: "0.00017674" + fundingAmount: + type: string + description: Funding amount paid or received + example: "-0.171053531892" + positionAmount: + type: string + description: Position amount at funding time + example: "0.019" + settlementPrice: + type: string + description: Settlement price used for funding calculation + example: "50938.2" + rateCalculatedTime: + type: string + description: Time when the funding rate was calculated in Unix timestamp format + example: "1734364800" + limit: + type: integer + description: Number of records per page + example: 100 + offset: + type: integer + description: Number of records skipped + example: 0 + example: + records: + - market: "BTC_PERP" + fundingTime: "1734451200" + fundingRate: "0.00017674" + fundingAmount: "-0.171053531892" + positionAmount: "0.019" + settlementPrice: "50938.2" + rateCalculatedTime: "1734364800" + - market: "BTC_PERP" + fundingTime: "1734451200" + fundingRate: "-0.000177877800093587" + fundingAmount: "-0.0054997859133136" + positionAmount: "-0.001" + settlementPrice: "30918.9" + rateCalculatedTime: "1734364800" + limit: 100 + offset: 0 '422': description: Inner validation failed content: @@ -836,7 +1806,18 @@ paths: type: string responses: '200': - description: Leverage changed + description: Successful response - leverage changed + content: + application/json: + schema: + type: object + properties: + leverage: + type: integer + description: Current collateral balance leverage + example: 5 + example: + leverage: 5 '422': description: Inner validation failed content: @@ -872,7 +1853,18 @@ paths: type: string responses: '200': - description: Hedge mode status + description: Successful response - returns hedge mode status + content: + application/json: + schema: + type: object + properties: + hedgeMode: + type: boolean + description: Current hedge mode status + example: true + example: + hedgeMode: true '500': description: Internal error '503': @@ -910,7 +1902,7 @@ paths: type: string responses: '200': - description: Hedge mode updated + description: Successful response - hedge mode updated '422': description: Inner validation failed content: @@ -956,7 +1948,163 @@ paths: type: string responses: '200': - description: Active conditional orders + description: Successful response - returns paginated conditional orders (OCO and OTO types) + content: + application/json: + schema: + type: object + properties: + limit: + type: integer + description: Number of records per page + example: 100 + offset: + type: integer + description: Number of records skipped + example: 0 + total: + type: integer + description: Total number of records + example: 2 + records: + type: array + description: Array of conditional orders (can be OCO or OTO type) + items: + oneOf: + - type: object + description: OCO type conditional order + properties: + id: + type: integer + example: 117703764513 + type: + type: string + enum: [oco] + example: "oco" + stop_loss: + type: object + properties: + orderId: + type: integer + example: 117703764514 + positionSide: + type: string + enum: [LONG, SHORT, BOTH] + example: "LONG" + take_profit: + type: object + properties: + orderId: + type: integer + example: 117703764515 + positionSide: + type: string + enum: [LONG, SHORT, BOTH] + example: "LONG" + - type: object + description: OTO type conditional order + properties: + id: + type: integer + example: 29457221 + type: + type: string + enum: [oto] + example: "oto" + stopLossPrice: + type: string + example: "30000" + takeProfitPrice: + type: string + example: "50000" + conditionalOrder: + type: object + properties: + orderId: + type: integer + example: 3686033640 + clientOrderId: + type: string + example: "customId11" + market: + type: string + example: "BTC_USDT" + positionSide: + type: string + enum: [LONG, SHORT, BOTH] + example: "LONG" + example: + limit: 100 + offset: 0 + total: 2 + records: + - id: 117703764513 + type: "oco" + stop_loss: + orderId: 117703764514 + clientOrderId: "" + market: "BTC_USDT" + side: "buy" + type: "stop limit" + timestamp: 1594605801.49815 + dealMoney: "0" + dealStock: "0" + amount: "2.241379" + takerFee: "0.001" + makerFee: "0.001" + left: "2.241379" + dealFee: "0" + post_only: false + mtime: 1662478154.941582 + price: "19928.79" + activation_price: "29928.79" + activation_condition: "gte" + activated: 0 + status: "FILLED" + stp: "no" + positionSide: "LONG" + take_profit: + orderId: 117703764515 + clientOrderId: "" + market: "BTC_USDT" + side: "buy" + type: "limit" + timestamp: 1662478154.941582 + dealMoney: "0" + dealStock: "0" + amount: "0.635709" + takerFee: "0.001" + makerFee: "0.001" + left: "0.635709" + dealFee: "0" + post_only: false + mtime: 1662478154.941582 + price: "9928.79" + status: "FILLED" + stp: "no" + positionSide: "LONG" + - id: 29457221 + type: "oto" + stopLossPrice: "30000" + takeProfitPrice: "50000" + conditionalOrder: + orderId: 3686033640 + clientOrderId: "customId11" + market: "BTC_USDT" + side: "buy" + type: "limit" + timestamp: 1594605801.49815 + dealMoney: "0" + dealStock: "0" + amount: "2.241379" + takerFee: "0.001" + makerFee: "0.001" + left: "2.241379" + dealFee: "0" + price: "40000" + status: "FILLED" + stp: "no" + positionSide: "LONG" '400': description: Inner validation failed content: @@ -1006,7 +2154,190 @@ paths: type: string responses: '200': - description: Active OCO orders + description: Successful response - returns array of active OCO orders + content: + application/json: + schema: + type: array + description: Array of active OCO orders + items: + type: object + properties: + id: + type: integer + description: OCO order identifier + example: 117703764513 + stop_loss: + type: object + description: Stop loss order details + properties: + orderId: + type: integer + example: 117703764514 + clientOrderId: + type: string + example: "" + market: + type: string + example: "BTC_USDT" + side: + type: string + enum: [buy, sell] + example: "buy" + type: + type: string + example: "stop limit" + timestamp: + type: number + example: 1594605801.49815 + dealMoney: + type: string + example: "0" + dealStock: + type: string + example: "0" + amount: + type: string + example: "2.241379" + takerFee: + type: string + example: "0.001" + makerFee: + type: string + example: "0.001" + left: + type: string + example: "2.241379" + dealFee: + type: string + example: "0" + post_only: + type: boolean + example: false + mtime: + type: number + example: 1662478154.941582 + price: + type: string + example: "19928.79" + activation_price: + type: string + example: "29928.79" + activation_condition: + type: string + enum: [gte, lte] + example: "gte" + activated: + type: integer + example: 0 + status: + type: string + example: "FILLED" + stp: + type: string + example: "no" + take_profit: + type: object + description: Take profit order details + properties: + orderId: + type: integer + example: 117703764515 + clientOrderId: + type: string + example: "" + market: + type: string + example: "BTC_USDT" + side: + type: string + enum: [buy, sell] + example: "buy" + type: + type: string + example: "limit" + timestamp: + type: number + example: 1662478154.941582 + dealMoney: + type: string + example: "0" + dealStock: + type: string + example: "0" + amount: + type: string + example: "0.635709" + takerFee: + type: string + example: "0.001" + makerFee: + type: string + example: "0.001" + left: + type: string + example: "0.635709" + dealFee: + type: string + example: "0" + post_only: + type: boolean + example: false + mtime: + type: number + example: 1662478154.941582 + price: + type: string + example: "9928.79" + status: + type: string + example: "FILLED" + stp: + type: string + example: "no" + example: + - id: 117703764513 + stop_loss: + orderId: 117703764514 + clientOrderId: "" + market: "BTC_USDT" + side: "buy" + type: "stop limit" + timestamp: 1594605801.49815 + dealMoney: "0" + dealStock: "0" + amount: "2.241379" + takerFee: "0.001" + makerFee: "0.001" + left: "2.241379" + dealFee: "0" + post_only: false + mtime: 1662478154.941582 + price: "19928.79" + activation_price: "29928.79" + activation_condition: "gte" + activated: 0 + status: "FILLED" + stp: "no" + take_profit: + orderId: 117703764515 + clientOrderId: "" + market: "BTC_USDT" + side: "buy" + type: "limit" + timestamp: 1662478154.941582 + dealMoney: "0" + dealStock: "0" + amount: "0.635709" + takerFee: "0.001" + makerFee: "0.001" + left: "0.635709" + dealFee: "0" + post_only: false + mtime: 1662478154.941582 + price: "9928.79" + status: "FILLED" + stp: "no" '400': description: Inner validation failed content: @@ -1072,7 +2403,240 @@ paths: type: string responses: '200': - description: OCO order created + description: Successful response - OCO order created + content: + application/json: + schema: + type: object + properties: + id: + type: integer + description: OCO order identifier + example: 117703764513 + stop_loss: + type: object + description: Stop loss order details + properties: + orderId: + type: integer + description: Order identifier + example: 117703764514 + clientOrderId: + type: string + description: Custom order identifier. Empty string if not specified + example: "" + market: + type: string + description: Market name + example: "BTC_USDT" + side: + type: string + description: Order side + enum: [buy, sell] + example: "buy" + type: + type: string + description: Order type + example: "stop limit" + timestamp: + type: number + description: Timestamp of order creation + example: 1594605801.49815 + dealMoney: + type: string + description: Executed amount in money + example: "0" + dealStock: + type: string + description: Executed amount in stock + example: "0" + amount: + type: string + description: Order amount + example: "2.241379" + takerFee: + type: string + description: Taker fee ratio + example: "0.001" + makerFee: + type: string + description: Maker fee ratio + example: "0.001" + left: + type: string + description: Unexecuted amount in stock + example: "2.241379" + dealFee: + type: string + description: Executed fee by deal + example: "0" + post_only: + type: boolean + description: Post-only flag + example: false + mtime: + type: number + description: Timestamp of order modification + example: 1662478154.941582 + price: + type: string + description: Order price + example: "19928.79" + activation_price: + type: string + description: Activation price + example: "29928.79" + activation_condition: + type: string + description: Activation condition + enum: [gte, lte] + example: "gte" + activated: + type: integer + description: Activation status (0 - not activated, 1 - activated) + example: 0 + status: + type: string + description: Order status + enum: [NEW, FILLED, PARTIALLY_FILLED, CANCELLED] + example: "FILLED" + stp: + type: string + description: Self trade prevention mode + example: "no" + positionSide: + type: string + description: Position side + enum: [LONG, SHORT, BOTH] + example: "LONG" + take_profit: + type: object + description: Take profit order details + properties: + orderId: + type: integer + description: Order identifier + example: 117703764515 + clientOrderId: + type: string + description: Custom order identifier. Empty string if not specified + example: "" + market: + type: string + description: Market name + example: "BTC_USDT" + side: + type: string + description: Order side + enum: [buy, sell] + example: "buy" + type: + type: string + description: Order type + example: "limit" + timestamp: + type: number + description: Timestamp of order creation + example: 1662478154.941582 + dealMoney: + type: string + description: Executed amount in money + example: "0" + dealStock: + type: string + description: Executed amount in stock + example: "0" + amount: + type: string + description: Order amount + example: "0.635709" + takerFee: + type: string + description: Taker fee ratio + example: "0.001" + makerFee: + type: string + description: Maker fee ratio + example: "0.001" + left: + type: string + description: Unexecuted amount in stock + example: "0.635709" + dealFee: + type: string + description: Executed fee by deal + example: "0" + post_only: + type: boolean + description: Post-only flag + example: false + mtime: + type: number + description: Timestamp of order modification + example: 1662478154.941582 + price: + type: string + description: Order price + example: "9928.79" + status: + type: string + description: Order status + enum: [NEW, FILLED, PARTIALLY_FILLED, CANCELLED] + example: "FILLED" + stp: + type: string + description: Self trade prevention mode + example: "no" + positionSide: + type: string + description: Position side + enum: [LONG, SHORT, BOTH] + example: "LONG" + example: + id: 117703764513 + stop_loss: + orderId: 117703764514 + clientOrderId: "" + market: "BTC_USDT" + side: "buy" + type: "stop limit" + timestamp: 1594605801.49815 + dealMoney: "0" + dealStock: "0" + amount: "2.241379" + takerFee: "0.001" + makerFee: "0.001" + left: "2.241379" + dealFee: "0" + post_only: false + mtime: 1662478154.941582 + price: "19928.79" + activation_price: "29928.79" + activation_condition: "gte" + activated: 0 + status: "FILLED" + stp: "no" + positionSide: "LONG" + take_profit: + orderId: 117703764515 + clientOrderId: "" + market: "BTC_USDT" + side: "buy" + type: "limit" + timestamp: 1662478154.941582 + dealMoney: "0" + dealStock: "0" + amount: "0.635709" + takerFee: "0.001" + makerFee: "0.001" + left: "0.635709" + dealFee: "0" + post_only: false + mtime: 1662478154.941582 + price: "9928.79" + status: "FILLED" + stp: "no" + positionSide: "LONG" '400': description: Inner validation failed content: @@ -1174,7 +2738,216 @@ paths: type: string responses: '200': - description: OCO order cancelled + description: Successful response - OCO order cancelled + content: + application/json: + schema: + type: object + properties: + id: + type: integer + description: OCO order identifier + example: 117703764513 + stop_loss: + type: object + description: Cancelled stop loss order details + properties: + orderId: + type: integer + description: Order identifier + example: 117703764514 + clientOrderId: + type: string + description: Custom order identifier. Empty string if not specified + example: "" + market: + type: string + description: Market name + example: "BTC_USDT" + side: + type: string + description: Order side + enum: [buy, sell] + example: "buy" + type: + type: string + description: Order type + example: "stop limit" + timestamp: + type: number + description: Timestamp of order creation + example: 1594605801.49815 + dealMoney: + type: string + description: Executed amount in money + example: "0" + dealStock: + type: string + description: Executed amount in stock + example: "0" + amount: + type: string + description: Order amount + example: "2.241379" + takerFee: + type: string + description: Taker fee ratio + example: "0.001" + makerFee: + type: string + description: Maker fee ratio + example: "0.001" + left: + type: string + description: Unexecuted amount in stock + example: "2.241379" + dealFee: + type: string + description: Executed fee by deal + example: "0" + post_only: + type: boolean + description: Post-only flag + example: false + mtime: + type: number + description: Timestamp of order modification + example: 1662478154.941582 + price: + type: string + description: Order price + example: "19928.79" + activation_price: + type: string + description: Activation price + example: "29928.79" + activation_condition: + type: string + description: Activation condition + enum: [gte, lte] + example: "gte" + activated: + type: integer + description: Activation status (0 - not activated, 1 - activated) + example: 0 + status: + type: string + description: Order status + example: "CANCELED" + stp: + type: string + description: Self trade prevention mode + example: "no" + take_profit: + type: object + description: Cancelled take profit order details + properties: + orderId: + type: integer + description: Order identifier + example: 117703764515 + clientOrderId: + type: string + description: Custom order identifier. Empty string if not specified + example: "" + market: + type: string + description: Market name + example: "BTC_USDT" + side: + type: string + description: Order side + enum: [buy, sell] + example: "buy" + type: + type: string + description: Order type + example: "limit" + timestamp: + type: number + description: Timestamp of order creation + example: 1662478154.941582 + dealMoney: + type: string + description: Executed amount in money + example: "0" + dealStock: + type: string + description: Executed amount in stock + example: "0" + amount: + type: string + description: Order amount + example: "0.635709" + left: + type: string + description: Unexecuted amount in stock + example: "0.635709" + dealFee: + type: string + description: Executed fee by deal + example: "0" + post_only: + type: boolean + description: Post-only flag + example: false + mtime: + type: number + description: Timestamp of order modification + example: 1662478154.941582 + price: + type: string + description: Order price + example: "9928.79" + status: + type: string + description: Order status + example: "CANCELED" + stp: + type: string + description: Self trade prevention mode + example: "no" + example: + id: 117703764513 + stop_loss: + orderId: 117703764514 + clientOrderId: "" + market: "BTC_USDT" + side: "buy" + type: "stop limit" + timestamp: 1594605801.49815 + dealMoney: "0" + dealStock: "0" + amount: "2.241379" + takerFee: "0.001" + makerFee: "0.001" + left: "2.241379" + dealFee: "0" + post_only: false + mtime: 1662478154.941582 + price: "19928.79" + activation_price: "29928.79" + activation_condition: "gte" + activated: 0 + status: "CANCELED" + stp: "no" + take_profit: + orderId: 117703764515 + clientOrderId: "" + market: "BTC_USDT" + side: "buy" + type: "limit" + timestamp: 1662478154.941582 + dealMoney: "0" + dealStock: "0" + amount: "0.635709" + left: "0.635709" + dealFee: "0" + post_only: false + mtime: 1662478154.941582 + price: "9928.79" + status: "CANCELED" + stp: "no" '400': description: Inner validation failed content: @@ -3290,7 +5063,86 @@ paths: type: string responses: '200': - description: Order deals + description: Successful response - returns paginated order deals + content: + application/json: + schema: + type: object + properties: + records: + type: array + description: Array of deal records + items: + type: object + properties: + time: + type: number + description: Timestamp of executed order + example: 1593342324.613711 + fee: + type: string + description: Fee paid + example: "0.00000419198" + price: + type: string + description: Deal price + example: "0.00000701" + amount: + type: string + description: Amount in stock + example: "598" + id: + type: integer + description: Deal identifier + example: 149156519 + dealOrderId: + type: integer + description: Completed order identifier + example: 3134995325 + clientOrderId: + type: string + description: Custom order identifier. Empty string if not specified + example: "customId11" + role: + type: integer + description: Role in the deal (1 - maker, 2 - taker) + enum: [1, 2] + example: 2 + deal: + type: string + description: Amount in money + example: "0.00419198" + feeAsset: + type: string + description: Fee asset + example: "USDT" + rpi: + type: boolean + description: Retail Price Improvement flag + example: true + offset: + type: integer + description: Number of records skipped + example: 0 + limit: + type: integer + description: Number of records per page + example: 100 + example: + records: + - time: 1593342324.613711 + fee: "0.00000419198" + price: "0.00000701" + amount: "598" + id: 149156519 + dealOrderId: 3134995325 + clientOrderId: "customId11" + role: 2 + deal: "0.00419198" + feeAsset: "USDT" + rpi: true + offset: 0 + limit: 100 '400': description: Inner validation failed content: @@ -3340,7 +5192,115 @@ paths: type: string responses: '200': - description: Order history + description: Successful response - returns order history grouped by market. Empty response if order is not yours. + content: + application/json: + schema: + type: object + description: Object with market names as keys, each containing an array of orders + additionalProperties: + type: array + items: + type: object + properties: + amount: + type: string + description: Trade amount + example: "0.0009" + price: + type: string + description: Order price + example: "40000" + type: + type: string + description: Order type + example: "limit" + id: + type: integer + description: Order identifier + example: 4986126152 + clientOrderId: + type: string + description: Custom order identifier. Empty string if not specified + example: "customId11" + side: + type: string + description: Order side + enum: [buy, sell] + example: "sell" + ctime: + type: number + description: Timestamp of order creation + example: 1597486960.311311 + takerFee: + type: string + description: Taker fee ratio. If the number less than 0.0001 - rounded to zero + example: "0.001" + ftime: + type: number + description: Executed order timestamp + example: 1597486960.311332 + makerFee: + type: string + description: Maker fee ratio. If the number less than 0.0001 - rounded to zero + example: "0.001" + dealFee: + type: string + description: Paid fee when order is finished + example: "0.041258268" + dealStock: + type: string + description: Amount in stock currency that finished + example: "0.0009" + dealMoney: + type: string + description: Amount in money currency that finished + example: "41.258268" + postOnly: + type: boolean + description: Post-only flag + example: false + ioc: + type: boolean + description: Immediate or cancel flag + example: false + status: + type: string + description: Order status + example: "CANCELED" + feeAsset: + type: string + description: Fee asset + example: "USDT" + stp: + type: string + description: Self trade prevention mode + example: "no" + rpi: + type: boolean + description: Retail Price Improvement flag + example: false + example: + BTC_USDT: + - amount: "0.0009" + price: "40000" + type: "limit" + id: 4986126152 + clientOrderId: "customId11" + side: "sell" + ctime: 1597486960.311311 + takerFee: "0.001" + ftime: 1597486960.311332 + makerFee: "0.001" + dealFee: "0.041258268" + dealStock: "0.0009" + dealMoney: "41.258268" + postOnly: false + ioc: false + status: "CANCELED" + feeAsset: "USDT" + stp: "no" + rpi: false '400': description: Inner validation failed content: @@ -3560,7 +5520,36 @@ paths: type: string responses: '200': - description: Kill-switch timer synced + description: Successful response - kill-switch timer synced + content: + application/json: + schema: + type: object + properties: + market: + type: string + description: Market name + example: "BTC_USDT" + startTime: + type: integer + description: Timer start timestamp + example: 1662478154 + cancellationTime: + type: integer + description: Order cancellation timestamp (startTime + timeout) + example: 1662478154 + types: + type: array + description: Order types affected by kill-switch + items: + type: string + enum: [spot, margin, futures] + example: ["spot", "margin"] + example: + market: "BTC_USDT" + startTime: 1662478154 + cancellationTime: 1662478154 + types: ["spot", "margin"] '400': description: Inner validation failed content: @@ -3620,7 +5609,39 @@ paths: type: string responses: '200': - description: Kill-switch status + description: Successful response - returns array of kill-switch timer statuses + content: + application/json: + schema: + type: array + description: Array of active kill-switch timers + items: + type: object + properties: + market: + type: string + description: Market name + example: "BTC_USDT" + startTime: + type: integer + description: Timer start timestamp + example: 1686127243 + cancellationTime: + type: integer + description: Order cancellation timestamp (startTime + timeout) + example: 1686127343 + types: + type: array + description: Order types affected by kill-switch + items: + type: string + enum: [spot, margin, futures] + example: ["spot", "margin"] + example: + - market: "BTC_USDT" + startTime: 1686127243 + cancellationTime: 1686127343 + types: ["spot", "margin"] '400': description: Inner validation failed content: @@ -3936,6 +5957,53 @@ components: allOf: - $ref: '#/components/schemas/ErrorResponse' nullable: true + example: + - result: + orderId: 4326248250 + clientOrderId: "" + market: "BTC_USDT" + side: "buy" + type: "limit" + timestamp: 1684916268.825564 + dealMoney: "641.988" + dealStock: "0.02" + amount: "0.02" + left: "0" + dealFee: "1.283976" + ioc: false + postOnly: false + price: "40000" + status: "FILLED" + stp: "no" + positionSide: "BOTH" + rpi: true + error: null + - result: null + error: + code: 32 + message: "Validation failed" + errors: + amount: ["Given amount is less than min amount 0.001."] + - result: + orderId: 4326248250 + clientOrderId: "" + market: "BTC_USDT" + side: "sell" + type: "limit" + timestamp: 1684916268.825564 + dealMoney: "641.988" + dealStock: "0.02" + amount: "0.02" + left: "0" + dealFee: "1.283976" + ioc: false + postOnly: false + price: "41000" + status: "FILLED" + stp: "no" + positionSide: "BOTH" + rpi: true + error: null ErrorResponse: type: object properties: From 34fc46c55d71c60061ffdb1474459277518859ee Mon Sep 17 00:00:00 2001 From: whitebit-robot Date: Fri, 27 Feb 2026 11:36:37 +0100 Subject: [PATCH 42/84] fixed paths in mdx --- api-reference/collateral-trading/open-positions.mdx | 2 +- .../query-unexecuted-conditional-orders.mdx | 2 +- .../collateral-trading/query-unexecuted-oco-orders.mdx | 2 +- docs.json | 1 - openapi/private/http-trade-v1.yaml | 3 +++ openapi/private/http-trade-v4.yaml | 4 +++- 6 files changed, 9 insertions(+), 5 deletions(-) diff --git a/api-reference/collateral-trading/open-positions.mdx b/api-reference/collateral-trading/open-positions.mdx index a67804e..4a00003 100644 --- a/api-reference/collateral-trading/open-positions.mdx +++ b/api-reference/collateral-trading/open-positions.mdx @@ -1,4 +1,4 @@ --- title: "Open Positions" -openapi: "/openapi/private/http-trade-v4.yaml POST /api/v4/collateral-account/positions/open" +openapi: "/openapi/private/http-trade-v4.yaml POST /api/v4/collateral-account/positions" --- diff --git a/api-reference/collateral-trading/query-unexecuted-conditional-orders.mdx b/api-reference/collateral-trading/query-unexecuted-conditional-orders.mdx index cb91cef..b8ab385 100644 --- a/api-reference/collateral-trading/query-unexecuted-conditional-orders.mdx +++ b/api-reference/collateral-trading/query-unexecuted-conditional-orders.mdx @@ -1,4 +1,4 @@ --- title: "Query unexecuted(active) conditional orders" -openapi: "/openapi/private/http-trade-v4.yaml POST /api/v4/conditional-orders" +openapi: "/openapi/private/http-trade-v4.yaml POST /api/v4/orders/conditional" --- diff --git a/api-reference/collateral-trading/query-unexecuted-oco-orders.mdx b/api-reference/collateral-trading/query-unexecuted-oco-orders.mdx index 70d8ef7..e415c76 100644 --- a/api-reference/collateral-trading/query-unexecuted-oco-orders.mdx +++ b/api-reference/collateral-trading/query-unexecuted-oco-orders.mdx @@ -1,4 +1,4 @@ --- title: "Query unexecuted(active) OCO orders" -openapi: "/openapi/private/http-trade-v4.yaml POST /api/v4/oco-orders" +openapi: "/openapi/private/http-trade-v4.yaml POST /api/v4/orders/oco" --- diff --git a/docs.json b/docs.json index 019cc8b..079b165 100644 --- a/docs.json +++ b/docs.json @@ -435,7 +435,6 @@ "chatgpt", "claude", "perplexity", - "grok", "mcp", "cursor", "vscode" diff --git a/openapi/private/http-trade-v1.yaml b/openapi/private/http-trade-v1.yaml index ebf910e..cd71779 100644 --- a/openapi/private/http-trade-v1.yaml +++ b/openapi/private/http-trade-v1.yaml @@ -19,6 +19,9 @@ servers: - url: https://whitebit.eu description: WhiteBIT EU Server +security: + - ApiKeyAuth: [] + paths: /api/v1/account/balance: post: diff --git a/openapi/private/http-trade-v4.yaml b/openapi/private/http-trade-v4.yaml index cfd08f9..5d71879 100644 --- a/openapi/private/http-trade-v4.yaml +++ b/openapi/private/http-trade-v4.yaml @@ -6024,4 +6024,6 @@ tags: - name: Collateral Trading description: Endpoints for collateral/margin trading operations - name: Spot Trading - description: Endpoints for spot trading operations \ No newline at end of file + description: Endpoints for spot trading operations + - name: Market Fee + description: Endpoints for querying trading fees \ No newline at end of file From 3830d5df07b832deff56edf08bb4059c1d6e7bb8 Mon Sep 17 00:00:00 2001 From: whitebit-robot Date: Fri, 27 Feb 2026 12:27:21 +0100 Subject: [PATCH 43/84] fix(api): add missing examples to collateral trading and account endpoints - Fix MDX frontmatter paths for open-positions, conditional orders, and OCO orders (were pointing to non-existent operations) - Add requestBody and 200 response examples to all 15 collateral trading endpoints that had none (sourced from old docs) - Add requestBody and 200 response examples to sub-account, withdraw, transfer, and investment endpoints in main_api_v4.yaml - Correct positionSide enum values from lowercase to LONG/SHORT/BOTH - Add 23 SME questions for unresolvable cases (empty responses, status field semantics, card-token response shape) --- .../collateral-trading/open-positions.mdx | 2 +- .../query-unexecuted-conditional-orders.mdx | 2 +- .../query-unexecuted-oco-orders.mdx | 2 +- openapi/private/http-trade-v4.yaml | 759 +++++++++++++++++- openapi/private/main_api_v4.yaml | 46 ++ 5 files changed, 801 insertions(+), 10 deletions(-) diff --git a/api-reference/collateral-trading/open-positions.mdx b/api-reference/collateral-trading/open-positions.mdx index a67804e..4a00003 100644 --- a/api-reference/collateral-trading/open-positions.mdx +++ b/api-reference/collateral-trading/open-positions.mdx @@ -1,4 +1,4 @@ --- title: "Open Positions" -openapi: "/openapi/private/http-trade-v4.yaml POST /api/v4/collateral-account/positions/open" +openapi: "/openapi/private/http-trade-v4.yaml POST /api/v4/collateral-account/positions" --- diff --git a/api-reference/collateral-trading/query-unexecuted-conditional-orders.mdx b/api-reference/collateral-trading/query-unexecuted-conditional-orders.mdx index cb91cef..b8ab385 100644 --- a/api-reference/collateral-trading/query-unexecuted-conditional-orders.mdx +++ b/api-reference/collateral-trading/query-unexecuted-conditional-orders.mdx @@ -1,4 +1,4 @@ --- title: "Query unexecuted(active) conditional orders" -openapi: "/openapi/private/http-trade-v4.yaml POST /api/v4/conditional-orders" +openapi: "/openapi/private/http-trade-v4.yaml POST /api/v4/orders/conditional" --- diff --git a/api-reference/collateral-trading/query-unexecuted-oco-orders.mdx b/api-reference/collateral-trading/query-unexecuted-oco-orders.mdx index 70d8ef7..e415c76 100644 --- a/api-reference/collateral-trading/query-unexecuted-oco-orders.mdx +++ b/api-reference/collateral-trading/query-unexecuted-oco-orders.mdx @@ -1,4 +1,4 @@ --- title: "Query unexecuted(active) OCO orders" -openapi: "/openapi/private/http-trade-v4.yaml POST /api/v4/oco-orders" +openapi: "/openapi/private/http-trade-v4.yaml POST /api/v4/orders/oco" --- diff --git a/openapi/private/http-trade-v4.yaml b/openapi/private/http-trade-v4.yaml index 484b439..24d2580 100644 --- a/openapi/private/http-trade-v4.yaml +++ b/openapi/private/http-trade-v4.yaml @@ -68,6 +68,10 @@ paths: nonce: type: string description: Unique request identifier + example: + ticker: BTC + request: "{{request}}" + nonce: "{{nonce}}" responses: '200': description: Successful response - returns collateral balances by asset @@ -141,6 +145,10 @@ paths: nonce: type: string description: Unique request identifier + example: + ticker: BTC + request: "{{request}}" + nonce: "{{nonce}}" responses: '200': description: Successful response - returns detailed balance information per asset @@ -279,15 +287,56 @@ paths: example: true positionSide: type: string - enum: [long, short, both] + enum: [LONG, SHORT, BOTH] description: "Defines the position direction when hedge mode is enabled. See [positionSide](/glossary#position-side)" request: type: string nonce: type: string + example: + market: BTC_USDT + side: buy + amount: "0.01" + price: "40000" + postOnly: false + ioc: false + clientOrderId: order1987111 + stopLoss: "50000" + takeProfit: "30000" + positionSide: LONG + rpi: true + request: "{{request}}" + nonce: "{{nonce}}" responses: '200': description: Order created + content: + application/json: + schema: + type: object + example: + orderId: 4180284841 + clientOrderId: order1987111 + market: BTC_USDT + side: buy + type: limit + timestamp: 1595792396.165973 + dealMoney: "0" + dealStock: "0" + amount: "0.01" + left: "0.001" + dealFee: "0" + price: "40000" + postOnly: false + ioc: false + status: FILLED + stp: "no" + oto: + otoId: 29457221 + stopLoss: "30000" + takeProfit: "50000" + positionSide: LONG + rpi: true '422': description: Inner validation failed content: @@ -370,7 +419,7 @@ paths: example: true positionSide: type: string - enum: [long, short, both] + enum: [LONG, SHORT, BOTH] description: "Defines the position direction when hedge mode is enabled. See [positionSide](/glossary#position-side)" stopOnFail: type: boolean @@ -385,9 +434,95 @@ paths: type: string nonce: type: string + example: + orders: + - side: buy + amount: "0.02" + price: "40000" + market: BTC_PERP + postOnly: false + ioc: false + clientOrderId: "" + positionSide: LONG + rpi: true + - side: sell + amount: "0.0001" + price: "41000" + market: BTC_USDT + postOnly: false + ioc: false + clientOrderId: "" + positionSide: LONG + rpi: true + - side: sell + amount: "0.02" + price: "0.030" + market: ETH_BTC + postOnly: false + ioc: false + clientOrderId: "" + positionSide: LONG + rpi: true + stopOnFail: true + request: "{{request}}" + nonce: "{{nonce}}" responses: '200': description: Orders created + content: + application/json: + schema: + type: array + items: + type: object + example: + - result: + orderId: 4326248250 + clientOrderId: "" + market: BTC_USDT + side: buy + type: limit + timestamp: 1684916268.825564 + dealMoney: "641.988" + dealStock: "0.02" + amount: "0.02" + left: "0" + dealFee: "1.283976" + ioc: false + postOnly: false + price: "40000" + status: FILLED + stp: "no" + positionSide: LONG + rpi: true + error: null + - result: null + error: + code: 32 + message: Validation failed + errors: + amount: + - Given amount is less than min amount 0.001. + - result: + orderId: 4326248251 + clientOrderId: "" + market: ETH_BTC + side: sell + type: limit + timestamp: 1684916268.825564 + dealMoney: "641.988" + dealStock: "0.02" + amount: "0.02" + left: "0" + dealFee: "1.283976" + ioc: false + postOnly: false + price: "0.030" + status: FILLED + stp: "no" + positionSide: LONG + rpi: true + error: null '400': description: Inner validation failed content: @@ -444,14 +579,44 @@ paths: type: string positionSide: type: string - enum: [long, short] + enum: [LONG, SHORT, BOTH] request: type: string nonce: type: string + example: + market: BTC_USDT + side: buy + amount: "0.01" + clientOrderId: order1987111 + request: "{{request}}" + nonce: "{{nonce}}" responses: '200': description: Order created + content: + application/json: + schema: + type: object + example: + orderId: 4180284841 + clientOrderId: order1987111 + market: BTC_USDT + side: sell + type: market + timestamp: 1595792396.165973 + dealMoney: "0" + dealStock: "0" + amount: "0.001" + left: "0.001" + dealFee: "0" + status: FILLED + stp: "no" + oto: + otoId: 29457221 + stopLoss: "50000" + takeProfit: "40000" + positionSide: LONG '422': description: Internal validation failed content: @@ -508,14 +673,51 @@ paths: type: string positionSide: type: string - enum: [long, short] + enum: [LONG, SHORT, BOTH] request: type: string nonce: type: string + example: + market: BTC_USDT + side: buy + amount: "0.001" + price: "40000" + activation_price: "40000" + stopLoss: "30000" + takeProfit: "50000" + clientOrderId: order1987111 + positionSide: LONG + request: "{{request}}" + nonce: "{{nonce}}" responses: '200': description: Order created + content: + application/json: + schema: + type: object + example: + orderId: 4180284841 + clientOrderId: order1987111 + market: BTC_USDT + side: buy + type: stop limit + timestamp: 1595792396.165973 + dealMoney: "0" + dealStock: "0" + amount: "0.001" + left: "0.001" + dealFee: "0" + price: "40000" + activation_price: "40000" + status: FILLED + stp: "no" + oto: + otoId: 29457221 + stopLoss: "30000" + takeProfit: "50000" + positionSide: LONG '400': description: Inner validation failed content: @@ -575,14 +777,46 @@ paths: type: string positionSide: type: string - enum: [long, short] + enum: [LONG, SHORT, BOTH] request: type: string nonce: type: string + example: + market: BTC_USDT + side: buy + amount: "0.01" + activation_price: "40000" + clientOrderId: order1987111 + request: "{{request}}" + nonce: "{{nonce}}" responses: '200': description: Order created + content: + application/json: + schema: + type: object + example: + orderId: 4180284841 + clientOrderId: order1987111 + market: BTC_USDT + side: sell + type: stop market + timestamp: 1595792396.165973 + dealMoney: "0" + dealStock: "0" + amount: "0.001" + left: "0.001" + dealFee: "0" + activation_price: "40000" + status: FILLED + stp: "no" + oto: + otoId: 29457221 + stopLoss: "50000" + takeProfit: "30000" + positionSide: LONG '422': description: Inner validation failed content: @@ -616,9 +850,27 @@ paths: type: string nonce: type: string + example: + request: "{{request}}" + nonce: "{{nonce}}" responses: '200': description: Account summary + content: + application/json: + schema: + type: object + example: + equity: "9817.676478608323" + margin: "3880.64387" + freeMargin: "10739.489348608323" + unrealizedFunding: "0" + pnl: "4802.45674" + leverage: 100 + marginFraction: "0.0497228995828862" + maintenanceMarginFraction: "0.0065990118926067" + futuresEquity: "9817.676478608323" + futuresFreeMargin: "10739.489348608323" '503': description: Service temporarily unavailable @@ -648,9 +900,62 @@ paths: type: string nonce: type: string + example: + market: BTC_USDT responses: '200': description: Open positions + content: + application/json: + schema: + type: array + items: + type: object + properties: + positionId: { type: integer } + market: { type: string } + openDate: { type: number } + modifyDate: { type: number } + amount: { type: string } + basePrice: { type: string } + liquidationPrice: { type: string, nullable: true } + liquidationState: { type: string, nullable: true } + pnl: { type: string } + pnlPercent: { type: string } + margin: { type: string } + freeMargin: { type: string } + funding: { type: string } + unrealizedFunding: { type: string } + tpsl: + type: object + nullable: true + properties: + takeProfitId: { type: integer } + takeProfit: { type: string } + stopLossId: { type: integer } + stopLoss: { type: string } + positionSide: { type: string } + example: + - positionId: 527 + market: BTC_USDT + openDate: 1651568067.789679 + modifyDate: 1651568067.789679 + amount: "0.1" + basePrice: "45658.349" + liquidationPrice: null + liquidationState: null + pnl: "-168.42" + pnlPercent: "-0.43" + margin: "8316.74" + freeMargin: "619385.67" + funding: "0" + unrealizedFunding: "0.0019142920201966" + tpsl: + takeProfitId: 123 + takeProfit: "50000" + stopLossId: 124 + stopLoss: "35000" + positionSide: LONG '422': description: Inner validation failed content: @@ -689,16 +994,29 @@ paths: type: integer positionSide: type: string - enum: [long, short] + enum: [LONG, SHORT, BOTH] market: type: string request: type: string nonce: type: string + example: + positionId: 123 + positionSide: LONG + market: BTC_USDT + request: "{{request}}" + nonce: "{{nonce}}" responses: '200': description: Position closed + content: + application/json: + schema: + type: array + items: {} + description: Empty array indicates success + example: [] '400': description: Inner validation failed content: @@ -744,9 +1062,38 @@ paths: type: string nonce: type: string + example: + market: BTC_USDT + positionId: 1 + request: "{{request}}" + nonce: "{{nonce}}" responses: '200': description: Positions history + content: + application/json: + schema: + type: array + items: + type: object + example: + - positionId: 111 + market: BTC_USDT + openDate: 1650400589.882613 + modifyDate: 1650400589.882613 + amount: "0.1" + basePrice: "45658.349" + realizedFunding: "0" + liquidationPrice: null + liquidationState: null + orderDetail: + id: 97067934 + tradeAmount: "0.1" + price: "41507.59" + tradeFee: "415.07" + fundingFee: null + realizedPnl: null + positionSide: LONG '400': description: Inner validation failed content: @@ -790,9 +1137,35 @@ paths: type: string nonce: type: string + example: + market: BTC_PERP + request: "{{request}}" + nonce: "{{nonce}}" responses: '200': description: Funding history + content: + application/json: + schema: + type: object + example: + records: + - market: BTC_PERP + fundingTime: "1734451200" + fundingRate: "0.00017674" + fundingAmount: "-0.171053531892" + positionAmount: "0.019" + settlementPrice: "50938.2" + rateCalculatedTime: "1734364800" + - market: BTC_PERP + fundingTime: "1734451200" + fundingRate: "-0.000177877800093587" + fundingAmount: "-0.0054997859133136" + positionAmount: "-0.001" + settlementPrice: "30918.9" + rateCalculatedTime: "1734364800" + limit: 100 + offset: 0 '422': description: Inner validation failed content: @@ -834,9 +1207,19 @@ paths: type: string nonce: type: string + example: + leverage: 5 + request: "{{request}}" + nonce: "{{nonce}}" responses: '200': description: Leverage changed + content: + application/json: + schema: + type: object + example: + leverage: 5 '422': description: Inner validation failed content: @@ -870,9 +1253,18 @@ paths: type: string nonce: type: string + example: + request: "{{request}}" + nonce: "{{nonce}}" responses: '200': description: Hedge mode status + content: + application/json: + schema: + type: object + example: + hedgeMode: true '500': description: Internal error '503': @@ -908,6 +1300,10 @@ paths: type: string nonce: type: string + example: + hedgeMode: true + request: "{{request}}" + nonce: "{{nonce}}" responses: '200': description: Hedge mode updated @@ -954,9 +1350,97 @@ paths: type: string nonce: type: string + example: + market: BTC_USDT + offset: 0 + limit: 100 responses: '200': description: Active conditional orders + content: + application/json: + schema: + type: object + properties: + limit: { type: integer } + offset: { type: integer } + total: { type: integer } + records: + type: array + items: + type: object + example: + limit: 100 + offset: 0 + total: 2 + records: + - id: 117703764513 + type: oco + stop_loss: + orderId: 117703764514 + clientOrderId: "" + market: BTC_USDT + side: buy + type: stop limit + timestamp: 1594605801.49815 + dealMoney: "0" + dealStock: "0" + amount: "2.241379" + takerFee: "0.001" + makerFee: "0.001" + left: "2.241379" + dealFee: "0" + post_only: false + mtime: 1662478154.941582 + price: "19928.79" + activation_price: "29928.79" + activation_condition: gte + activated: 0 + status: FILLED + stp: "no" + positionSide: LONG + take_profit: + orderId: 117703764515 + clientOrderId: "" + market: BTC_USDT + side: buy + type: limit + timestamp: 1662478154.941582 + dealMoney: "0" + dealStock: "0" + amount: "0.635709" + takerFee: "0.001" + makerFee: "0.001" + left: "0.635709" + dealFee: "0" + post_only: false + mtime: 1662478154.941582 + price: "9928.79" + status: FILLED + stp: "no" + positionSide: LONG + - id: 29457221 + type: oto + stopLossPrice: "30000" + takeProfitPrice: "50000" + conditionalOrder: + orderId: 3686033640 + clientOrderId: "customId11" + market: BTC_USDT + side: buy + type: limit + timestamp: 1594605801.49815 + dealMoney: "0" + dealStock: "0" + amount: "2.241379" + takerFee: "0.001" + makerFee: "0.001" + left: "2.241379" + dealFee: "0" + price: "40000" + status: FILLED + stp: "no" + positionSide: LONG '400': description: Inner validation failed content: @@ -1004,9 +1488,66 @@ paths: type: string nonce: type: string + example: + market: BTC_USDT + offset: 0 + limit: 100 responses: '200': description: Active OCO orders + content: + application/json: + schema: + type: array + items: + type: object + properties: + id: { type: integer } + stop_loss: { type: object } + take_profit: { type: object } + example: + - id: 117703764513 + stop_loss: + orderId: 117703764514 + clientOrderId: "" + market: BTC_USDT + side: buy + type: stop limit + timestamp: 1594605801.49815 + dealMoney: "0" + dealStock: "0" + amount: "2.241379" + takerFee: "0.001" + makerFee: "0.001" + left: "2.241379" + dealFee: "0" + post_only: false + mtime: 1662478154.941582 + price: "19928.79" + activation_price: "29928.79" + activation_condition: gte + activated: 0 + status: FILLED + stp: "no" + take_profit: + orderId: 117703764515 + clientOrderId: "" + market: BTC_USDT + side: buy + type: limit + timestamp: 1662478154.941582 + dealMoney: "0" + dealStock: "0" + amount: "0.635709" + takerFee: "0.001" + makerFee: "0.001" + left: "0.635709" + dealFee: "0" + post_only: false + mtime: 1662478154.941582 + price: "9928.79" + status: FILLED + stp: "no" '400': description: Inner validation failed content: @@ -1070,9 +1611,68 @@ paths: type: string nonce: type: string + example: + market: BTC_USDT + side: buy + amount: "0.001" + price: "40000" + activation_price: "41000" + stop_limit_price: "42000" + clientOrderId: order1987111 + request: "{{request}}" + nonce: "{{nonce}}" responses: '200': description: OCO order created + content: + application/json: + schema: + type: object + example: + id: 117703764513 + stop_loss: + orderId: 117703764514 + clientOrderId: "" + market: BTC_USDT + side: buy + type: stop limit + timestamp: 1594605801.49815 + dealMoney: "0" + dealStock: "0" + amount: "2.241379" + takerFee: "0.001" + makerFee: "0.001" + left: "2.241379" + dealFee: "0" + post_only: false + mtime: 1662478154.941582 + price: "19928.79" + activation_price: "29928.79" + activation_condition: gte + activated: 0 + status: FILLED + stp: "no" + positionSide: LONG + take_profit: + orderId: 117703764515 + clientOrderId: "" + market: BTC_USDT + side: buy + type: limit + timestamp: 1662478154.941582 + dealMoney: "0" + dealStock: "0" + amount: "0.635709" + takerFee: "0.001" + makerFee: "0.001" + left: "0.635709" + dealFee: "0" + post_only: false + mtime: 1662478154.941582 + price: "9928.79" + status: FILLED + stp: "no" + positionSide: LONG '400': description: Inner validation failed content: @@ -1121,9 +1721,21 @@ paths: type: string nonce: type: string + example: + market: BTC_USDT + id: 117703764514 + request: "{{request}}" + nonce: "{{nonce}}" responses: '200': description: Order cancelled + content: + application/json: + schema: + type: array + items: {} + description: Empty array indicates success + example: [] '400': description: Inner validation failed content: @@ -1172,9 +1784,59 @@ paths: type: string nonce: type: string + example: + market: BTC_USDT + orderId: 117703764514 + request: "{{request}}" + nonce: "{{nonce}}" responses: '200': description: OCO order cancelled + content: + application/json: + schema: + type: object + example: + id: 117703764513 + stop_loss: + orderId: 117703764514 + clientOrderId: "" + market: BTC_USDT + side: buy + type: stop limit + timestamp: 1594605801.49815 + dealMoney: "0" + dealStock: "0" + amount: "2.241379" + takerFee: "0.001" + makerFee: "0.001" + left: "2.241379" + dealFee: "0" + post_only: false + mtime: 1662478154.941582 + price: "19928.79" + activation_price: "29928.79" + activation_condition: gte + activated: 0 + status: CANCELED + stp: "no" + take_profit: + orderId: 117703764515 + clientOrderId: "" + market: BTC_USDT + side: buy + type: limit + timestamp: 1662478154.941582 + dealMoney: "0" + dealStock: "0" + amount: "0.635709" + left: "0.635709" + dealFee: "0" + post_only: false + mtime: 1662478154.941582 + price: "9928.79" + status: CANCELED + stp: "no" '400': description: Inner validation failed content: @@ -1223,9 +1885,21 @@ paths: type: string nonce: type: string + example: + market: BTC_USDT + otoId: 117703764514 + request: "{{request}}" + nonce: "{{nonce}}" responses: '200': description: OTO order cancelled + content: + application/json: + schema: + type: array + items: {} + description: Empty array indicates success + example: [] '400': description: Inner validation failed content: @@ -2153,6 +2827,32 @@ paths: type: string nonce: type: string + example: + orders: + - side: buy + amount: "0.02" + price: "40000" + market: BTC_USDT + postOnly: false + ioc: false + clientOrderId: "" + rpi: true + - side: sell + amount: "0.0001" + price: "41000" + market: BTC_USDT + postOnly: false + ioc: false + clientOrderId: "" + rpi: true + - side: sell + amount: "0.02" + price: "41000" + market: BTC_USDT + postOnly: false + ioc: false + clientOrderId: "" + rpi: true responses: '200': $ref: '#/components/responses/BulkLimitOrderResponse' @@ -2999,9 +3699,22 @@ paths: type: string nonce: type: string + example: + market: BTC_USDT + type: + - spot + - margin + - futures responses: '200': description: Orders cancelled successfully + content: + application/json: + schema: + type: array + items: {} + description: Empty array indicates success + example: [] '400': description: Inner validation failed content: @@ -3649,7 +4362,39 @@ components: - X-TXC-SIGNATURE: HMAC SHA512 signature responses: BulkLimitOrderResponse: - $ref: '#/components/schemas/BulkLimitOrderResponse' + description: Orders created + content: + application/json: + schema: + $ref: '#/components/schemas/BulkLimitOrderResponse' + example: + - result: + orderId: 4326248250 + clientOrderId: "" + market: BTC_USDT + side: buy + type: limit + timestamp: 1684916268.825564 + dealMoney: "641.988" + dealStock: "0.02" + amount: "0.02" + left: "0" + dealFee: "1.283976" + ioc: false + postOnly: false + price: "40000" + status: FILLED + stp: "no" + positionSide: BOTH + rpi: true + error: null + - result: null + error: + code: 32 + message: Validation failed + errors: + amount: + - Given amount is less than min amount 0.001. schemas: LimitOrderRequest: type: object diff --git a/openapi/private/main_api_v4.yaml b/openapi/private/main_api_v4.yaml index 480e430..621d3da 100644 --- a/openapi/private/main_api_v4.yaml +++ b/openapi/private/main_api_v4.yaml @@ -1269,6 +1269,13 @@ paths: application/json: schema: $ref: "#/components/schemas/WithdrawRequest" + example: + ticker: ETH + amount: "0.9" + address: "0x0964A6B8F794A4B8d61b62652dB27ddC9844FB4c" + uniqueId: "24529041" + request: "{{request}}" + nonce: "{{nonce}}" responses: "201": description: Validation succeeded and withdraw creation process is started. Check the request status by uniqueId in deposit/withdraw history. @@ -3903,6 +3910,8 @@ paths: id: type: string description: Sub-account id + example: + id: "8e667b4a-0b71-4988-8af5-9474dbfaeb51" responses: "200": description: Sub-account deleted successfully @@ -3910,6 +3919,7 @@ paths: application/json: schema: type: object + example: {} "400": description: Request validation failed content: @@ -3962,6 +3972,12 @@ paths: collateralEnabled: type: boolean description: Enable transfers to collateral balance + example: + id: "8e667b4a-0b71-4988-8af5-9474dbfaeb51" + alias: training + permissions: + spotEnabled: true + collateralEnabled: false responses: "200": description: Sub-account edited successfully @@ -3969,6 +3985,7 @@ paths: application/json: schema: type: object + example: {} "400": description: Request validation failed content: @@ -4122,6 +4139,8 @@ paths: id: type: string description: Sub-account id + example: + id: "8e667b4a-0b71-4988-8af5-9474dbfaeb51" responses: "200": description: Sub-account blocked successfully @@ -4129,6 +4148,7 @@ paths: application/json: schema: type: object + example: {} "400": description: Request validation failed content: @@ -4164,6 +4184,8 @@ paths: id: type: string description: Sub-account id + example: + id: "8e667b4a-0b71-4988-8af5-9474dbfaeb51" responses: "200": description: Sub-account unblocked successfully @@ -4171,6 +4193,7 @@ paths: application/json: schema: type: object + example: {} "400": description: Request validation failed content: @@ -4209,6 +4232,9 @@ paths: ticker: type: string description: Currency's ticker (if not provided, returns data by all currencies) + example: + id: "8e667b4a-0b71-4988-8af5-9474dbfaeb51" + ticker: USDC responses: "200": description: Successful response @@ -4227,6 +4253,11 @@ paths: type: string collateral: type: string + example: + USDC: + - main: "42" + spot: "10" + collateral: "14" "422": description: Account is not confirmed content: @@ -4393,6 +4424,14 @@ paths: type: string enable: type: boolean + example: + apiKeyId: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" + title: Trading Bot Key + urls: + - url: /api/v4/main-account/withdraw + enable: false + - url: /api/v4/main-account/balance + enable: true responses: "200": description: API key updated successfully @@ -4400,6 +4439,7 @@ paths: application/json: schema: type: object + example: {} "400": description: Request validation failed content: @@ -4435,6 +4475,8 @@ paths: apiKeyId: type: string description: ID of the API key to delete + example: + apiKeyId: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" responses: "200": description: API key deleted successfully @@ -4442,6 +4484,7 @@ paths: application/json: schema: type: object + example: {} "400": description: Request validation failed content: @@ -4537,6 +4580,8 @@ paths: apiKeyId: type: string description: ID of the API key to reset + example: + apiKeyId: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" responses: "200": description: API key reset successfully @@ -4544,6 +4589,7 @@ paths: application/json: schema: type: object + example: {} "400": description: Request validation failed content: From d146d88fb23071816ccc6a5888e4b36a7980d0d4 Mon Sep 17 00:00:00 2001 From: whitebit-robot Date: Fri, 27 Feb 2026 15:54:47 +0100 Subject: [PATCH 44/84] fix(api): resolve all Redocly lint errors in http-trade-v4 --- .dockerignore | 7 + .mintignore | 9 +- Dockerfile | 5 + README.md | 22 ++ docker-compose.yml | 9 + docs.json | 8 +- openapi/private/http-trade-v4.yaml | 309 +++++++++++++++++++++++------ style.css | 13 ++ 8 files changed, 321 insertions(+), 61 deletions(-) create mode 100644 .dockerignore create mode 100644 Dockerfile create mode 100644 docker-compose.yml create mode 100644 style.css diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..4557a30 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,7 @@ +node_modules +.git +.gitignore +ai/ +.kiro +.DS_Store +!README.md diff --git a/.mintignore b/.mintignore index 158a1ab..6cc8e7c 100644 --- a/.mintignore +++ b/.mintignore @@ -1 +1,8 @@ -ai/ \ No newline at end of file +ai/ +Dockerfile +docker-compose.yml +.dockerignore +.gitignore +.mintignore +README.md +CONTRIBUTING.md \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..1fe903b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM node:20-alpine +WORKDIR /app +COPY . . +EXPOSE 3000 +CMD ["npx", "mint", "dev", "--host", "0.0.0.0"] diff --git a/README.md b/README.md index a915ad5..6ff3714 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,28 @@ mint dev # Open http://localhost:3000 ``` +## Running with Docker + +Run the docs portal in a container without installing any tools locally (requires [Docker](https://docs.docker.com/get-docker/)): + +```bash +# Build and start +docker compose up --build + +# Open http://localhost:3000 +``` + +The volume mount in `docker-compose.yml` syncs local file changes into the container in real time, so edits are reflected without restarting. + +To run without live editing (static copy baked into the image): + +```bash +docker build -t whitebit-docs . +docker run -p 3000:3000 whitebit-docs +``` + +> **Note:** On first start, `npx mint dev` downloads the Mintlify client from `releases.mintlify.com`. Network access is required. + ## Contributing See **[CONTRIBUTING.md](CONTRIBUTING.md)** for: diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..906f04c --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,9 @@ +services: + docs: + build: . + ports: + - "3000:3000" + volumes: + - .:/app + environment: + - NODE_ENV=development diff --git a/docs.json b/docs.json index 079b165..9e7d119 100644 --- a/docs.json +++ b/docs.json @@ -20,7 +20,13 @@ }, "favicon": "/favicon.ico", "styling": { - "eyebrows": "breadcrumbs" + "eyebrows": "breadcrumbs", + "codeblocks": { + "theme": { + "light": "github-light", + "dark": "github-dark" + } + } }, "navigation": { "tabs": [ diff --git a/openapi/private/http-trade-v4.yaml b/openapi/private/http-trade-v4.yaml index 5d71879..ac2d667 100644 --- a/openapi/private/http-trade-v4.yaml +++ b/openapi/private/http-trade-v4.yaml @@ -12,6 +12,9 @@ info: Authentication required for all endpoints. version: 4.0.0 + license: + name: WhiteBIT Terms of Service + url: https://whitebit.com/terms servers: - url: https://whitebit.com description: WhiteBIT Global Server @@ -22,6 +25,7 @@ paths: /api/v4/collateral-account/balance: post: summary: Collateral Account Balance + operationId: collateralAccountBalance description: | The endpoint returns a current [collateral balance](/glossary#balance-collateral). @@ -68,6 +72,10 @@ paths: nonce: type: string description: Unique request identifier + example: + ticker: BTC + request: "{{request}}" + nonce: "{{nonce}}" responses: '200': description: Successful response - returns collateral balances by asset @@ -95,6 +103,7 @@ paths: /api/v4/collateral-account/balance-summary: post: summary: Collateral Account Balance Summary + operationId: collateralAccountBalanceSummary description: | The endpoint retrieves collateral account balance summary with detailed breakdown per asset. @@ -141,6 +150,10 @@ paths: nonce: type: string description: Unique request identifier + example: + ticker: BTC + request: "{{request}}" + nonce: "{{nonce}}" responses: '200': description: Successful response - returns detailed balance information per asset @@ -194,6 +207,7 @@ paths: /api/v4/order/collateral/limit: post: summary: Collateral Limit Order + operationId: createCollateralLimitOrder description: | The endpoint creates [limit order](/glossary#limit-order) using [collateral balance](/glossary#balance-collateral). @@ -279,12 +293,26 @@ paths: example: true positionSide: type: string - enum: [long, short, both] + enum: [LONG, SHORT, BOTH] description: "Defines the position direction when hedge mode is enabled. See [positionSide](/glossary#position-side)" request: type: string nonce: type: string + example: + market: BTC_USDT + side: buy + amount: "0.01" + price: "40000" + postOnly: false + ioc: false + clientOrderId: order1987111 + stopLoss: "50000" + takeProfit: "30000" + positionSide: LONG + rpi: true + request: "{{request}}" + nonce: "{{nonce}}" responses: '200': description: Successful response - order created @@ -420,6 +448,7 @@ paths: /api/v4/order/collateral/bulk: post: summary: Collateral bulk limit order + operationId: createCollateralBulkOrder description: | The endpoint creates multiple collateral limit orders. @@ -490,7 +519,7 @@ paths: example: true positionSide: type: string - enum: [long, short, both] + enum: [LONG, SHORT, BOTH] description: "Defines the position direction when hedge mode is enabled. See [positionSide](/glossary#position-side)" stopOnFail: type: boolean @@ -505,6 +534,38 @@ paths: type: string nonce: type: string + example: + orders: + - side: buy + amount: "0.02" + price: "40000" + market: BTC_PERP + postOnly: false + ioc: false + clientOrderId: "" + positionSide: LONG + rpi: true + - side: sell + amount: "0.0001" + price: "41000" + market: BTC_USDT + postOnly: false + ioc: false + clientOrderId: "" + positionSide: LONG + rpi: true + - side: sell + amount: "0.02" + price: "0.030" + market: ETH_BTC + postOnly: false + ioc: false + clientOrderId: "" + positionSide: LONG + rpi: true + stopOnFail: true + request: "{{request}}" + nonce: "{{nonce}}" responses: '200': description: Successful response - returns array of order results @@ -683,6 +744,7 @@ paths: /api/v4/order/collateral/market: post: summary: Collateral Market Order + operationId: createCollateralMarketOrder description: | The endpoint creates a collateral market order. @@ -721,11 +783,18 @@ paths: type: string positionSide: type: string - enum: [long, short] + enum: [LONG, SHORT, BOTH] request: type: string nonce: type: string + example: + market: BTC_USDT + side: buy + amount: "0.01" + clientOrderId: order1987111 + request: "{{request}}" + nonce: "{{nonce}}" responses: '200': description: Successful response - market order created @@ -841,6 +910,7 @@ paths: /api/v4/order/collateral/stop-limit: post: summary: Collateral Stop-Limit Order + operationId: createCollateralStopLimitOrder description: | The endpoint creates a collateral stop-limit order. @@ -885,11 +955,23 @@ paths: type: string positionSide: type: string - enum: [long, short] + enum: [LONG, SHORT, BOTH] request: type: string nonce: type: string + example: + market: BTC_USDT + side: buy + amount: "0.001" + price: "40000" + activation_price: "40000" + stopLoss: "30000" + takeProfit: "50000" + clientOrderId: order1987111 + positionSide: LONG + request: "{{request}}" + nonce: "{{nonce}}" responses: '200': description: Successful response - stop-limit order created @@ -1021,6 +1103,7 @@ paths: /api/v4/order/collateral/trigger-market: post: summary: Collateral Trigger Market Order + operationId: createCollateralTriggerMarketOrder description: | The endpoint creates a collateral trigger market order. @@ -1062,11 +1145,19 @@ paths: type: string positionSide: type: string - enum: [long, short] + enum: [LONG, SHORT, BOTH] request: type: string nonce: type: string + example: + market: BTC_USDT + side: buy + amount: "0.01" + activation_price: "40000" + clientOrderId: order1987111 + request: "{{request}}" + nonce: "{{nonce}}" responses: '200': description: Successful response - trigger market order created @@ -1187,6 +1278,7 @@ paths: /api/v4/collateral-account/summary: post: summary: Collateral Account Summary + operationId: collateralAccountSummary description: | The endpoint retrieves collateral account summary. @@ -1208,6 +1300,9 @@ paths: type: string nonce: type: string + example: + request: "{{request}}" + nonce: "{{nonce}}" responses: '200': description: Successful response - returns collateral account summary @@ -1252,12 +1347,19 @@ paths: pnl: "150.25" leverage: 3 marginFraction: "0.3333" + '422': + description: Request validation failed + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' '503': description: Service temporarily unavailable /api/v4/collateral-account/positions: post: summary: Open Positions + operationId: getOpenPositions description: | The endpoint retrieves open positions. @@ -1404,7 +1506,7 @@ paths: amount: "0.1" basePrice: "45658.349" liquidationPrice: null - liquidationState: null + liquidationState: margin_call pnl: "-168.42" pnlPercent: "-0.43" margin: "8316.74" @@ -1424,7 +1526,7 @@ paths: amount: "0.1" basePrice: "5658.349" liquidationPrice: null - liquidationState: null + liquidationState: margin_call pnl: "-168.42" pnlPercent: "-0.43" margin: "8316.74" @@ -1445,6 +1547,7 @@ paths: /api/v4/collateral-account/position/close: post: summary: Close Position + operationId: closePosition description: | The endpoint closes a position. @@ -1471,13 +1574,19 @@ paths: type: integer positionSide: type: string - enum: [long, short] + enum: [LONG, SHORT, BOTH] market: type: string request: type: string nonce: type: string + example: + positionId: 123 + positionSide: LONG + market: BTC_USDT + request: "{{request}}" + nonce: "{{nonce}}" responses: '200': description: Position closed @@ -1501,6 +1610,7 @@ paths: /api/v4/collateral-account/positions/history: post: summary: Positions History + operationId: getPositionsHistory description: | The endpoint retrieves positions history. @@ -1526,6 +1636,11 @@ paths: type: string nonce: type: string + example: + market: BTC_USDT + positionId: 1 + request: "{{request}}" + nonce: "{{nonce}}" responses: '200': description: Successful response - returns array of position history @@ -1620,7 +1735,7 @@ paths: basePrice: "45658.349" realizedFunding: "0" liquidationPrice: null - liquidationState: null + liquidationState: margin_call orderDetail: id: 97067934 tradeAmount: "0.1" @@ -1649,6 +1764,7 @@ paths: /api/v4/collateral-account/funding-history: post: summary: Funding History + operationId: getFundingHistory description: | The endpoint retrieves funding history. @@ -1775,6 +1891,7 @@ paths: /api/v4/collateral-account/leverage: post: summary: Change Collateral Account Leverage + operationId: changeCollateralAccountLeverage description: | The endpoint changes account leverage. @@ -1804,6 +1921,10 @@ paths: type: string nonce: type: string + example: + leverage: 5 + request: "{{request}}" + nonce: "{{nonce}}" responses: '200': description: Successful response - leverage changed @@ -1830,6 +1951,7 @@ paths: /api/v4/collateral-account/hedge-mode: post: summary: Collateral Account Hedge Mode + operationId: getCollateralHedgeMode description: | The endpoint retrieves hedge mode status. @@ -1851,6 +1973,9 @@ paths: type: string nonce: type: string + example: + request: "{{request}}" + nonce: "{{nonce}}" responses: '200': description: Successful response - returns hedge mode status @@ -1865,6 +1990,12 @@ paths: example: true example: hedgeMode: true + '422': + description: Request validation failed + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' '500': description: Internal error '503': @@ -1873,6 +2004,7 @@ paths: /api/v4/collateral-account/hedge-mode/update: post: summary: Update Collateral Account Hedge Mode + operationId: updateHedgeMode description: | The endpoint updates hedge mode. @@ -1900,6 +2032,10 @@ paths: type: string nonce: type: string + example: + hedgeMode: true + request: "{{request}}" + nonce: "{{nonce}}" responses: '200': description: Successful response - hedge mode updated @@ -1917,6 +2053,7 @@ paths: /api/v4/orders/conditional: post: summary: Query unexecuted(active) conditional orders + operationId: getConditionalOrders description: | The endpoint retrieves active conditional orders. @@ -1946,6 +2083,10 @@ paths: type: string nonce: type: string + example: + market: BTC_USDT + offset: 0 + limit: 100 responses: '200': description: Successful response - returns paginated conditional orders (OCO and OTO types) @@ -2123,6 +2264,7 @@ paths: /api/v4/orders/oco: post: summary: Query unexecuted(active) OCO orders + operationId: getOcoOrders description: | The endpoint retrieves active OCO orders. @@ -2152,6 +2294,10 @@ paths: type: string nonce: type: string + example: + market: BTC_USDT + offset: 0 + limit: 100 responses: '200': description: Successful response - returns array of active OCO orders @@ -2356,6 +2502,7 @@ paths: /api/v4/order/collateral/oco: post: summary: Create collateral OCO order + operationId: createCollateralOcoOrder description: | The endpoint creates a collateral OCO order. @@ -2401,6 +2548,16 @@ paths: type: string nonce: type: string + example: + market: BTC_USDT + side: buy + amount: "0.001" + price: "40000" + activation_price: "41000" + stop_limit_price: "42000" + clientOrderId: order1987111 + request: "{{request}}" + nonce: "{{nonce}}" responses: '200': description: Successful response - OCO order created @@ -2655,6 +2812,7 @@ paths: /api/v4/order/conditional-cancel: post: summary: Cancel conditional order + operationId: cancelConditionalOrder description: | The endpoint cancels a conditional order. @@ -2685,6 +2843,11 @@ paths: type: string nonce: type: string + example: + market: BTC_USDT + id: 117703764514 + request: "{{request}}" + nonce: "{{nonce}}" responses: '200': description: Order cancelled @@ -2706,6 +2869,7 @@ paths: /api/v4/order/oco-cancel: post: summary: Cancel OCO order + operationId: cancelOcoOrder description: | The endpoint cancels an OCO order. @@ -2736,6 +2900,11 @@ paths: type: string nonce: type: string + example: + market: BTC_USDT + orderId: 117703764514 + request: "{{request}}" + nonce: "{{nonce}}" responses: '200': description: Successful response - OCO order cancelled @@ -2966,6 +3135,7 @@ paths: /api/v4/order/oto-cancel: post: summary: Cancel OTO order + operationId: cancelOtoOrder description: | The endpoint cancels an OTO order. @@ -2996,6 +3166,11 @@ paths: type: string nonce: type: string + example: + market: BTC_USDT + otoId: 117703764514 + request: "{{request}}" + nonce: "{{nonce}}" responses: '200': description: OTO order cancelled @@ -3024,6 +3199,8 @@ paths: Rate limit: 10000 requests/10 sec. operationId: convertEstimate + security: + - ApiKeyAuth: [] requestBody: required: true content: @@ -3155,6 +3332,8 @@ paths: Rate limit: 10000 requests/10 sec. operationId: convertConfirm + security: + - ApiKeyAuth: [] requestBody: required: true content: @@ -3224,6 +3403,8 @@ paths: **Note:** The endpoint can retrieve data not older than 6 months from current month. For older data, use the Report on the History page. operationId: convertHistory + security: + - ApiKeyAuth: [] requestBody: required: true content: @@ -3357,6 +3538,7 @@ paths: /api/v4/market/fee: post: summary: Query Market Fee + operationId: getMarketFee description: | Returns maker and taker fees for a specific market. @@ -3425,6 +3607,7 @@ paths: get: summary: Query All Market Fees + operationId: getAllMarketFees description: | Returns maker and taker fees for all markets, including assigned custom fees. @@ -3489,6 +3672,7 @@ paths: /api/v4/trade-account/balance: post: summary: Trading Balance + operationId: tradeAccountBalance description: | The endpoint retrieves the [trade balance](/glossary#balance-spotbalance-trade) by currency [ticker](/glossary#ticker) or all balances. @@ -3589,6 +3773,7 @@ paths: /api/v4/order/new: post: summary: Create Limit Order + operationId: createLimitOrder description: | The endpoint creates [limit trading order](/glossary#limit-order). @@ -3818,6 +4003,7 @@ paths: /api/v4/order/bulk: post: summary: Bulk limit order + operationId: createBulkLimitOrder description: | The endpoint creates bulk [limit trading orders](/glossary#limit-order). @@ -3926,6 +4112,32 @@ paths: type: string nonce: type: string + example: + orders: + - side: buy + amount: "0.02" + price: "40000" + market: BTC_USDT + postOnly: false + ioc: false + clientOrderId: "" + rpi: true + - side: sell + amount: "0.0001" + price: "41000" + market: BTC_USDT + postOnly: false + ioc: false + clientOrderId: "" + rpi: true + - side: sell + amount: "0.02" + price: "41000" + market: BTC_USDT + postOnly: false + ioc: false + clientOrderId: "" + rpi: true responses: '200': $ref: '#/components/responses/BulkLimitOrderResponse' @@ -3947,6 +4159,7 @@ paths: /api/v4/order/market: post: summary: Create market order + operationId: createMarketOrder description: | The endpoint creates [market trading order](/glossary#market-order). @@ -4094,6 +4307,7 @@ paths: /api/v4/order/stock_market: post: summary: Create buy stock market order + operationId: createStockMarketOrder description: | The endpoint creates buy [stock](/glossary#stock) market trading [order](/glossary#orders). @@ -4229,6 +4443,7 @@ paths: /api/v4/order/stop_limit: post: summary: Create stop-limit order + operationId: createStopLimitOrder description: | The endpoint creates [stop-limit trading order](/glossary#stop-limit-order). @@ -4399,6 +4614,7 @@ paths: /api/v4/order/stop_market: post: summary: Create stop-market order + operationId: createStopMarketOrder description: | The endpoint creates [stop-market trading order](/glossary#stop-market-order). @@ -4563,6 +4779,7 @@ paths: /api/v4/order/cancel: post: summary: Cancel order + operationId: cancelOrder description: | Cancel existing [order](/glossary#orders). @@ -4701,6 +4918,7 @@ paths: /api/v4/order/cancel/all: post: summary: Cancel all orders + operationId: cancelAllOrders description: | Cancels all orders that meet the conditions [order](/glossary#orders). @@ -4772,6 +4990,12 @@ paths: type: string nonce: type: string + example: + market: BTC_USDT + type: + - spot + - margin + - futures responses: '200': description: Orders cancelled successfully @@ -4793,6 +5017,7 @@ paths: /api/v4/orders: post: summary: Query unexecuted(active) orders + operationId: getActiveOrders description: | The endpoint retrieves [active orders](/glossary#active-orders) (orders not yet executed). @@ -4887,6 +5112,7 @@ paths: /api/v4/trade-account/executed-history: post: summary: Query executed order history + operationId: getExecutedOrderHistory description: | The endpoint retrieves all deals for all markets. Can be filtered by single market if needed. @@ -5028,6 +5254,7 @@ paths: /api/v4/trade-account/order: post: summary: Query executed order deals + operationId: getOrderDeals description: | The endpoint retrieves deals for a specific order. @@ -5161,6 +5388,7 @@ paths: /api/v4/trade-account/order/history: post: summary: Query executed orders + operationId: getOrderHistory description: | The endpoint retrieves order history. @@ -5319,6 +5547,7 @@ paths: /api/v4/order/modify: post: summary: Modify order + operationId: modifyOrder description: | The endpoint modifies existing [order](/glossary#orders). @@ -5439,6 +5668,7 @@ paths: /api/v4/order/kill-switch: post: summary: Sync kill-switch timer + operationId: setKillSwitch description: | The endpoint creates, updates, deletes [kill-switch timer](/glossary#kill-switch-timer). @@ -5566,6 +5796,7 @@ paths: /api/v4/order/kill-switch/status: post: summary: Status kill-switch timer + operationId: getKillSwitchStatus description: | The endpoint retrieves the status of [kill-switch timer](/glossary#kill-switch-timer). @@ -5670,7 +5901,11 @@ components: - X-TXC-SIGNATURE: HMAC SHA512 signature responses: BulkLimitOrderResponse: - $ref: '#/components/schemas/BulkLimitOrderResponse' + description: Orders created + content: + application/json: + schema: + $ref: '#/components/schemas/BulkLimitOrderResponse' schemas: LimitOrderRequest: type: object @@ -5947,63 +6182,19 @@ components: example: true BulkLimitOrderResponse: type: array - description: Orders created items: type: object properties: result: - $ref: '#/components/schemas/OrderResponse' + type: object + allOf: + - $ref: '#/components/schemas/OrderResponse' + nullable: true error: + type: object allOf: - $ref: '#/components/schemas/ErrorResponse' nullable: true - example: - - result: - orderId: 4326248250 - clientOrderId: "" - market: "BTC_USDT" - side: "buy" - type: "limit" - timestamp: 1684916268.825564 - dealMoney: "641.988" - dealStock: "0.02" - amount: "0.02" - left: "0" - dealFee: "1.283976" - ioc: false - postOnly: false - price: "40000" - status: "FILLED" - stp: "no" - positionSide: "BOTH" - rpi: true - error: null - - result: null - error: - code: 32 - message: "Validation failed" - errors: - amount: ["Given amount is less than min amount 0.001."] - - result: - orderId: 4326248250 - clientOrderId: "" - market: "BTC_USDT" - side: "sell" - type: "limit" - timestamp: 1684916268.825564 - dealMoney: "641.988" - dealStock: "0.02" - amount: "0.02" - left: "0" - dealFee: "1.283976" - ioc: false - postOnly: false - price: "41000" - status: "FILLED" - stp: "no" - positionSide: "BOTH" - rpi: true - error: null ErrorResponse: type: object properties: diff --git a/style.css b/style.css new file mode 100644 index 0000000..6bdada0 --- /dev/null +++ b/style.css @@ -0,0 +1,13 @@ +/* + * Fix: Code blocks inside components rendered from OpenAPI YAML descriptions + * lack the standard .code-block-background wrapper that Mintlify relies on to apply + * dark mode backgrounds (html.dark .code-block-background { background-color: var(--shiki-dark-bg) }). + * + * These bare
 elements sit directly inside the accordion content div,
+ * so the --shiki-dark-bg CSS variable (already injected by Shiki) is never activated.
+ * This rule activates it explicitly.
+ */
+html.dark [data-component-part="accordion-content"] pre.shiki {
+  background-color: var(--shiki-dark-bg) !important;
+}
+

From caeb05f414926c4969535202b69a2f4938000e11 Mon Sep 17 00:00:00 2001
From: whitebit-robot 
Date: Mon, 2 Mar 2026 10:12:15 +0100
Subject: [PATCH 45/84] docs.json openapi/private/http-trade- docs(api): add
 property-level examples to private OpenAPI specs

- Add example: values to all request schema properties in
  http-trade-v4.yaml, main_api_v4.yaml, and http-trade-v1.yaml
- Add examples to all shared response schemas (OrderResponse,
  FeeInfo, TransactionHistory, Investment, SubAccount, etc.)
- Enable api.examples.prefill in docs.json so Mintlify's
  Try It sandbox auto-fills from OpenAPI example values
---
 docs.json                          |   5 +
 openapi/private/http-trade-v1.yaml |  20 ++
 openapi/private/http-trade-v4.yaml | 228 +++++++++++++++++-
 openapi/private/main_api_v4.yaml   | 356 ++++++++++++++++++++++++++++-
 4 files changed, 603 insertions(+), 6 deletions(-)

diff --git a/docs.json b/docs.json
index 9e7d119..7bf7d58 100644
--- a/docs.json
+++ b/docs.json
@@ -2,6 +2,11 @@
   "$schema": "https://mintlify.com/docs.json",
   "theme": "mint",
   "name": "WhiteBIT",
+  "api": {
+    "examples": {
+      "prefill": true
+    }
+  },
   "colors": {
     "primary": "#3B307A",
     "light": "#EABE4D",
diff --git a/openapi/private/http-trade-v1.yaml b/openapi/private/http-trade-v1.yaml
index cd71779..cb30e4e 100644
--- a/openapi/private/http-trade-v1.yaml
+++ b/openapi/private/http-trade-v1.yaml
@@ -52,9 +52,11 @@ paths:
                 request:
                   type: string
                   description: "Request path"
+                  example: "{{request}}"
                 nonce:
                   type: integer
                   description: "Nonce for request"
+                  example: 1593342324
             example:
               currency: "BTC"
       responses:
@@ -107,9 +109,11 @@ paths:
                 request:
                   type: string
                   description: "Request path"
+                  example: "{{request}}"
                 nonce:
                   type: integer
                   description: "Nonce for request"
+                  example: 1593342324
       responses:
         '200':
           description: Successful response
@@ -132,9 +136,11 @@ paths:
                         available:
                           type: string
                           description: "Available balance"
+                          example: "0.2"
                         freeze:
                           type: string
                           description: "Frozen balance"
+                          example: "1.02"
                     example:
                       BTC:
                         available: "0.2"
@@ -192,9 +198,11 @@ paths:
                 request:
                   type: string
                   description: "Request path"
+                  example: "{{request}}"
                 nonce:
                   type: integer
                   description: "Nonce for request"
+                  example: 1593342324
             example:
               market: "BTC_USDT"
               side: "buy"
@@ -249,9 +257,11 @@ paths:
                 request:
                   type: string
                   description: "Request path"
+                  example: "{{request}}"
                 nonce:
                   type: integer
                   description: "Nonce for request"
+                  example: 1593342324
             example:
               market: "BTC_USDT"
               orderId: 4180284841
@@ -312,9 +322,11 @@ paths:
                 request:
                   type: string
                   description: "Request path"
+                  example: "{{request}}"
                 nonce:
                   type: integer
                   description: "Nonce for request"
+                  example: 1593342324
             example:
               market: "BTC_USDT"
               offset: 0
@@ -377,9 +389,11 @@ paths:
                 request:
                   type: string
                   description: "Request path"
+                  example: "{{request}}"
                 nonce:
                   type: integer
                   description: "Nonce for request"
+                  example: 1593342324
             example:
               offset: 0
               limit: 100
@@ -468,9 +482,11 @@ paths:
                 request:
                   type: string
                   description: "Request path"
+                  example: "{{request}}"
                 nonce:
                   type: integer
                   description: "Nonce for request"
+                  example: 1593342324
             example:
               market: "BTC_USDT"
               offset: 0
@@ -552,9 +568,11 @@ paths:
                 request:
                   type: string
                   description: "Request path"
+                  example: "{{request}}"
                 nonce:
                   type: integer
                   description: "Nonce for request"
+                  example: 1593342324
             example:
               offset: 0
               limit: 100
@@ -642,9 +660,11 @@ paths:
                 request:
                   type: string
                   description: "Request path"
+                  example: "{{request}}"
                 nonce:
                   type: integer
                   description: "Nonce for request"
+                  example: 1593342324
             example:
               orderId: 3135554375
               offset: 0
diff --git a/openapi/private/http-trade-v4.yaml b/openapi/private/http-trade-v4.yaml
index ac2d667..5716562 100644
--- a/openapi/private/http-trade-v4.yaml
+++ b/openapi/private/http-trade-v4.yaml
@@ -69,9 +69,11 @@ paths:
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             example:
               ticker: BTC
               request: "{{request}}"
@@ -147,9 +149,11 @@ paths:
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             example:
               ticker: BTC
               request: "{{request}}"
@@ -253,37 +257,46 @@ paths:
                 market:
                   type: string
                   description: "Available margin [market](/glossary#market). Example: BTC_USDT"
+                  example: "BTC_USDT"
                 side:
                   type: string
                   enum: [buy, sell]
                   description: "Order type. Variables: 'buy' / 'sell'. For open long position use **buy**, for short **sell**."
+                  example: "buy"
                 amount:
                   type: string
                   description: "Amount of [stock](/glossary#stock) currency to buy or sell."
+                  example: "0.01"
                 price:
                   type: string
                   description: "Price in [money](/glossary#money) currency. Example: '9800'"
+                  example: "40000"
                 clientOrderId:
                   type: string
                   description: "Identifier should be unique and contain letters, dashes, numbers, dots or underscores."
+                  example: "order1987111"
                 stopLoss:
                   type: string
                   description: |
                     Stop loss price.
 
                     When provided, the system creates an [OTO](/glossary#one-triggers-the-other-oto) order with a stop loss condition.
+                  example: "50000"
                 takeProfit:
                   type: string
                   description: |
                     Take profit price.
 
                     When provided, the system creates an [OTO](/glossary#one-triggers-the-other-oto) order with a take profit condition.
+                  example: "30000"
                 postOnly:
                   type: boolean
                   description: "Orders are guaranteed to be the [maker](/glossary#maker) order when [executed](/glossary#finished-orders)."
+                  example: false
                 ioc:
                   type: boolean
                   description: "An immediate or cancel order (IOC) is an order that attempts to execute all or part immediately and then cancels any unfilled portion."
+                  example: false
                 rpi:
                   type: boolean
                   description: |
@@ -295,10 +308,13 @@ paths:
                   type: string
                   enum: [LONG, SHORT, BOTH]
                   description: "Defines the position direction when hedge mode is enabled. See [positionSide](/glossary#position-side)"
+                  example: "LONG"
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
             example:
               market: BTC_USDT
               side: buy
@@ -474,34 +490,42 @@ paths:
                       market:
                         type: string
                         description: "Available margin [market](/glossary#market). Example: BTC_USDT"
+                        example: "BTC_PERP"
                       side:
                         type: string
                         enum: [buy, sell]
                         description: "Order type. Variables: 'buy' / 'sell'."
+                        example: "buy"
                       amount:
                         type: string
                         description: "Amount of [stock](/glossary#stock) currency to buy or sell."
+                        example: "0.02"
                       price:
                         type: string
                         description: "Price in [money](/glossary#money) currency."
+                        example: "40000"
                       clientOrderId:
                         type: string
                         description: "Identifier must be unique and contain letters, numbers, dashes, dots, or underscores."
+                        example: ""
                       stopLoss:
                         type: string
                         description: |
                           Stop loss price.
 
                           When provided, the system creates an [OTO](/glossary#one-triggers-the-other-oto) order with a stop loss condition.
+                        example: "50000"
                       takeProfit:
                         type: string
                         description: |
                           Take profit price.
 
                           When provided, the system creates an [OTO](/glossary#one-triggers-the-other-oto) order with a take profit condition.
+                        example: "30000"
                       postOnly:
                         type: boolean
                         description: "Ensures the order adds liquidity and executes as maker."
+                        example: false
                       ioc:
                         type: boolean
                         description: |
@@ -509,6 +533,7 @@ paths:
 
                           IOC does not support `rpi=true` because RPI uses post-only behavior by design.
                           The API returns error code `37` when an order item sets both `ioc=true` and `rpi=true`.
+                        example: false
                       rpi:
                         type: boolean
                         description: |
@@ -521,6 +546,7 @@ paths:
                         type: string
                         enum: [LONG, SHORT, BOTH]
                         description: "Defines the position direction when hedge mode is enabled. See [positionSide](/glossary#position-side)"
+                        example: "LONG"
                 stopOnFail:
                   type: boolean
                   default: false
@@ -530,10 +556,13 @@ paths:
                     When true: Processing stops at the first order that fails validation or execution. Only orders up to (but not including) the failed order are processed.
 
                     When false (default): All orders in the bulk request are processed regardless of individual failures. Each order result is returned in the response array.
+                  example: true
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
             example:
               orders:
                 - side: buy
@@ -770,24 +799,33 @@ paths:
               properties:
                 market:
                   type: string
+                  example: "BTC_USDT"
                 side:
                   type: string
                   enum: [buy, sell]
+                  example: "buy"
                 amount:
                   type: string
+                  example: "0.01"
                 clientOrderId:
                   type: string
+                  example: "order1987111"
                 stopLoss:
                   type: string
+                  example: "50000"
                 takeProfit:
                   type: string
+                  example: "40000"
                 positionSide:
                   type: string
                   enum: [LONG, SHORT, BOTH]
+                  example: "LONG"
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
             example:
               market: BTC_USDT
               side: buy
@@ -938,28 +976,39 @@ paths:
               properties:
                 market:
                   type: string
+                  example: "BTC_USDT"
                 side:
                   type: string
                   enum: [buy, sell]
+                  example: "buy"
                 amount:
                   type: string
+                  example: "0.001"
                 price:
                   type: string
+                  example: "40000"
                 activation_price:
                   type: string
+                  example: "40000"
                 stopLoss:
                   type: string
+                  example: "30000"
                 takeProfit:
                   type: string
+                  example: "50000"
                 clientOrderId:
                   type: string
+                  example: "order1987111"
                 positionSide:
                   type: string
                   enum: [LONG, SHORT, BOTH]
+                  example: "LONG"
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
             example:
               market: BTC_USDT
               side: buy
@@ -1130,26 +1179,36 @@ paths:
               properties:
                 market:
                   type: string
+                  example: "BTC_USDT"
                 side:
                   type: string
                   enum: [buy, sell]
+                  example: "buy"
                 amount:
                   type: string
+                  example: "0.01"
                 activation_price:
                   type: string
+                  example: "40000"
                 clientOrderId:
                   type: string
+                  example: "order1987111"
                 stopLoss:
                   type: string
+                  example: "50000"
                 takeProfit:
                   type: string
+                  example: "30000"
                 positionSide:
                   type: string
                   enum: [LONG, SHORT, BOTH]
+                  example: "LONG"
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
             example:
               market: BTC_USDT
               side: buy
@@ -1298,8 +1357,10 @@ paths:
               properties:
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
             example:
               request: "{{request}}"
               nonce: "{{nonce}}"
@@ -1387,9 +1448,11 @@ paths:
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             example:
               market: "BTC_USDT"
               request: "{{request}}"
@@ -1572,15 +1635,20 @@ paths:
               properties:
                 positionId:
                   type: integer
+                  example: 123
                 positionSide:
                   type: string
                   enum: [LONG, SHORT, BOTH]
+                  example: "LONG"
                 market:
                   type: string
+                  example: "BTC_USDT"
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
             example:
               positionId: 123
               positionSide: LONG
@@ -1630,12 +1698,16 @@ paths:
               properties:
                 market:
                   type: string
+                  example: "BTC_USDT"
                 positionId:
                   type: integer
+                  example: 1
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
             example:
               market: BTC_USDT
               positionId: 1
@@ -1802,9 +1874,11 @@ paths:
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             example:
               market: "BTC_PERP"
               limit: 100
@@ -1917,10 +1991,13 @@ paths:
                   type: integer
                   minimum: 1
                   maximum: 100
+                  example: 5
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
             example:
               leverage: 5
               request: "{{request}}"
@@ -1971,8 +2048,10 @@ paths:
               properties:
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
             example:
               request: "{{request}}"
               nonce: "{{nonce}}"
@@ -2028,10 +2107,13 @@ paths:
               properties:
                 hedgeMode:
                   type: boolean
+                  example: true
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
             example:
               hedgeMode: true
               request: "{{request}}"
@@ -2073,16 +2155,21 @@ paths:
               properties:
                 market:
                   type: string
+                  example: "BTC_USDT"
                 offset:
                   type: integer
                   default: 0
+                  example: 0
                 limit:
                   type: integer
                   default: 50
+                  example: 100
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
             example:
               market: BTC_USDT
               offset: 0
@@ -2284,16 +2371,21 @@ paths:
               properties:
                 market:
                   type: string
+                  example: "BTC_USDT"
                 offset:
                   type: integer
                   default: 0
+                  example: 0
                 limit:
                   type: integer
                   default: 50
+                  example: 100
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
             example:
               market: BTC_USDT
               offset: 0
@@ -2531,23 +2623,32 @@ paths:
               properties:
                 market:
                   type: string
+                  example: "BTC_USDT"
                 side:
                   type: string
                   enum: [buy, sell]
+                  example: "buy"
                 amount:
                   type: string
+                  example: "0.001"
                 price:
                   type: string
+                  example: "40000"
                 activation_price:
                   type: string
+                  example: "41000"
                 stop_limit_price:
                   type: string
+                  example: "42000"
                 clientOrderId:
                   type: string
+                  example: "order1987111"
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
             example:
               market: BTC_USDT
               side: buy
@@ -2837,12 +2938,16 @@ paths:
               properties:
                 market:
                   type: string
+                  example: "BTC_USDT"
                 id:
                   type: integer
+                  example: 117703764514
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
             example:
               market: BTC_USDT
               id: 117703764514
@@ -2894,12 +2999,16 @@ paths:
               properties:
                 market:
                   type: string
+                  example: "BTC_USDT"
                 orderId:
                   type: integer
+                  example: 117703764514
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
             example:
               market: BTC_USDT
               orderId: 117703764514
@@ -3160,12 +3269,16 @@ paths:
               properties:
                 market:
                   type: string
+                  example: "BTC_USDT"
                 otoId:
                   type: integer
+                  example: 117703764514
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
             example:
               market: BTC_USDT
               otoId: 117703764514
@@ -3233,9 +3346,11 @@ paths:
                 nonce:
                   type: integer
                   description: "Nonce for request"
+                  example: 1699260637
                 request:
                   type: string
                   description: "Request path"
+                  example: "{{request}}"
             examples:
               estimateReceive:
                 summary: "Estimate convert of BTC to receive 35,103.1 USDT"
@@ -3350,9 +3465,11 @@ paths:
                 nonce:
                   type: integer
                   description: "Nonce for request"
+                  example: 1699260637
                 request:
                   type: string
                   description: "Request path"
+                  example: "{{request}}"
             example:
               quoteId: "4050"
       responses:
@@ -3443,9 +3560,11 @@ paths:
                 nonce:
                   type: integer
                   description: "Nonce for request"
+                  example: 1699260637
                 request:
                   type: string
                   description: "Request path"
+                  example: "{{request}}"
             example:
               fromTicker: "BTC"
       responses:
@@ -4107,11 +4226,13 @@ paths:
                     When true: Processing stops at the first order that fails validation or execution. Only orders up to (but not including) the failed order are processed.
 
                     When false (default): All orders in the bulk request are processed regardless of individual failures. Each order result is returned in the response array.
-
+                  example: true
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
             example:
               orders:
                 - side: buy
@@ -4889,10 +5010,13 @@ paths:
                 clientOrderId:
                   type: string
                   description: "Custom client order id. Example: 'customId11'. Required if orderId is not set."
+                  example: "customId11"
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
       responses:
         '200':
           description: Order cancelled successfully
@@ -4983,13 +5107,16 @@ paths:
                 type:
                   type: array
                   description: "Order types value. Example: 'spot', 'margin', 'futures'"
+                  example: ["spot", "margin", "futures"]
                   items:
                     type: string
                     enum: [spot, margin, futures]
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
             example:
               market: BTC_USDT
               type:
@@ -5069,22 +5196,28 @@ paths:
                 orderId:
                   type: integer
                   description: "Available orderId. Example: 3134995325"
+                  example: 3134995325
                 clientOrderId:
                   type: string
                   description: "Available clientOrderId. Example: customId11"
+                  example: "customId11"
                 offset:
                   type: integer
                   default: 0
                   description: "Starting line index (OFFSET). Default: 0, Min: 0"
+                  example: 0
                 limit:
                   type: integer
                   default: 50
                   maximum: 100
                   description: "LIMIT is a special clause used to limit records a particular query can return. Default: 50, Min: 1, Max: 100"
+                  example: 50
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
       responses:
         '200':
           description: List of active orders
@@ -5160,27 +5293,35 @@ paths:
                 market:
                   type: string
                   description: "Requested [market](/glossary#market). Example: BTC_USDT"
+                  example: "BTC_USDT"
                 clientOrderId:
                   type: string
                   description: "Filter by custom order identifier"
+                  example: "customId11"
                 startDate:
                   type: integer
                   description: "Start date in Unix-time format"
+                  example: 1593233939
                 endDate:
                   type: integer
                   description: "End date in Unix-time format"
+                  example: 1593233939
                 offset:
                   type: integer
                   default: 0
                   description: "Starting line index (OFFSET). Default: 0, Min: 0"
+                  example: 0
                 limit:
                   type: integer
                   default: 50
                   description: "LIMIT is a special clause used to limit records a particular query can return. Default: 50, Min: 1, Max: 100"
+                  example: 50
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
       responses:
         '200':
           description: Executed order history
@@ -5278,16 +5419,21 @@ paths:
               properties:
                 orderId:
                   type: integer
+                  example: 3134995325
                 offset:
                   type: integer
                   default: 0
+                  example: 0
                 limit:
                   type: integer
                   default: 50
+                  example: 50
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
       responses:
         '200':
           description: Successful response - returns paginated order deals
@@ -5408,16 +5554,21 @@ paths:
               properties:
                 market:
                   type: string
+                  example: "BTC_USDT"
                 offset:
                   type: integer
                   default: 0
+                  example: 0
                 limit:
                   type: integer
                   default: 50
+                  example: 50
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
       responses:
         '200':
           description: Successful response - returns order history grouped by market. Empty response if order is not yours.
@@ -5621,28 +5772,37 @@ paths:
                 orderId:
                   type: integer
                   description: "Active order id. Required if clientOrderId is not set."
+                  example: 4180284841
                 clientOrderId:
                   type: string
                   description: "Identifier should be unique and contain letters, dashes, numbers, dots or underscores. Required if orderId is not set."
+                  example: "order1987111"
                 market:
                   type: string
                   description: "Available [market](/glossary#market). Example: BTC_USDT"
+                  example: "BTC_USDT"
                 amount:
                   type: string
                   description: "Amount of [stock](/glossary#stock) currency to buy or sell. Example: '0.001' or 0.001"
+                  example: "0.001"
                 total:
                   type: string
                   description: "Total of [money](/glossary#money) currency to buy or sell. Example: '0.001' or 0.001"
+                  example: "100"
                 price:
                   type: string
                   description: "Price in [money](/glossary#money) currency. Example: '9800' or 9800"
+                  example: "9800"
                 activationPrice:
                   type: string
                   description: "Activation price in [money](/glossary#money) currency. Example: '10000' or 10000"
+                  example: "10000"
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
       responses:
         '200':
           description: Order modified successfully
@@ -5735,19 +5895,24 @@ paths:
                 market:
                   type: string
                   description: "Available [market](/glossary#market). Example: BTC_USDT"
+                  example: "BTC_USDT"
                 timeout:
                   type: string
                   description: "Timer value. Example: '5'-'600' or null"
+                  example: "60"
                 types:
                   type: array
                   description: "Order types value. Example: 'spot', 'margin', 'futures' or null"
+                  example: ["spot", "margin"]
                   items:
                     type: string
                     enum: [spot, margin, futures]
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
       responses:
         '200':
           description: Successful response - kill-switch timer synced
@@ -5834,10 +5999,13 @@ paths:
                 market:
                   type: string
                   description: "Available [market](/glossary#market). Example: BTC_USDT"
+                  example: "BTC_USDT"
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
       responses:
         '200':
           description: Successful response - returns array of kill-switch timer statuses
@@ -5925,6 +6093,7 @@ components:
           type: string
           enum: [buy, sell]
           description: "Order type. Variables: 'buy' / 'sell' Example: 'buy'"
+          example: "buy"
         amount:
           type: string
           description: "Amount of [stock](/glossary#stock) currency to buy or sell. Example: '0.001' or 0.001"
@@ -5936,10 +6105,12 @@ components:
         clientOrderId:
           type: string
           description: "Identifier should be unique and contain letters, dashes, numbers, dots or underscores. The identifier must be unique."
+          example: "order1987111"
         postOnly:
           type: boolean
           default: false
           description: "[Orders](/glossary#orders) are guaranteed to be the [maker](/glossary#maker) order when [executed](/glossary#finished-orders). Variables: 'true' / 'false' Example: 'false'."
+          example: false
         ioc:
           type: boolean
           default: false
@@ -5950,6 +6121,7 @@ components:
             The API returns error code `37` when a request sets both `ioc=true` and `rpi=true`.
 
             Refer to [Order Parameter Rules](/guides/order-parameter-rules) for unsupported parameter combinations.
+          example: false
         bboRole:
           type: integer
           enum: [1, 2]
@@ -5959,6 +6131,7 @@ components:
           enum: [no, cancel_both, cancel_new, cancel_old]
           default: no
           description: "Self trade prevention mode. Variables: 'no' / 'cancel_both' / 'cancel_new' / 'cancel_old'. Example: 'no'."
+          example: "no"
         rpi:
           type: boolean
           description: |
@@ -5973,8 +6146,10 @@ components:
           example: true
         request:
           type: string
+          example: "{{request}}"
         nonce:
           type: string
+          example: "{{nonce}}"
 
     MarketOrderRequest:
       type: object
@@ -5988,25 +6163,31 @@ components:
         market:
           type: string
           description: "Available [market](/glossary#market). Example: BTC_USDT"
-          example: BTC_USDT
+          example: "BTC_USDT"
         side:
           type: string
           enum: [buy, sell]
           description: "Order type. Variables: 'buy' / 'sell' Example: 'buy'"
+          example: "buy"
         amount:
           type: string
           description: "Amount of [money](/glossary#money) currency to buy or amount in [stock](/glossary#stock) currency to sell. Example: '5 USDT' for buy (min total) and '0.001 BTC' for sell (min amount)."
+          example: "100"
         clientOrderId:
           type: string
           description: "Identifier should be unique and contain letters, dashes, numbers, dots or underscores. The identifier must be unique."
+          example: "order1987111"
         stp:
           type: string
           enum: [no, cancel_both, cancel_new, cancel_old]
           description: "Self trade prevention mode. Variables: 'no' / 'cancel_both' / 'cancel_new' / 'cancel_old'. Example: 'no'."
+          example: "no"
         request:
           type: string
+          example: "{{request}}"
         nonce:
           type: string
+          example: "{{nonce}}"
 
     StopLimitOrderRequest:
       type: object
@@ -6022,23 +6203,28 @@ components:
         market:
           type: string
           description: "Available [market](/glossary#market). Example: BTC_USDT"
-          example: BTC_USDT
+          example: "BTC_USDT"
         side:
           type: string
           enum: [buy, sell]
           description: "Order type. Variables: 'buy' / 'sell' Example: 'buy'"
+          example: "buy"
         amount:
           type: string
           description: "Amount of [stock](/glossary#stock) currency to buy or sell. Example: '0.001' or 0.001"
+          example: "0.001"
         price:
           type: string
           description: "Price in [money](/glossary#money) currency. Example: '9800' or 9800"
+          example: "9800"
         activation_price:
           type: string
           description: "Activation price in [money](/glossary#money) currency. Example: '10000' or 10000"
+          example: "10000"
         clientOrderId:
           type: string
           description: "Identifier should be unique and contain letters, dashes, numbers, dots or underscores. The identifier must be unique."
+          example: "order1987111"
         bboRole:
           type: integer
           enum: [1, 2]
@@ -6050,8 +6236,10 @@ components:
           example: "no"
         request:
           type: string
+          example: "{{request}}"
         nonce:
           type: string
+          example: "{{nonce}}"
 
     StopMarketOrderRequest:
       type: object
@@ -6066,20 +6254,24 @@ components:
         market:
           type: string
           description: "Available [market](/glossary#market). Example: BTC_USDT"
-          example: BTC_USDT
+          example: "BTC_USDT"
         side:
           type: string
           enum: [buy, sell]
           description: "Order type. Variables: 'buy' / 'sell' Example: 'buy'"
+          example: "buy"
         amount:
           type: string
           description: "Amount of [money](/glossary#money) currency to buy or amount in [stock](/glossary#stock) currency to sell. Example: '0.01' or 0.01 for buy and '0.0001' for sell."
+          example: "0.01"
         activation_price:
           type: string
           description: "Activation price in [money](/glossary#money) currency. Example: '10000' or 10000"
+          example: "10000"
         clientOrderId:
           type: string
           description: "Identifier should be unique and contain letters, dashes, numbers, dots or underscores. The identifier must be unique."
+          example: "order1987111"
         stp:
           type: string
           enum: [no, cancel_both, cancel_new, cancel_old]
@@ -6087,8 +6279,10 @@ components:
           example: "no"
         request:
           type: string
+          example: "{{request}}"
         nonce:
           type: string
+          example: "{{nonce}}"
 
     BulkOrderItem:
       type: object
@@ -6096,14 +6290,19 @@ components:
         side:
           type: string
           enum: [buy, sell]
+          example: "buy"
         amount:
           type: string
+          example: "0.001"
         price:
           type: string
+          example: "40000"
         market:
           type: string
+          example: "BTC_USDT"
         postOnly:
           type: boolean
+          example: false
         ioc:
           type: boolean
           description: |
@@ -6111,8 +6310,10 @@ components:
 
             IOC does not support `rpi=true` because RPI uses post-only behavior by design.
             The API returns error code `37` when an order item sets both `ioc=true` and `rpi=true`.
+          example: false
         clientOrderId:
           type: string
+          example: ""
         rpi:
           type: boolean
           description: |
@@ -6128,54 +6329,71 @@ components:
         orderId:
           type: integer
           description: "Order ID"
+          example: 4180284841
         clientOrderId:
           type: string
           description: "Custom client order ID; empty string if not specified"
+          example: "order1987111"
         market:
           type: string
           description: "Deal market"
+          example: "BTC_USDT"
         side:
           type: string
           description: "Order side"
+          example: "buy"
         type:
           type: string
           description: "Order type"
+          example: "limit"
         timestamp:
           type: number
           description: "Timestamp of order creation"
+          example: 1595792396.165973
         dealMoney:
           type: string
           description: "If order finished - amount in money currency that is finished"
+          example: "0"
         dealStock:
           type: string
           description: "If order finished - amount in stock currency that is finished"
+          example: "0"
         amount:
           type: string
           description: "Amount"
+          example: "0.01"
         left:
           type: string
           description: "If order not finished - rest of the amount that must be finished"
+          example: "0.001"
         dealFee:
           type: string
           description: "Fee in money currency when order is filled"
+          example: "0"
         price:
           type: string
           description: "Price"
+          example: "40000"
         postOnly:
           type: boolean
           description: "PostOnly flag"
+          example: false
         ioc:
           type: boolean
           description: "IOC flag"
+          example: false
         status:
           type: string
           description: "Order status"
+          example: "FILLED"
         stp:
           type: string
           description: "Self trade prevention mode"
+          example: "no"
         positionSide:
           type: string
           description: "Position side (for collateral orders)"
+          example: "LONG"
         rpi:
           type: boolean
           description: "Indicates Retail Price Improvement (RPI) mode for the order."
@@ -6201,9 +6419,11 @@ components:
         code:
           type: integer
           description: "Error code"
+          example: 30
         message:
           type: string
           description: "Error message"
+          example: "Validation failed"
         errors:
           type: object
           additionalProperties:
diff --git a/openapi/private/main_api_v4.yaml b/openapi/private/main_api_v4.yaml
index 75b5f5c..809bd22 100644
--- a/openapi/private/main_api_v4.yaml
+++ b/openapi/private/main_api_v4.yaml
@@ -86,9 +86,11 @@ paths:
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
       responses:
         "200":
           description: Successful response
@@ -193,9 +195,11 @@ paths:
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
       responses:
         "200":
           description: Successful response
@@ -408,6 +412,7 @@ paths:
                 uniqueId:
                   type: string
                   description: Unique transaction identifier on client's side
+                  example: "qw22"
                 customer:
                   type: object
                   description: Customer information (required for USD/EUR with VISAMASTER [provider](/glossary#provider))
@@ -418,18 +423,21 @@ paths:
                         Customer billing first name.
 
                         ⚠️ Required if currency USD or EUR with VISAMASTER [provider](/glossary#provider).
+                      example: "John"
                     lastName:
                       type: string
                       description: |
                         Customer billing last name.
 
                         ⚠️ Required if currency USD or EUR with VISAMASTER [provider](/glossary#provider).
+                      example: "Doe"
                     email:
                       type: string
                       description: |
                         Customer billing email.
 
                         ⚠️ Required if currency USD or EUR with VISAMASTER [provider](/glossary#provider).
+                      example: "john_doe@email.com"
                     birthDate:
                       type: string
                       format: date
@@ -437,6 +445,7 @@ paths:
                         Customer birth date (Format YYYY-MM-DD).
 
                         ⚠️ Required if currency USD or EUR with VISAMASTER [provider](/glossary#provider).
+                      example: "1990-01-01"
                     address:
                       type: object
                       properties:
@@ -446,42 +455,52 @@ paths:
                             Customer address line1.
 
                             ⚠️ Required if currency USD or EUR with VISAMASTER [provider](/glossary#provider).
+                          example: "Martinez Campos 37"
                         line2:
                           type: string
                           description: Customer address line2
+                          example: ""
                         city:
                           type: string
                           description: |
                             Customer city.
 
                             ⚠️ Required if currency USD or EUR with VISAMASTER [provider](/glossary#provider).
+                          example: "Madrid"
                         zipCode:
                           type: string
                           description: |
                             Customer zip-code.
 
                             ⚠️ Required if currency USD or EUR with VISAMASTER [provider](/glossary#provider).
+                          example: "28010"
                         countryCode:
                           type: string
                           description: |
                             Customer country code.
 
                             ⚠️ Required if currency USD or EUR with VISAMASTER [provider](/glossary#provider).
+                          example: "ES"
                 successLink:
                   type: string
                   description: Customer will be redirected to this URL by acquiring [provider](/glossary#provider) after success deposit. To activate this feature, please contact support
+                  example: "https://success.example.com"
                 failureLink:
                   type: string
                   description: Customer will be redirected to this URL in case of fail or rejection on acquiring provider side. To activate this feature, please contact support
+                  example: "https://failure.example.com"
                 returnLink:
                   type: string
                   description: Customer will be redirected to the URL defined if selects 'back' option after from the payment success or failure page. To activate this feature, define desired link. If not populated, option 'back' won't be displayed
+                  example: "https://return.example.com"
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             examples:
               basic:
                 summary: Basic request
@@ -558,12 +577,15 @@ paths:
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonceWindow:
                   type: boolean
                   description: Nonce window setting
+                  example: false
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             example:
               request: "{{request}}"
               nonceWindow: false
@@ -653,9 +675,11 @@ paths:
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             example:
               request: "{{request}}"
               nonce: "{{nonce}}"
@@ -818,10 +842,12 @@ paths:
                   type: string
                   description: |
                     Base64-encoded request body. See the [authentication guide](/private/http-auth) for signature generation details.
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: |
                     A unique identifier for the request. Use a monotonically increasing value such as a Unix timestamp in milliseconds.
+                  example: "{{nonce}}"
             example:
               transactionId: "54bffeb7-7a8f-43f8-bcd8-f14ec10fee85"
               address: "0x1234567890abcdef1234567890abcdef12345678"
@@ -906,6 +932,7 @@ paths:
                     [Memo](/glossary#memodestination-tag).
 
                     ⚠️ Required if currency is memoable.
+                  example: "48565488244493"
                 uniqueId:
                   type: string
                   description: |
@@ -919,6 +946,7 @@ paths:
                     [Fiat](/glossary#fiat) currency [provider](/glossary#provider). Example: VISAMASTER
 
                     ⚠️ Required for fiat currencies. Currency provider should be taken from [Asset Status endpoint](/public/http-v4/asset-status-list) response.
+                  example: "VISAMASTER"
                 network:
                   type: string
                   description: |
@@ -929,6 +957,7 @@ paths:
                 partialEnable:
                   type: boolean
                   description: Optional parameter for [FIAT](/glossary#fiat) withdrawals with increased Maximum Limit if set as "true". To use this parameter, the application must support "Partially successful" withdrawal status and latest updates in deposit/withdrawal history.
+                  example: false
                 beneficiary:
                   type: object
                   description: |
@@ -942,30 +971,35 @@ paths:
                         Beneficiary first name. Max length: 40 symbols, latin letters and special characters.
 
                         ⚠️ Required if currency [ticker](/glossary#ticker) is one of: UAH_IBAN, USD_VISAMASTER, USD, EUR
+                      example: "Firstname"
                     lastName:
                       type: string
                       description: |
                         Beneficiary last name. Max length: 40 symbols, latin letters and special characters.
 
                         ⚠️ Required if currency [ticker](/glossary#ticker) is one of: UAH_IBAN, USD_VISAMASTER, USD, EUR
+                      example: "Lastname"
                     tin:
                       type: integer
                       description: |
                         Beneficiary TAX payer number. Integer, 10 digits.
 
                         ⚠️ Required if currency is UAH_IBAN.
+                      example: 1000000000
                     phone:
                       type: string
                       description: |
                         Beneficiary phone number.
 
                         ⚠️ Required if currency [ticker](/glossary#ticker) is one of: USD_VISAMASTER, EUR_VISAMASTER
+                      example: "1234567891"
                     email:
                       type: string
                       description: |
                         Beneficiary email.
 
                         ⚠️ Required if currency [ticker](/glossary#ticker) is one of: USD_VISAMASTER, EUR_VISAMASTER
+                      example: "john_doe@email.com"
                     birthDate:
                       type: string
                       format: date
@@ -973,6 +1007,7 @@ paths:
                         Beneficiary birth date. Format: YYYY-MM-DD.
 
                         ⚠️ Required if currency [ticker](/glossary#ticker) is one of: USD_VISAMASTER, EUR_VISAMASTER
+                      example: "1990-01-01"
                 travelRule:
                   type: object
                   description: |
@@ -987,36 +1022,43 @@ paths:
                         Travel rule receiver type. Values: "individual" or "entity"
 
                         ⚠️ Required if currency is crypto and the account is from [EEA](/glossary#european-economic-area-eea)
+                      example: "individual"
                     vasp:
                       type: string
                       description: |
                         Travel rule destination platform (VASP) name.
 
                         ⚠️ Required if currency is crypto and the account is from [EEA](/glossary#european-economic-area-eea)
+                      example: "Binance"
                     name:
                       type: string
                       description: |
                         Travel rule. If individual - first_name ; if entity - entity_name
 
                         ⚠️ Required if currency is crypto and the account is from [EEA](/glossary#european-economic-area-eea)
+                      example: "John"
                     address:
                       type: string
                       description: |
                         Travel rule. If individual - last_name ; if entity - entity_address
 
                         ⚠️ Required if currency is crypto and the account is from [EEA](/glossary#european-economic-area-eea)
+                      example: "123 Business Street, London, UK"
                 paymentDescription:
                   type: string
                   description: |
                     Description of withdrawal destination
 
                     ⚠️ Required if currency is crypto and withdrawal from whitebit-tr.com
+                  example: "Payment description"
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             examples:
               crypto:
                 summary: Crypto withdrawal
@@ -1394,6 +1436,7 @@ paths:
                     **Not required** if **from** and **to** are set.
                   enum:
                     [deposit, withdraw, collateral-deposit, collateral-withdraw]
+                  example: "deposit"
                 from:
                   type: string
                   description: |
@@ -1401,6 +1444,7 @@ paths:
 
                     **Not required** if **method** is set.
                   enum: [main, spot, collateral]
+                  example: "main"
                 to:
                   type: string
                   description: |
@@ -1408,10 +1452,11 @@ paths:
 
                     **Not required** if **method** is set.
                   enum: [main, spot, collateral]
+                  example: "spot"
                 ticker:
                   type: string
                   description: "Currency's [ticker](/glossary#ticker). Example: BTC"
-                  example: XLM
+                  example: "XLM"
                 amount:
                   type: string
                   description: "Amount to transfer. Max [precision](/glossary#precision) = 8, value must be greater than zero and less than or equal to the available balance."
@@ -1419,9 +1464,11 @@ paths:
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             examples:
               usingMethod:
                 summary: Using method field (deprecated)
@@ -1589,36 +1636,44 @@ paths:
                   description: |
                     Method. Example: **1** to display deposits / **2** to display withdraws. Do not send this parameter in order to receive both deposits and withdraws.
                   enum: [1, 2]
+                  example: 1
                 ticker:
                   type: string
                   description: "Currency's [ticker](/glossary#ticker). Example: BTC"
+                  example: "BTC"
                 address:
                   type: string
                   description: Can be used for filtering transactions by specific address.
+                  example: "3ApEASLcrQtZpg1TsssFgYF5V5YQJAKvuE"
                 memo:
                   type: string
                   description: "Can be used for filtering transactions by specific [memo](/glossary#memodestination-tag)"
+                  example: "48565488244493"
                 addresses:
                   type: array
                   items:
                     type: string
                   maxItems: 20
                   description: Can be used for filtering transactions by specific array of addresses.
+                  example: ["3ApEASLcrQtZpg1TsssFgYF5V5YQJAKvuE"]
                 uniqueId:
                   type: string
                   description: Can be used for filtering transactions by specific unique id
+                  example: "24529041"
                 limit:
                   type: integer
                   minimum: 1
                   maximum: 100
                   default: 50
                   description: LIMIT is a special clause used to limit records a particular query can return.
+                  example: 100
                 offset:
                   type: integer
                   minimum: 0
                   maximum: 10000
                   default: 0
                   description: Use the OFFSET clause to return entries starting from a particular line.
+                  example: 0
                 status:
                   type: array
                   items:
@@ -1627,12 +1682,15 @@ paths:
                     Can be used for filtering transactions by status codes.
 
                     ⚠️ Caution: Use this parameter with the appropriate `transactionMethod` and valid status codes for that method. See the endpoint description above for valid codes. Example: `"status": [3,7]`
+                  example: [3, 7]
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             example:
               transactionMethod: 1
               ticker: "BTC"
@@ -1803,12 +1861,15 @@ paths:
                   type: string
                   description: Address type, available for specific currencies list (see address types table in endpoint description)
                   enum: [p2sh-segwit, bech32]
+                  example: "bech32"
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             examples:
               basic:
                 summary: Basic request
@@ -1967,16 +2028,20 @@ paths:
                   type: string
                   maxLength: 25
                   description: "Passphrase for applying [WhiteBIT codes](/glossary#whitebit-codes). Passphrase must contain only latin letters, numbers and symbols (like !@#$%^, no whitespaces). Max: 25 symbols."
+                  example: "some passphrase"
                 description:
                   type: string
                   maxLength: 75
                   description: "Additional text description for [code](/glossary#whitebit-codes). Visible only for creator. Max: 75 symbols."
+                  example: "some description"
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             example:
               ticker: "ETH"
               amount: "0.002"
@@ -2119,16 +2184,20 @@ paths:
                 code:
                   type: string
                   description: "[Code](/glossary#whitebit-codes) that will be applied."
+                  example: "WBe11f4fce-2a53-4edc-b195-66b693bd77e3ETH"
                 passphrase:
                   type: string
                   maxLength: 25
                   description: "Should be provided if the [code](/glossary#whitebit-codes) was created with passphrase. Max: 25 symbols."
+                  example: "some passphrase"
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             example:
               code: "WBe11f4fce-2a53-4edc-b195-66b693bd77e3ETH"
               passphrase: "some passphrase"
@@ -2215,18 +2284,22 @@ paths:
                   maximum: 100
                   default: 30
                   description: LIMIT is a special clause used to limit records a particular query can return.
+                  example: 30
                 offset:
                   type: integer
                   minimum: 0
                   maximum: 10000
                   default: 0
                   description: Use the OFFSET clause to return entries starting from a particular line.
+                  example: 0
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             example:
               request: "{{request}}"
               nonce: "{{nonce}}"
@@ -2330,18 +2403,22 @@ paths:
                   maximum: 100
                   default: 30
                   description: LIMIT is a special clause used to limit records a particular query can return.
+                  example: 100
                 offset:
                   type: integer
                   minimum: 0
                   maximum: 10000
                   default: 0
                   description: Use the OFFSET clause to return entries starting from a particular line.
+                  example: 0
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             example:
               request: "{{request}}"
               nonce: "{{nonce}}"
@@ -2458,12 +2535,15 @@ paths:
                 ticker:
                   type: string
                   description: "[Invest plan](/glossary#crypto-lending) source currency's [ticker](/glossary#ticker). Example: BTC"
+                  example: "USDT"
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             example:
               ticker: "USDT"
               request: "{{request}}"
@@ -2534,15 +2614,19 @@ paths:
                 planId:
                   type: string
                   description: "[Invest plan](/glossary#crypto-lending) identifier"
+                  example: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
                 amount:
                   type: string
                   description: Investment amount
+                  example: "100"
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             example:
               planId: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
               amount: "100"
@@ -2714,12 +2798,15 @@ paths:
                 id:
                   type: string
                   description: Investment identifier
+                  example: "0d7b66ff-1909-4938-ab7a-d16d9a64dcd5"
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             example:
               id: "0d7b66ff-1909-4938-ab7a-d16d9a64dcd5"
               request: "{{request}}"
@@ -2776,31 +2863,38 @@ paths:
                 id:
                   type: string
                   description: Investment identifier
+                  example: "0d7b66ff-1909-4938-ab7a-d16d9a64dcd5"
                 ticker:
                   type: string
                   description: "[Invest plan](/glossary#crypto-lending) source currency's [ticker](/glossary#ticker)"
+                  example: "USDT"
                 status:
                   type: integer
                   description: Investment status (1 - active, 2 - closed)
                   enum: [1, 2]
+                  example: 1
                 limit:
                   type: integer
                   minimum: 1
                   maximum: 100
                   default: 100
                   description: LIMIT is a special clause used to limit records a particular query can return.
+                  example: 100
                 offset:
                   type: integer
                   minimum: 0
                   maximum: 10000
                   default: 0
                   description: Use the OFFSET clause to return entries starting from a particular line.
+                  example: 0
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             example:
               id: "0d7b66ff-1909-4938-ab7a-d16d9a64dcd5"
               ticker: "USDT"
@@ -2891,27 +2985,33 @@ paths:
                 planId:
                   type: string
                   description: "[Invest plan](/glossary#crypto-lending) identifier"
+                  example: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
                 ticker:
                   type: string
                   description: "[Invest plan](/glossary#crypto-lending) target currency's [ticker](/glossary#ticker)"
+                  example: "USDT"
                 limit:
                   type: integer
                   minimum: 1
                   maximum: 100
                   default: 100
                   description: LIMIT is a special clause used to limit records a particular query can return.
+                  example: 100
                 offset:
                   type: integer
                   minimum: 0
                   maximum: 10000
                   default: 0
                   description: Use the OFFSET clause to return entries starting from a particular line.
+                  example: 0
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             example:
               planId: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
               ticker: "USDT"
@@ -2991,20 +3091,25 @@ paths:
                   maximum: 100
                   default: 100
                   description: Pagination limit.
+                  example: 50
                 offset:
                   type: integer
                   minimum: 0
                   default: 0
                   description: Pagination offset.
+                  example: 0
                 ticker:
                   type: string
                   description: "Filter by currency [ticker](/glossary#ticker). Example: USDT"
+                  example: "USDT"
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             example:
               limit: 50
               offset: 0
@@ -3086,29 +3191,37 @@ paths:
                   type: integer
                   default: 100
                   description: "Pagination limit. Default: 100."
+                  example: 100
                 offset:
                   type: integer
                   default: 0
                   description: "Pagination offset. Default: 0."
+                  example: 0
                 ticker:
                   type: string
                   description: "Filter by currency [ticker](/glossary#ticker). Example: USDT."
+                  example: "USDT"
                 plan:
                   type: string
                   description: Filter by plan ID (UUID).
+                  example: "8f2e9d3c-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
                 investment:
                   type: string
                   description: Filter by investment ID.
+                  example: "inv_7e2d9c3b-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
                 investmentStatus:
                   type: integer
                   description: Filter by status (1=ACTIVE, 0=CLOSED).
                   enum: [0, 1]
+                  example: 1
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             example:
               limit: 100
               offset: 0
@@ -3203,36 +3316,46 @@ paths:
                   type: integer
                   default: 50
                   description: Pagination limit.
+                  example: 50
                 offset:
                   type: integer
                   default: 0
                   description: Pagination offset.
+                  example: 0
                 plan:
                   type: string
                   description: Filter by plan ID (UUID).
+                  example: "8f2e9d3c-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
                 investment:
                   type: string
                   description: Filter by investment ID.
+                  example: "inv_7e2d9c3b-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
                 transaction:
                   type: string
                   description: Filter by transaction ID.
+                  example: "tx_9f3e0d4c-2b5c-4d3e-8f6g-7a8b9c0d1e2f"
                 dateFrom:
                   type: integer
                   description: Filter from date (timestamp).
+                  example: 1640995200
                 dateTo:
                   type: integer
                   description: Filter to date (timestamp).
+                  example: 1641081600
                 actionTypes:
                   type: array
                   items:
                     type: integer
                   description: Array of operation type IDs. See table below.
+                  example: [1, 2, 4]
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             example:
               limit: 50
               offset: 0
@@ -3321,31 +3444,40 @@ paths:
                   type: integer
                   default: 50
                   description: Pagination limit.
+                  example: 50
                 offset:
                   type: integer
                   default: 0
                   description: Pagination offset.
+                  example: 0
                 plan:
                   type: string
                   description: Filter by plan ID (UUID).
+                  example: "8f2e9d3c-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
                 investment:
                   type: string
                   description: Filter by investment ID.
+                  example: "inv_7e2d9c3b-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
                 transaction:
                   type: string
                   description: Filter by transaction ID.
+                  example: "tx_9f3e0d4c-2b5c-4d3e-8f6g-7a8b9c0d1e2f"
                 dateFrom:
                   type: integer
                   description: Filter from date (timestamp).
+                  example: 1640995200
                 dateTo:
                   type: integer
                   description: Filter to date (timestamp).
+                  example: 1641081600
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             example:
               limit: 50
               offset: 0
@@ -3430,19 +3562,24 @@ paths:
                 plan:
                   type: string
                   description: Plan external ID (UUID).
+                  example: "8f2e9d3c-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
                 amount:
                   type: string
                   description: Investment amount.
+                  example: "1000.500000"
                 withReinvest:
                   type: boolean
                   default: false
                   description: Enable auto-reinvestment.
+                  example: true
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             example:
               plan: "8f2e9d3c-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
               amount: "1000.500000"
@@ -3529,15 +3666,19 @@ paths:
                 plan:
                   type: string
                   description: Plan external ID (UUID).
+                  example: "8f2e9d3c-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
                 amount:
                   type: string
                   description: Withdrawal amount.
+                  example: "500.250000"
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             example:
               plan: "8f2e9d3c-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
               amount: "500.250000"
@@ -3619,12 +3760,15 @@ paths:
                 plan:
                   type: string
                   description: Plan external ID (UUID).
+                  example: "8f2e9d3c-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             example:
               plan: "8f2e9d3c-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
               request: "{{request}}"
@@ -3703,16 +3847,20 @@ paths:
                 plan:
                   type: string
                   description: Plan external ID (UUID).
+                  example: "8f2e9d3c-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
                 enabled:
                   type: boolean
                   default: false
                   description: Enable or disable auto-reinvestment.
+                  example: true
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             example:
               plan: "8f2e9d3c-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
               enabled: true
@@ -3786,9 +3934,11 @@ paths:
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
       responses:
         "200":
           description: Successful response
@@ -3834,12 +3984,15 @@ paths:
                 alias:
                   type: string
                   description: Name for sub-account
+                  example: "trading_bot"
                 email:
                   type: string
                   description: Sub-account email (required when shareKyc is false)
+                  example: "sub@example.com"
                 shareKyc:
                   type: boolean
                   description: If KYC shared with main account
+                  example: false
                 permissions:
                   type: object
                   required:
@@ -3849,9 +4002,11 @@ paths:
                     spotEnabled:
                       type: boolean
                       description: Enable transfers to trade balance
+                      example: true
                     collateralEnabled:
                       type: boolean
                       description: Enable transfers to collateral balance
+                      example: false
       responses:
         "201":
           description: Sub-account created successfully
@@ -3910,6 +4065,7 @@ paths:
                 id:
                   type: string
                   description: Sub-account id
+                  example: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
             example:
               id: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
       responses:
@@ -3957,9 +4113,11 @@ paths:
                 id:
                   type: string
                   description: Sub-account id
+                  example: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
                 alias:
                   type: string
                   description: Name for sub-account
+                  example: "training"
                 permissions:
                   type: object
                   required:
@@ -3969,9 +4127,11 @@ paths:
                     spotEnabled:
                       type: boolean
                       description: Enable transfers to trade balance
+                      example: true
                     collateralEnabled:
                       type: boolean
                       description: Enable transfers to collateral balance
+                      example: false
             example:
               id: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
               alias: training
@@ -4019,16 +4179,19 @@ paths:
                 search:
                   type: string
                   description: Search term
+                  example: "trading"
                 limit:
                   type: integer
                   minimum: 1
                   maximum: 100
                   default: 30
+                  example: 30
                 offset:
                   type: integer
                   minimum: 0
                   maximum: 10000
                   default: 0
+                  example: 0
       responses:
         "200":
           description: Successful response
@@ -4083,16 +4246,20 @@ paths:
                 id:
                   type: string
                   description: Sub-account id
+                  example: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
                 direction:
                   type: string
                   enum: [main_to_sub, sub_to_main]
                   description: Transfer direction
+                  example: "main_to_sub"
                 amount:
                   type: string
                   description: Transfer amount (min 0.00000001)
+                  example: "0.5"
                 ticker:
                   type: string
                   description: "Currency's [ticker](/glossary#ticker)"
+                  example: "ETH"
       responses:
         "200":
           description: Transfer successful
@@ -4139,6 +4306,7 @@ paths:
                 id:
                   type: string
                   description: Sub-account id
+                  example: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
             example:
               id: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
       responses:
@@ -4184,6 +4352,7 @@ paths:
                 id:
                   type: string
                   description: Sub-account id
+                  example: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
             example:
               id: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
       responses:
@@ -4229,9 +4398,11 @@ paths:
                 id:
                   type: string
                   description: Sub-account id
+                  example: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
                 ticker:
                   type: string
                   description: Currency's ticker (if not provided, returns data by all currencies)
+                  example: "USDC"
             example:
               id: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
               ticker: USDC
@@ -4298,20 +4469,24 @@ paths:
                 id:
                   type: string
                   description: Sub-account id
+                  example: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
                 direction:
                   type: string
                   enum: [main_to_sub, sub_to_main]
                   description: Transfer direction (optional)
+                  example: "main_to_sub"
                 limit:
                   type: integer
                   minimum: 1
                   maximum: 100
                   default: 30
+                  example: 30
                 offset:
                   type: integer
                   minimum: 0
                   maximum: 10000
                   default: 0
+                  example: 0
       responses:
         "200":
           description: Successful response
@@ -4361,12 +4536,15 @@ paths:
                   type: integer
                   description: Type of API key (1 - info and trading; 2 - info, trading, deposits, withdraws)
                   enum: [1, 2]
+                  example: 1
                 subAccountId:
                   type: string
                   description: ID of the sub-account to create the API key for
+                  example: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
                 title:
                   type: string
                   description: Custom title/name for the API key
+                  example: "Trading Bot Key"
       responses:
         "201":
           description: API key created successfully
@@ -4411,9 +4589,11 @@ paths:
                 apiKeyId:
                   type: string
                   description: ID of the API key to update
+                  example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
                 title:
                   type: string
                   description: New title for the API key
+                  example: "Trading Bot Key"
                 urls:
                   type: array
                   description: Array of URL objects for API key restrictions
@@ -4422,8 +4602,10 @@ paths:
                     properties:
                       url:
                         type: string
+                        example: "/api/v4/main-account/balance"
                       enable:
                         type: boolean
+                        example: true
             example:
               apiKeyId: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
               title: Trading Bot Key
@@ -4475,6 +4657,7 @@ paths:
                 apiKeyId:
                   type: string
                   description: ID of the API key to delete
+                  example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
             example:
               apiKeyId: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
       responses:
@@ -4519,16 +4702,19 @@ paths:
                 subAccountId:
                   type: string
                   description: ID of the sub-account to list API keys for
+                  example: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
                 limit:
                   type: integer
                   minimum: 1
                   maximum: 100
                   default: 30
+                  example: 30
                 offset:
                   type: integer
                   minimum: 0
                   maximum: 10000
                   default: 0
+                  example: 0
       responses:
         "200":
           description: Successful response
@@ -4580,6 +4766,7 @@ paths:
                 apiKeyId:
                   type: string
                   description: ID of the API key to reset
+                  example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
             example:
               apiKeyId: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
       responses:
@@ -4625,6 +4812,7 @@ paths:
                 apiKeyId:
                   type: string
                   description: ID of the API key to list IP addresses for
+                  example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
       responses:
         "200":
           description: Successful response
@@ -4673,9 +4861,11 @@ paths:
                 apiKeyId:
                   type: string
                   description: ID of the API key to add IP address to
+                  example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
                 ip:
                   type: string
                   description: IP address to add to allowed list
+                  example: "192.168.1.100"
       responses:
         "201":
           description: IP address added successfully
@@ -4724,9 +4914,11 @@ paths:
                 apiKeyId:
                   type: string
                   description: ID of the API key to remove IP address from
+                  example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
                 ip:
                   type: string
                   description: IP address to remove from allowed list
+                  example: "192.168.1.100"
       responses:
         "200":
           description: IP address removed successfully
@@ -4772,22 +4964,27 @@ paths:
                 account:
                   type: string
                   description: Mining pool account
+                  example: "miner123"
                 from:
                   type: integer
                   description: Date timestamp starting from which rewards are received
+                  example: 1640995200
                 to:
                   type: integer
                   description: Date timestamp until which rewards are received
+                  example: 1641081600
                 limit:
                   type: integer
                   minimum: 1
                   maximum: 100
                   default: 30
+                  example: 30
                 offset:
                   type: integer
                   minimum: 0
                   maximum: 10000
                   default: 0
+                  example: 0
       responses:
         "200":
           description: Successful response
@@ -4847,17 +5044,21 @@ paths:
                 account:
                   type: string
                   description: Mining pool account
+                  example: "miner123"
                 from:
                   type: integer
                   description: Unix timestamp of starting point
+                  example: 1640995200
                 to:
                   type: integer
                   description: Unix timestamp of final point
+                  example: 1641081600
                 interval:
                   type: string
                   enum: [5m, 1h, 24h]
                   default: 1h
                   description: Timestamp interval
+                  example: "1h"
       responses:
         "200":
           description: Successful response
@@ -4925,9 +5126,11 @@ paths:
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
       responses:
         "200":
           description: Successful response
@@ -5023,27 +5226,35 @@ components:
         ticker:
           type: string
           description: "Currencies [ticker](/glossary#ticker). Example: BTC ⚠️ Currencies ticker must have \"can_deposit\" status equal to \"true\". Use [Asset Status endpoint](/public/http-v4/asset-status-list) to know more about currency."
+          example: "ETH"
         amount:
           type: string
           description: "Withdraw amount (including [fee](/glossary#fee)). To add the fee to the specified amount, use the /main-account/withdraw-pay request"
+          example: "0.9"
         address:
           type: string
           description: "Target address (wallet address for cryptocurrencies, identifier/[card token](/glossary#card-token) for [fiat](/glossary#fiat) currencies)"
+          example: "0x0964A6B8F794A4B8d61b62652dB27ddC9844FB4c"
         memo:
           type: string
           description: "Required if currency is memoable. See [memo](/glossary#memodestination-tag) for details."
+          example: "48565488244493"
         uniqueId:
           type: string
           description: "Unique transaction identifier. ⚠️ Generate a new unique ID for each withdrawal request."
+          example: "24529041"
         provider:
           type: string
           description: "[Fiat](/glossary#fiat) currency [provider](/glossary#provider). Example: VISAMASTER ⚠️ Currency provider should be taken from [Asset Status endpoint](/public/http-v4/asset-status-list) response. Required if currency is fiat."
+          example: "VISAMASTER"
         network:
           type: string
           description: "Cryptocurrency network. Available for [multinetwork](/glossary#multinetwork) currencies. Example: OMNI ⚠️ Currency network should be taken from [Asset Status endpoint](/public/http-v4/asset-status-list) response. Default for USDT is ERC20"
+          example: "ERC20"
         partialEnable:
           type: boolean
           description: "Optional parameter for [FIAT](/glossary#fiat) withdrawals with increased Maximum Limit if set as \"true\". To use this parameter, the application must support \"Partially successful\" withdrawal status and latest updates in deposit/withdrawal history."
+          example: false
         beneficiary:
           type: object
           description: "Beneficiary information data. Required if currency [ticker](/glossary#ticker) is one of: UAH_IBAN, USD_VISAMASTER, EUR_VISAMASTER, USD, EUR"
@@ -5053,9 +5264,11 @@ components:
         request:
           type: string
           description: "Request signature"
+          example: "{{request}}"
         nonce:
           type: string
           description: "Unique request identifier"
+          example: "{{nonce}}"
 
     TransactionHistory:
       type: object
@@ -5063,47 +5276,61 @@ components:
         address:
           type: string
           description: Deposit/Withdraw address
+          example: "3ApEASLcrQtZpg1TsssFgYF5V5YQJAKvuE"
         uniqueId:
           type: string
           nullable: true
           description: Unique Id of deposit/withdraw
+          example: null
         createdAt:
           type: integer
           description: Timestamp of deposit/withdraw
+          example: 1593437922
         currency:
           type: string
           description: Deposit/Withdraw currency full name
+          example: "Bitcoin"
         ticker:
           type: string
           description: "Deposit/Withdraw currency [ticker](/glossary#ticker)"
+          example: "BTC"
         method:
           type: integer
           description: "Called method: 1 - deposit, 2 - withdraw"
+          example: 1
         amount:
           type: string
           description: Amount of deposit/withdraw
+          example: "0.0006"
         description:
           type: string
           description: Deposit/Withdraw description
+          example: ""
         memo:
           type: string
           description: "[Memo](/glossary#memodestination-tag) for deposit/withdraw"
+          example: ""
         fee:
           type: string
           description: "[Fee](/glossary#fee) for deposit/withdraw"
+          example: "0"
         status:
           type: integer
           description: Transaction status (see endpoint description for status codes)
+          example: 15
         network:
           type: string
           nullable: true
           description: Network if currency is multinetwork
+          example: null
         transactionHash:
           type: string
           description: Deposit/Withdraw transaction hash
+          example: "3b49d7b8cf7a4d3c1234567890abcdef"
         transactionId:
           type: string
           description: Transaction ID
+          example: "tx-id-1234"
         details:
           type: object
           nullable: true
@@ -5116,9 +5343,11 @@ components:
             actual:
               type: integer
               description: Actual number of confirmations
+              example: 3
             required:
               type: integer
               description: Required number of confirmations
+              example: 6
 
     CodeInfo:
       type: object
@@ -5126,21 +5355,27 @@ components:
         amount:
           type: string
           description: "Code amount"
+          example: "100"
         code:
           type: string
           description: "WhiteBIT code"
+          example: "WBe50fbe4d5d...ee33"
         date:
           type: integer
           description: "Code creation timestamp"
+          example: 1598296132
         status:
           type: string
           description: "Code status"
+          example: "active"
         ticker:
           type: string
           description: "Code [ticker](/glossary#ticker)"
+          example: "USDT"
         external_id:
           type: string
           description: "Code external identifier"
+          example: "id1"
 
     CodeHistory:
       type: object
@@ -5148,21 +5383,27 @@ components:
         amount:
           type: string
           description: "Code amount change (- is created, + is applied)"
+          example: "-100"
         code:
           type: string
           description: "WhiteBIT code"
+          example: "WBe50fbe4d5d...ee33"
         date:
           type: integer
           description: "Code activation timestamp (for applied) or code creation timestamp (for created)"
+          example: 1598296132
         status:
           type: string
           description: "Current code status"
+          example: "applied"
         ticker:
           type: string
           description: "Code [ticker](/glossary#ticker)"
+          example: "USDT"
         external_id:
           type: string
           description: "Code external identifier"
+          example: "id1"
 
     FixedPlan:
       type: object
@@ -5170,33 +5411,43 @@ components:
         id:
           type: string
           description: Invest plan identifier
+          example: "1"
         ticker:
           type: string
           description: Source currency ticker
+          example: "BTC"
         status:
           type: integer
           description: Status (1 - active, 2 - no coins left, 3 - inactive, 4 - pause)
+          example: 1
         percent:
           type: string
           description: Interest percent
+          example: "0.01"
         duration:
           type: integer
           description: Investment duration (in minutes)
+          example: 40320
         interestTicker:
           type: string
           description: Target currency ticker
+          example: "BTC"
         interestRatio:
           type: string
           description: Target currency to source currency ratio
+          example: "1"
         minInvestment:
           type: string
           description: "Minimum investment amount"
+          example: "100"
         maxInvestment:
           type: string
           description: "Maximum investment amount"
+          example: "10000"
         maxPossibleInvestment:
           type: string
           description: "Maximum investment amount due to current invest plan state"
+          example: "3000"
 
     Investment:
       type: object
@@ -5204,27 +5455,34 @@ components:
         id:
           type: string
           description: "Investment identifier"
+          example: "1232"
         plan:
           $ref: "#/components/schemas/FixedPlan"
           description: "Investment plan (similar to Get plans response)"
         status:
           type: integer
           description: "Investment status (1 - active, 2 - closed)"
+          example: 1
         created:
           type: integer
           description: "Timestamp of investment creation"
+          example: 1588345560
         updated:
           type: integer
           description: "Timestamp of investment update"
+          example: 1588345560
         paymentTime:
           type: integer
           description: "Timestamp of the payment time"
+          example: 1588345560
         amount:
           type: string
           description: "Investment amount"
+          example: "100"
         interestPaid:
           type: string
           description: "Interest paid amount"
+          example: "0.01"
 
     InterestPayment:
       type: object
@@ -5232,18 +5490,23 @@ components:
         planId:
           type: string
           description: "Invest plan identifier"
+          example: "1"
         investmentId:
           type: string
           description: "Investment identifier"
+          example: "1232"
         amount:
           type: string
           description: "Interest amount"
+          example: "0.01"
         ticker:
           type: string
           description: "Interest currency [ticker](/glossary#ticker)"
+          example: "BTC"
         timestamp:
           type: integer
           description: "Transaction timestamp"
+          example: 1588345560
 
     FlexPlan:
       type: object
@@ -5251,18 +5514,23 @@ components:
         id:
           type: string
           description: "Flex plan identifier"
+          example: "12"
         ticker:
           type: string
           description: "Currency [ticker](/glossary#ticker)"
+          example: "USDT"
         minInvestment:
           type: string
           description: "Minimum investment amount"
+          example: "10.0"
         maxInvestment:
           type: string
           description: "Maximum investment amount"
+          example: "100000.0"
         maxRate:
           type: string
           description: "Maximum interest rate"
+          example: "0.0030"
 
     FlexInvestment:
       type: object
@@ -5270,27 +5538,35 @@ components:
         id:
           type: string
           description: "Flex investment identifier"
+          example: "2765"
         planId:
           type: string
           description: "Flex plan identifier"
+          example: "12"
         currency:
           type: string
           description: "Investment currency"
+          example: "USDT"
         invested:
           type: string
           description: "Invested amount"
+          example: "100"
         withAutoReinvest:
           type: boolean
           description: "Auto-reinvestment enabled"
+          example: true
         status:
           type: integer
           description: "Investment status (1=ACTIVE, 0=CLOSED)"
+          example: 1
         createdAt:
           type: integer
           description: "Investment creation timestamp"
+          example: 1588345560
         updatedAt:
           type: integer
           description: "Investment last update timestamp"
+          example: 1588345560
 
     FlexInvestmentHistory:
       type: object
@@ -5298,24 +5574,31 @@ components:
         createdAt:
           type: integer
           description: "Transaction creation timestamp"
+          example: 1588345560
         planId:
           type: string
           description: "Flex plan identifier"
+          example: "12"
         investmentId:
           type: string
           description: "Flex investment identifier"
+          example: "2765"
         currency:
           type: string
           description: "Transaction currency"
+          example: "USDT"
         amount:
           type: string
           description: "Transaction amount"
+          example: "100"
         transactionId:
           type: string
           description: "Transaction identifier"
+          example: "tx_123456"
         actionType:
           type: integer
           description: "Action type: 1-INVEST, 2-REINVEST, 3-WITHDRAW_FROM_INVESTMENT, 4-DAILY_EARNING, 5-CLOSE_INVESTMENT, 6-OPEN_INVESTMENT"
+          example: 1
 
     FeeInfo:
       type: object
@@ -5323,15 +5606,19 @@ components:
         ticker:
           type: string
           description: "Currency [ticker](/glossary#ticker)"
+          example: "ETH"
         name:
           type: string
           description: "Currency name"
+          example: "Ethereum"
         can_deposit:
           type: string
           description: "Deposit status (currency availability)"
+          example: "1"
         can_withdraw:
           type: string
           description: "Withdrawal status (currency availability)"
+          example: "1"
         deposit:
           type: object
           description: "Deposit fees and limits"
@@ -5339,21 +5626,27 @@ components:
             minFlex:
               type: string
               description: "Minimum fee amount when flex fee is enabled"
+              example: "0"
             maxFlex:
               type: string
               description: "Maximum fee amount when flex fee is enabled"
+              example: "0"
             percentFlex:
               type: string
               description: "Flex fee percent"
+              example: "0"
             fixed:
               type: string
               description: "Fixed fee"
+              example: "0"
             minAmount:
               type: string
               description: "Minimum deposit amount"
+              example: "0.01"
             maxAmount:
               type: string
               description: "Maximum deposit amount"
+              example: "0"
         withdraw:
           type: object
           description: "Withdrawal fees and limits"
@@ -5361,21 +5654,27 @@ components:
             minFlex:
               type: string
               description: "Minimum fee amount when flex fee is enabled"
+              example: "0"
             maxFlex:
               type: string
               description: "Maximum fee amount when flex fee is enabled"
+              example: "0"
             percentFlex:
               type: string
               description: "Flex fee percent"
+              example: "0"
             fixed:
               type: string
               description: "Fixed fee"
+              example: "0.0004"
             minAmount:
               type: string
               description: "Minimum withdrawal amount"
+              example: "0.01"
             maxAmount:
               type: string
               description: "Maximum withdrawal amount"
+              example: "0"
 
     SubAccount:
       type: object
@@ -5383,21 +5682,27 @@ components:
         id:
           type: string
           description: "Sub-account identifier"
+          example: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
         alias:
           type: string
           description: "Sub-account alias/name"
+          example: "trading_bot"
         userId:
           type: string
           description: "User identifier associated with account"
+          example: "u-12345"
         email:
           type: string
           description: "Sub-account email (masked)"
+          example: "s***@example.com"
         status:
           type: string
           description: "Sub-account status"
+          example: "active"
         color:
           type: string
           description: "Sub-account color"
+          example: "#FF5733"
         kyc:
           type: object
           description: "KYC information"
@@ -5405,9 +5710,11 @@ components:
             shareKyc:
               type: boolean
               description: "Whether KYC is shared with main account"
+              example: false
             kycStatus:
               type: string
               description: "KYC status"
+              example: "verified"
         permissions:
           type: object
           description: "Sub-account permissions"
@@ -5415,9 +5722,11 @@ components:
             spotEnabled:
               type: boolean
               description: "Spot trading enabled"
+              example: true
             collateralEnabled:
               type: boolean
               description: "Collateral trading enabled"
+              example: false
 
     SubAccountTransfer:
       type: object
@@ -5425,22 +5734,28 @@ components:
         transactionId:
           type: string
           description: "Transaction identifier. Same value as id. Correlate with the transfer endpoint response using the transactionId field."
+          example: "tx-abc123"
         id:
           type: string
           description: "Transfer identifier"
           deprecated: true
+          example: "tx-abc123"
         direction:
           type: string
           description: "Transfer direction (main_to_sub or sub_to_main)"
+          example: "main_to_sub"
         currency:
           type: string
           description: "Currency transferred"
+          example: "ETH"
         amount:
           type: string
           description: "Transfer amount"
+          example: "0.5"
         createdAt:
           type: integer
           description: "Transfer creation timestamp"
+          example: 1641081600
 
     SubAccountApiKey:
       type: object
@@ -5448,30 +5763,39 @@ components:
         subAccountId:
           type: string
           description: "Sub-account identifier"
+          example: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
         id:
           type: string
           description: "API key identifier"
+          example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
         title:
           type: string
           description: "API key title/name"
+          example: "Trading Bot Key"
         isEnabled:
           type: boolean
           description: "Whether the API key is enabled"
+          example: true
         apiKey:
           type: string
           description: "API key"
+          example: "pub-key-abc123"
         apiSecret:
           type: string
           description: "API secret"
+          example: "secret-xyz789"
         type:
           type: integer
           description: "API key type (1 - info and trading, 2 - info, trading, deposit and withdraw)"
+          example: 1
         lastActivity:
           type: integer
           description: "Last activity timestamp"
+          example: 1641081600
         restrictAccess:
           type: boolean
           description: "Whether access is restricted"
+          example: false
         accessEndpoints:
           type: array
           description: "List of allowed endpoints"
@@ -5481,32 +5805,43 @@ components:
               name:
                 type: string
                 description: "Endpoint name"
+                example: "/api/v4/main-account/balance"
               title:
                 type: string
                 description: "Endpoint title"
+                example: "Get Balance"
 
     SubAccountApiKeyList:
       type: object
       properties:
         subAccountId:
           type: string
+          example: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
         id:
           type: string
+          example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
         title:
           type: string
+          example: "Trading Bot Key"
         isEnabled:
           type: boolean
+          example: true
         apiKey:
           type: string
+          example: "pub-key-abc123"
         apiSecret:
           type: string
           description: Empty for security (only shown during creation)
+          example: ""
         type:
           type: string
+          example: "1"
         lastActivity:
           type: integer
+          example: 1641081600
         restrictAccess:
           type: boolean
+          example: false
         accessEndpoints:
           type: array
           items:
@@ -5514,8 +5849,10 @@ components:
             properties:
               name:
                 type: string
+                example: "/api/v4/main-account/balance"
               title:
                 type: string
+                example: "Get Balance"
 
     MiningReward:
       type: object
@@ -5523,41 +5860,56 @@ components:
         miningAccountName:
           type: string
           description: "Mining account name"
+          example: "miner123"
         totalReward:
           type: string
           description: "Total reward amount"
+          example: "0.00125"
         reward:
           type: string
           description: "Reward amount (without fee)"
+          example: "0.001"
         fee:
           type: string
           description: "Fee amount"
+          example: "0.00025"
         fppsRate:
           type: string
           description: "FPPS rate"
+          example: "0.000125"
         hashRate:
           type: string
           description: "Hash rate"
+          example: "100TH/s"
         date:
           type: integer
           description: "Reward date timestamp"
+          example: 1641081600
 
     CreditLine:
       type: object
       properties:
         asset:
           type: string
+          example: "BTC"
         amount:
           type: string
+          example: "1.5"
         totalFunding:
           type: string
+          example: "0.5"
         currentLtv:
           type: string
+          example: "25"
         initialLtv:
           type: string
+          example: "60"
         marginCallLtv:
           type: string
+          example: "75"
         liquidationLtv:
           type: string
+          example: "85"
         createdAt:
-          type: integer
\ No newline at end of file
+          type: integer
+          example: 1715339355
\ No newline at end of file

From eedcfc792e9ec4ff6c9980557306faec310eec98 Mon Sep 17 00:00:00 2001
From: whitebit-robot 
Date: Fri, 6 Mar 2026 08:16:46 +0200
Subject: [PATCH 46/84] DV-16: update logo redirect to documentation home

---
 docs.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs.json b/docs.json
index 7bf7d58..e2f6902 100644
--- a/docs.json
+++ b/docs.json
@@ -424,7 +424,7 @@
   "logo": {
     "light": "/logo/light.svg",
     "dark": "/logo/dark.svg",
-    "href": "https://whitebit.com"
+    "href": "/"
   },
   "navbar": {
     "links": [

From 8bf28badde404bf9011c12ab142141c3fc9aa04e Mon Sep 17 00:00:00 2001
From: whitebit-robot 
Date: Fri, 6 Mar 2026 10:51:45 +0100
Subject: [PATCH 47/84] DV-43: Added new docs according to provided
 documentaion

---
 .../get-mining-account-hashrate.mdx           |   5 -
 api-reference/account-wallet/get-rewards.mdx  |   5 -
 .../market-data/mining-pool-overview.mdx      |   4 -
 api-reference/overview.mdx                    |   5 +-
 changelog.mdx                                 |  43 ++
 docs.json                                     |  26 +-
 openapi/private/main_api_v4.yaml              | 570 ++++++++++++++++++
 7 files changed, 634 insertions(+), 24 deletions(-)
 delete mode 100644 api-reference/account-wallet/get-mining-account-hashrate.mdx
 delete mode 100644 api-reference/account-wallet/get-rewards.mdx
 delete mode 100644 api-reference/market-data/mining-pool-overview.mdx

diff --git a/api-reference/account-wallet/get-mining-account-hashrate.mdx b/api-reference/account-wallet/get-mining-account-hashrate.mdx
deleted file mode 100644
index 4e22ff3..0000000
--- a/api-reference/account-wallet/get-mining-account-hashrate.mdx
+++ /dev/null
@@ -1,5 +0,0 @@
----
-title: "Get Mining Account Hashrate"
-openapi: /openapi/private/main_api_v4.yaml POST /api/v4/mining/hashrate
----
-
diff --git a/api-reference/account-wallet/get-rewards.mdx b/api-reference/account-wallet/get-rewards.mdx
deleted file mode 100644
index f5e196c..0000000
--- a/api-reference/account-wallet/get-rewards.mdx
+++ /dev/null
@@ -1,5 +0,0 @@
----
-title: "Get Rewards"
-openapi: /openapi/private/main_api_v4.yaml POST /api/v4/mining/rewards
----
-
diff --git a/api-reference/market-data/mining-pool-overview.mdx b/api-reference/market-data/mining-pool-overview.mdx
deleted file mode 100644
index c45736c..0000000
--- a/api-reference/market-data/mining-pool-overview.mdx
+++ /dev/null
@@ -1,4 +0,0 @@
----
-title: "Mining Pool Overview"
-openapi: "/openapi/public/http-v4.yaml GET /api/v4/public/mining-pool"
----
diff --git a/api-reference/overview.mdx b/api-reference/overview.mdx
index 1a32cc8..55b9f29 100644
--- a/api-reference/overview.mdx
+++ b/api-reference/overview.mdx
@@ -187,7 +187,10 @@ All V4 endpoints return errors as JSON. The format differs slightly between publ
     Estimate, confirm, and review currency conversion operations.
   
   
-    Main balance, deposits, withdrawals, transfers, codes, crypto lending, fees, and mining pool.
+    Main balance, deposits, withdrawals, transfers, codes, crypto lending, and fees.
+  
+  
+    Monitor mining operations, manage payouts, track worker performance, and create watcher links.
   
   
     Create and manage sub-accounts, balances, transfers, and API keys.
diff --git a/changelog.mdx b/changelog.mdx
index a143e90..9fe94ad 100644
--- a/changelog.mdx
+++ b/changelog.mdx
@@ -6,6 +6,49 @@ description: "Track all updates, improvements, and fixes to the WhiteBIT API Pla
 
 ## Previous Changes
 
+
+## Mining Pool API
+**Comprehensive mining pool management endpoints**
+
+Introduced a complete Mining Pool API with 10 endpoints for managing mining operations, including account monitoring, payout configuration, worker management, and watcher link generation.
+
+**Public endpoints:**
+- Pool statistics and connection information
+
+**Mining account management:**
+- Reward history with pagination
+- Account-level hashrate monitoring with configurable intervals (5m, 1h, 24h)
+- Fee and stratum connection details
+
+**Payout configuration:**
+- Get and set payout destination (main balance or external BTC address)
+- Support for all standard Bitcoin address formats
+
+**Worker monitoring:**
+- List online workers with pagination
+- Individual worker hashrate history
+
+**Watcher links:**
+- Create read-only access links with granular permissions (dashboard, rewards, workers)
+- Configurable expiration periods (1h, 24h, 7d, always)
+- List active watcher links
+
+All authenticated endpoints require the MINING_POOL feature to be enabled on the API key.
+
+
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+
+
+
 
 ## API Documentation Updates
 **Sub-account transfer endpoints: add transactionId for correlation**
diff --git a/docs.json b/docs.json
index 7bf7d58..119508d 100644
--- a/docs.json
+++ b/docs.json
@@ -140,8 +140,7 @@
                   "api-reference/market-data/fee",
                   "api-reference/market-data/funding-history"
                 ]
-              },
-              "api-reference/market-data/mining-pool-overview"
+              }
             ]
           },
           {
@@ -300,13 +299,6 @@
                   "api-reference/account-wallet/update-flex-auto-reinvestment"
                 ]
               },
-              {
-                "group": "Mining Pool",
-                "pages": [
-                  "api-reference/account-wallet/get-rewards",
-                  "api-reference/account-wallet/get-mining-account-hashrate"
-                ]
-              },
               {
                 "group": "Fees & Credit",
                 "pages": [
@@ -355,6 +347,22 @@
               }
             ]
           },
+          {
+            "group": "Mining Pool",
+            "icon": "pickaxe",
+            "pages": [
+              "api-reference/mining-pool/pool-overview",
+              "api-reference/mining-pool/get-rewards",
+              "api-reference/mining-pool/account-hashrate",
+              "api-reference/mining-pool/get-payout-destination",
+              "api-reference/mining-pool/set-payout-destination",
+              "api-reference/mining-pool/miner-info",
+              "api-reference/mining-pool/worker-names",
+              "api-reference/mining-pool/worker-hashrate",
+              "api-reference/mining-pool/create-watcher-link",
+              "api-reference/mining-pool/list-watcher-links"
+            ]
+          },
           {
             "group": "OAuth",
             "icon": "key",
diff --git a/openapi/private/main_api_v4.yaml b/openapi/private/main_api_v4.yaml
index 809bd22..0c5c587 100644
--- a/openapi/private/main_api_v4.yaml
+++ b/openapi/private/main_api_v4.yaml
@@ -5096,6 +5096,576 @@ paths:
                 code: 422
                 message: "Incorrect timestamp"
 
+  /api/v4/mining/payout-destination:
+    post:
+      tags:
+        - Mining Pool
+      summary: Get Payout Destination
+      description: |
+        Returns the current payout destination setting for a specific mining account belonging to the authenticated user.
+
+        
+        Rate limit: 1000 requests/10 sec.
+        
+      operationId: getMiningPayoutDestination
+      requestBody:
+        required: true
+        content:
+          application/json:
+            schema:
+              type: object
+              required:
+                - accountName
+              properties:
+                accountName:
+                  type: string
+                  description: Mining pool account name
+                  example: "my_miner_01"
+      responses:
+        "200":
+          description: Successful response
+          content:
+            application/json:
+              schema:
+                type: object
+                properties:
+                  payoutDestination:
+                    type: string
+                    enum: [main_balance, external_address]
+                    description: Payout destination type
+                  externalAddress:
+                    type: string
+                    nullable: true
+                    description: External BTC address (null if destination is main_balance)
+              example:
+                payoutDestination: "main_balance"
+                externalAddress: null
+        "400":
+          description: Validation failed
+          content:
+            application/json:
+              schema:
+                type: object
+                properties:
+                  code:
+                    type: integer
+                  message:
+                    type: string
+                  errors:
+                    type: object
+              example:
+                code: 0
+                message: "Validation failed"
+                errors:
+                  user: ["Mining account not found."]
+
+  /api/v4/mining/payout-destination/edit:
+    post:
+      tags:
+        - Mining Pool
+      summary: Set Payout Destination
+      description: |
+        Updates the payout destination for a specific mining account belonging to the authenticated user. Can be set to main balance or an external BTC address.
+
+        
+        Rate limit: 1000 requests/10 sec.
+        
+      operationId: setMiningPayoutDestination
+      requestBody:
+        required: true
+        content:
+          application/json:
+            schema:
+              type: object
+              required:
+                - accountName
+                - destination
+              properties:
+                accountName:
+                  type: string
+                  description: Mining pool account name
+                  example: "my_miner_01"
+                destination:
+                  type: string
+                  enum: [main_balance, external_address]
+                  description: Payout destination type
+                  example: "external_address"
+                address:
+                  type: string
+                  maxLength: 100
+                  description: External BTC address. Required when destination is external_address. Supports all standard Bitcoin address formats.
+                  example: "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh"
+      responses:
+        "200":
+          description: Successful response
+          content:
+            application/json:
+              schema:
+                type: object
+                properties:
+                  payoutDestination:
+                    type: string
+                    enum: [main_balance, external_address]
+                  externalAddress:
+                    type: string
+                    nullable: true
+              example:
+                payoutDestination: "external_address"
+                externalAddress: "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh"
+        "400":
+          description: Validation failed
+          content:
+            application/json:
+              schema:
+                type: object
+                properties:
+                  code:
+                    type: integer
+                  message:
+                    type: string
+                  errors:
+                    type: object
+              example:
+                code: 0
+                message: "Validation failed"
+                errors:
+                  user: ["Mining account not found."]
+
+  /api/v4/mining/miners/info:
+    post:
+      tags:
+        - Mining Pool
+      summary: Miner Info
+      description: |
+        Returns fee information and stratum connection details with worker counts for a specific mining account.
+
+        
+        Rate limit: 1000 requests/10 sec.
+        
+      operationId: getMiningMinerInfo
+      requestBody:
+        required: true
+        content:
+          application/json:
+            schema:
+              type: object
+              required:
+                - account
+              properties:
+                account:
+                  type: string
+                  maxLength: 255
+                  description: Mining pool account name
+                  example: "my_miner_01"
+      responses:
+        "200":
+          description: Successful response
+          content:
+            application/json:
+              schema:
+                type: object
+                properties:
+                  data:
+                    type: object
+                    properties:
+                      fee:
+                        type: string
+                        description: Fee percentage
+                      stratum:
+                        type: array
+                        items:
+                          type: object
+                          properties:
+                            url:
+                              type: string
+                            workersCount:
+                              type: integer
+              example:
+                data:
+                  fee: "2.5"
+                  stratum:
+                    - url: "stratum+tcp://pool.whitebit.com:3333"
+                      workersCount: 5
+                    - url: "stratum+tcp://pool.whitebit.com:3334"
+                      workersCount: 3
+        "400":
+          description: Validation failed
+          content:
+            application/json:
+              schema:
+                type: object
+                properties:
+                  code:
+                    type: integer
+                  message:
+                    type: string
+                  errors:
+                    type: object
+              example:
+                code: 0
+                message: "Validation failed"
+                errors:
+                  user: ["Mining pool account 'unknown_miner' not found"]
+
+  /api/v4/mining/workers/names:
+    post:
+      tags:
+        - Mining Pool
+      summary: Worker Names
+      description: |
+        Returns a paginated list of online worker names for a specific mining account.
+
+        
+        Rate limit: 1000 requests/10 sec.
+        
+      operationId: getMiningWorkerNames
+      requestBody:
+        required: true
+        content:
+          application/json:
+            schema:
+              type: object
+              required:
+                - account
+              properties:
+                account:
+                  type: string
+                  maxLength: 255
+                  description: Mining pool account name
+                  example: "my_miner_01"
+                offset:
+                  type: integer
+                  minimum: 0
+                  maximum: 10000
+                  default: 0
+                  description: Pagination offset
+                  example: 0
+                limit:
+                  type: integer
+                  minimum: 1
+                  maximum: 100
+                  default: 100
+                  description: Pagination limit
+                  example: 50
+      responses:
+        "200":
+          description: Successful response
+          content:
+            application/json:
+              schema:
+                type: object
+                properties:
+                  data:
+                    type: object
+                    properties:
+                      workers:
+                        type: array
+                        items:
+                          type: string
+                  limit:
+                    type: integer
+                  offset:
+                    type: integer
+              example:
+                data:
+                  workers: ["worker_001", "worker_002", "worker_003"]
+                limit: 50
+                offset: 0
+        "400":
+          description: Validation failed
+          content:
+            application/json:
+              schema:
+                type: object
+                properties:
+                  code:
+                    type: integer
+                  message:
+                    type: string
+                  errors:
+                    type: object
+              example:
+                code: 0
+                message: "Validation failed"
+                errors:
+                  user: ["Mining pool account 'unknown_miner' not found"]
+
+  /api/v4/mining/workers/hashrate:
+    post:
+      tags:
+        - Mining Pool
+      summary: Worker Hashrate History
+      description: |
+        Returns hashrate performance history for a specific worker on a mining account.
+
+        
+        Rate limit: 1000 requests/10 sec.
+        
+      operationId: getMiningWorkerHashrate
+      requestBody:
+        required: true
+        content:
+          application/json:
+            schema:
+              type: object
+              required:
+                - account
+                - worker
+              properties:
+                account:
+                  type: string
+                  maxLength: 255
+                  description: Mining pool account name
+                  example: "my_miner_01"
+                worker:
+                  type: string
+                  maxLength: 255
+                  description: Worker name
+                  example: "worker_001"
+                interval:
+                  type: string
+                  enum: [5m, 1h, 24h]
+                  default: 1h
+                  description: Time frame granularity
+                  example: "1h"
+                from:
+                  type: integer
+                  description: Start timestamp in Unix seconds. Must be <= now
+                  example: 1709290000
+                to:
+                  type: integer
+                  description: End timestamp in Unix seconds. Must be <= now
+                  example: 1709340000
+      responses:
+        "200":
+          description: Successful response
+          content:
+            application/json:
+              schema:
+                type: object
+                properties:
+                  data:
+                    type: object
+                    properties:
+                      hashrates:
+                        type: array
+                        items:
+                          type: object
+                          properties:
+                            time:
+                              type: integer
+                            hashrate:
+                              type: string
+                              description: Hashrate in TH/s
+              example:
+                data:
+                  hashrates:
+                    - time: 1709290000
+                      hashrate: "42.1"
+                    - time: 1709293600
+                      hashrate: "43.5"
+        "400":
+          description: Validation failed
+          content:
+            application/json:
+              schema:
+                type: object
+                properties:
+                  code:
+                    type: integer
+                  message:
+                    type: string
+                  errors:
+                    type: object
+              example:
+                code: 0
+                message: "Validation failed"
+                errors:
+                  user: ["Mining pool account 'unknown_miner' not found"]
+
+  /api/v4/mining/watcher-links/create:
+    post:
+      tags:
+        - Mining Pool
+      summary: Create Watcher Link
+      description: |
+        Creates a new watcher link for one or more mining accounts, granting specific permissions with a configurable expiration.
+
+        
+        Rate limit: 1000 requests/10 sec.
+        
+      operationId: createMiningWatcherLink
+      requestBody:
+        required: true
+        content:
+          application/json:
+            schema:
+              type: object
+              required:
+                - accounts
+                - name
+                - permissions
+                - liveUntil
+              properties:
+                accounts:
+                  type: array
+                  minItems: 1
+                  items:
+                    type: string
+                    maxLength: 255
+                  description: Array of mining account names
+                  example: ["my_miner_01", "my_miner_02"]
+                name:
+                  type: string
+                  maxLength: 255
+                  pattern: '^[a-zA-Z0-9_]+$'
+                  description: Link name (alphanumeric and underscores only)
+                  example: "monitoring_link"
+                permissions:
+                  type: array
+                  minItems: 1
+                  maxItems: 3
+                  items:
+                    type: string
+                    enum: [dashboard, rewards, workers]
+                  description: Array of permissions
+                  example: ["dashboard", "workers"]
+                liveUntil:
+                  type: string
+                  enum: [1h, 24h, 7d, always]
+                  description: Expiration period
+                  example: "7d"
+      responses:
+        "201":
+          description: Watcher link created successfully
+          content:
+            application/json:
+              schema:
+                type: object
+                properties:
+                  data:
+                    type: object
+                    properties:
+                      id:
+                        type: string
+                      link:
+                        type: string
+                      liveUntil:
+                        type: integer
+                        nullable: true
+                      createdAt:
+                        type: integer
+              example:
+                data:
+                  id: "abc123-external-id"
+                  link: "https://whitebit.com/mining-pool/watcher-link/abc123-external-id"
+                  liveUntil: 1709944800
+                  createdAt: 1709340000
+        "400":
+          description: Validation failed
+          content:
+            application/json:
+              schema:
+                type: object
+                properties:
+                  code:
+                    type: integer
+                  message:
+                    type: string
+                  errors:
+                    type: object
+              example:
+                code: 0
+                message: "Validation failed"
+                errors:
+                  user: ["Limit exceeded"]
+
+  /api/v4/mining/watcher-links/list:
+    post:
+      tags:
+        - Mining Pool
+      summary: List Watcher Links
+      description: |
+        Returns all active watcher links for a specific mining account.
+
+        
+        Rate limit: 1000 requests/10 sec.
+        
+      operationId: listMiningWatcherLinks
+      requestBody:
+        required: true
+        content:
+          application/json:
+            schema:
+              type: object
+              required:
+                - account
+              properties:
+                account:
+                  type: string
+                  maxLength: 255
+                  description: Mining pool account name
+                  example: "my_miner_01"
+      responses:
+        "200":
+          description: Successful response
+          content:
+            application/json:
+              schema:
+                type: object
+                properties:
+                  data:
+                    type: array
+                    items:
+                      type: object
+                      properties:
+                        id:
+                          type: string
+                        accounts:
+                          type: array
+                          items:
+                            type: string
+                        name:
+                          type: string
+                        link:
+                          type: string
+                        permissions:
+                          type: array
+                          items:
+                            type: string
+                        liveUntil:
+                          type: integer
+                          nullable: true
+                        createdAt:
+                          type: integer
+              example:
+                data:
+                  - id: "abc123-external-id"
+                    accounts: ["my_miner_01"]
+                    name: "monitoring_link"
+                    link: "https://whitebit.com/mining-pool/watcher-link/abc123-external-id"
+                    permissions: ["dashboard", "workers"]
+                    liveUntil: 1709944800
+                    createdAt: 1709340000
+        "400":
+          description: Validation failed
+          content:
+            application/json:
+              schema:
+                type: object
+                properties:
+                  code:
+                    type: integer
+                  message:
+                    type: string
+                  errors:
+                    type: object
+              example:
+                code: 0
+                message: "Validation failed"
+                errors:
+                  user: ["Mining pool account 'unknown_miner' not found"]
+
   /api/v4/credit-line/loans/info:
     post:
       tags:

From 0890a7c83130a11ee4b37ef84b06ec0418ac45ca Mon Sep 17 00:00:00 2001
From: whitebit-robot 
Date: Fri, 6 Mar 2026 11:08:44 +0100
Subject: [PATCH 48/84] DV-21: Openapi changed according to SDK validation

---
 openapi/private/http-trade-v4.yaml | 533 ++++-------------------------
 openapi/private/main_api_v4.yaml   | 402 +---------------------
 openapi/public/http-v4.yaml        |  95 +----
 3 files changed, 75 insertions(+), 955 deletions(-)

diff --git a/openapi/private/http-trade-v4.yaml b/openapi/private/http-trade-v4.yaml
index 5716562..b4d829c 100644
--- a/openapi/private/http-trade-v4.yaml
+++ b/openapi/private/http-trade-v4.yaml
@@ -12,9 +12,6 @@ info:
     
     Authentication required for all endpoints.
   version: 4.0.0
-  license:
-    name: WhiteBIT Terms of Service
-    url: https://whitebit.com/terms
 servers:
   - url: https://whitebit.com
     description: WhiteBIT Global Server
@@ -25,7 +22,6 @@ paths:
   /api/v4/collateral-account/balance:
     post:
       summary: Collateral Account Balance
-      operationId: collateralAccountBalance
       description: |
         The endpoint returns a current [collateral balance](/glossary#balance-collateral).
         
@@ -69,15 +65,9 @@ paths:
                 request:
                   type: string
                   description: Request signature
-                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
-                  example: "{{nonce}}"
-            example:
-              ticker: BTC
-              request: "{{request}}"
-              nonce: "{{nonce}}"
       responses:
         '200':
           description: Successful response - returns collateral balances by asset
@@ -105,7 +95,6 @@ paths:
   /api/v4/collateral-account/balance-summary:
     post:
       summary: Collateral Account Balance Summary
-      operationId: collateralAccountBalanceSummary
       description: |
         The endpoint retrieves collateral account balance summary with detailed breakdown per asset.
         
@@ -149,15 +138,9 @@ paths:
                 request:
                   type: string
                   description: Request signature
-                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
-                  example: "{{nonce}}"
-            example:
-              ticker: BTC
-              request: "{{request}}"
-              nonce: "{{nonce}}"
       responses:
         '200':
           description: Successful response - returns detailed balance information per asset
@@ -211,7 +194,6 @@ paths:
   /api/v4/order/collateral/limit:
     post:
       summary: Collateral Limit Order
-      operationId: createCollateralLimitOrder
       description: |
         The endpoint creates [limit order](/glossary#limit-order) using [collateral balance](/glossary#balance-collateral).
         
@@ -257,46 +239,37 @@ paths:
                 market:
                   type: string
                   description: "Available margin [market](/glossary#market). Example: BTC_USDT"
-                  example: "BTC_USDT"
                 side:
                   type: string
                   enum: [buy, sell]
                   description: "Order type. Variables: 'buy' / 'sell'. For open long position use **buy**, for short **sell**."
-                  example: "buy"
                 amount:
                   type: string
                   description: "Amount of [stock](/glossary#stock) currency to buy or sell."
-                  example: "0.01"
                 price:
                   type: string
                   description: "Price in [money](/glossary#money) currency. Example: '9800'"
-                  example: "40000"
                 clientOrderId:
                   type: string
                   description: "Identifier should be unique and contain letters, dashes, numbers, dots or underscores."
-                  example: "order1987111"
                 stopLoss:
                   type: string
                   description: |
                     Stop loss price.
 
                     When provided, the system creates an [OTO](/glossary#one-triggers-the-other-oto) order with a stop loss condition.
-                  example: "50000"
                 takeProfit:
                   type: string
                   description: |
                     Take profit price.
 
                     When provided, the system creates an [OTO](/glossary#one-triggers-the-other-oto) order with a take profit condition.
-                  example: "30000"
                 postOnly:
                   type: boolean
                   description: "Orders are guaranteed to be the [maker](/glossary#maker) order when [executed](/glossary#finished-orders)."
-                  example: false
                 ioc:
                   type: boolean
                   description: "An immediate or cancel order (IOC) is an order that attempts to execute all or part immediately and then cancels any unfilled portion."
-                  example: false
                 rpi:
                   type: boolean
                   description: |
@@ -306,29 +279,12 @@ paths:
                   example: true
                 positionSide:
                   type: string
-                  enum: [LONG, SHORT, BOTH]
+                  enum: [long, short, both]
                   description: "Defines the position direction when hedge mode is enabled. See [positionSide](/glossary#position-side)"
-                  example: "LONG"
                 request:
                   type: string
-                  example: "{{request}}"
                 nonce:
                   type: string
-                  example: "{{nonce}}"
-            example:
-              market: BTC_USDT
-              side: buy
-              amount: "0.01"
-              price: "40000"
-              postOnly: false
-              ioc: false
-              clientOrderId: order1987111
-              stopLoss: "50000"
-              takeProfit: "30000"
-              positionSide: LONG
-              rpi: true
-              request: "{{request}}"
-              nonce: "{{nonce}}"
       responses:
         '200':
           description: Successful response - order created
@@ -464,7 +420,6 @@ paths:
   /api/v4/order/collateral/bulk:
     post:
       summary: Collateral bulk limit order
-      operationId: createCollateralBulkOrder
       description: |
         The endpoint creates multiple collateral limit orders.
         
@@ -490,42 +445,34 @@ paths:
                       market:
                         type: string
                         description: "Available margin [market](/glossary#market). Example: BTC_USDT"
-                        example: "BTC_PERP"
                       side:
                         type: string
                         enum: [buy, sell]
                         description: "Order type. Variables: 'buy' / 'sell'."
-                        example: "buy"
                       amount:
                         type: string
                         description: "Amount of [stock](/glossary#stock) currency to buy or sell."
-                        example: "0.02"
                       price:
                         type: string
                         description: "Price in [money](/glossary#money) currency."
-                        example: "40000"
                       clientOrderId:
                         type: string
                         description: "Identifier must be unique and contain letters, numbers, dashes, dots, or underscores."
-                        example: ""
                       stopLoss:
                         type: string
                         description: |
                           Stop loss price.
 
                           When provided, the system creates an [OTO](/glossary#one-triggers-the-other-oto) order with a stop loss condition.
-                        example: "50000"
                       takeProfit:
                         type: string
                         description: |
                           Take profit price.
 
                           When provided, the system creates an [OTO](/glossary#one-triggers-the-other-oto) order with a take profit condition.
-                        example: "30000"
                       postOnly:
                         type: boolean
                         description: "Ensures the order adds liquidity and executes as maker."
-                        example: false
                       ioc:
                         type: boolean
                         description: |
@@ -533,7 +480,6 @@ paths:
 
                           IOC does not support `rpi=true` because RPI uses post-only behavior by design.
                           The API returns error code `37` when an order item sets both `ioc=true` and `rpi=true`.
-                        example: false
                       rpi:
                         type: boolean
                         description: |
@@ -544,9 +490,8 @@ paths:
                         example: true
                       positionSide:
                         type: string
-                        enum: [LONG, SHORT, BOTH]
+                        enum: [long, short, both]
                         description: "Defines the position direction when hedge mode is enabled. See [positionSide](/glossary#position-side)"
-                        example: "LONG"
                 stopOnFail:
                   type: boolean
                   default: false
@@ -556,45 +501,10 @@ paths:
                     When true: Processing stops at the first order that fails validation or execution. Only orders up to (but not including) the failed order are processed.
 
                     When false (default): All orders in the bulk request are processed regardless of individual failures. Each order result is returned in the response array.
-                  example: true
                 request:
                   type: string
-                  example: "{{request}}"
                 nonce:
                   type: string
-                  example: "{{nonce}}"
-            example:
-              orders:
-                - side: buy
-                  amount: "0.02"
-                  price: "40000"
-                  market: BTC_PERP
-                  postOnly: false
-                  ioc: false
-                  clientOrderId: ""
-                  positionSide: LONG
-                  rpi: true
-                - side: sell
-                  amount: "0.0001"
-                  price: "41000"
-                  market: BTC_USDT
-                  postOnly: false
-                  ioc: false
-                  clientOrderId: ""
-                  positionSide: LONG
-                  rpi: true
-                - side: sell
-                  amount: "0.02"
-                  price: "0.030"
-                  market: ETH_BTC
-                  postOnly: false
-                  ioc: false
-                  clientOrderId: ""
-                  positionSide: LONG
-                  rpi: true
-              stopOnFail: true
-              request: "{{request}}"
-              nonce: "{{nonce}}"
       responses:
         '200':
           description: Successful response - returns array of order results
@@ -773,7 +683,6 @@ paths:
   /api/v4/order/collateral/market:
     post:
       summary: Collateral Market Order
-      operationId: createCollateralMarketOrder
       description: |
         The endpoint creates a collateral market order.
         
@@ -799,40 +708,24 @@ paths:
               properties:
                 market:
                   type: string
-                  example: "BTC_USDT"
                 side:
                   type: string
                   enum: [buy, sell]
-                  example: "buy"
                 amount:
                   type: string
-                  example: "0.01"
                 clientOrderId:
                   type: string
-                  example: "order1987111"
                 stopLoss:
                   type: string
-                  example: "50000"
                 takeProfit:
                   type: string
-                  example: "40000"
                 positionSide:
                   type: string
-                  enum: [LONG, SHORT, BOTH]
-                  example: "LONG"
+                  enum: [long, short]
                 request:
                   type: string
-                  example: "{{request}}"
                 nonce:
                   type: string
-                  example: "{{nonce}}"
-            example:
-              market: BTC_USDT
-              side: buy
-              amount: "0.01"
-              clientOrderId: order1987111
-              request: "{{request}}"
-              nonce: "{{nonce}}"
       responses:
         '200':
           description: Successful response - market order created
@@ -948,7 +841,6 @@ paths:
   /api/v4/order/collateral/stop-limit:
     post:
       summary: Collateral Stop-Limit Order
-      operationId: createCollateralStopLimitOrder
       description: |
         The endpoint creates a collateral stop-limit order.
         
@@ -976,51 +868,28 @@ paths:
               properties:
                 market:
                   type: string
-                  example: "BTC_USDT"
                 side:
                   type: string
                   enum: [buy, sell]
-                  example: "buy"
                 amount:
                   type: string
-                  example: "0.001"
                 price:
                   type: string
-                  example: "40000"
                 activation_price:
                   type: string
-                  example: "40000"
                 stopLoss:
                   type: string
-                  example: "30000"
                 takeProfit:
                   type: string
-                  example: "50000"
                 clientOrderId:
                   type: string
-                  example: "order1987111"
                 positionSide:
                   type: string
-                  enum: [LONG, SHORT, BOTH]
-                  example: "LONG"
+                  enum: [long, short]
                 request:
                   type: string
-                  example: "{{request}}"
                 nonce:
                   type: string
-                  example: "{{nonce}}"
-            example:
-              market: BTC_USDT
-              side: buy
-              amount: "0.001"
-              price: "40000"
-              activation_price: "40000"
-              stopLoss: "30000"
-              takeProfit: "50000"
-              clientOrderId: order1987111
-              positionSide: LONG
-              request: "{{request}}"
-              nonce: "{{nonce}}"
       responses:
         '200':
           description: Successful response - stop-limit order created
@@ -1152,7 +1021,6 @@ paths:
   /api/v4/order/collateral/trigger-market:
     post:
       summary: Collateral Trigger Market Order
-      operationId: createCollateralTriggerMarketOrder
       description: |
         The endpoint creates a collateral trigger market order.
         
@@ -1179,44 +1047,26 @@ paths:
               properties:
                 market:
                   type: string
-                  example: "BTC_USDT"
                 side:
                   type: string
                   enum: [buy, sell]
-                  example: "buy"
                 amount:
                   type: string
-                  example: "0.01"
                 activation_price:
                   type: string
-                  example: "40000"
                 clientOrderId:
                   type: string
-                  example: "order1987111"
                 stopLoss:
                   type: string
-                  example: "50000"
                 takeProfit:
                   type: string
-                  example: "30000"
                 positionSide:
                   type: string
-                  enum: [LONG, SHORT, BOTH]
-                  example: "LONG"
+                  enum: [long, short]
                 request:
                   type: string
-                  example: "{{request}}"
                 nonce:
                   type: string
-                  example: "{{nonce}}"
-            example:
-              market: BTC_USDT
-              side: buy
-              amount: "0.01"
-              activation_price: "40000"
-              clientOrderId: order1987111
-              request: "{{request}}"
-              nonce: "{{nonce}}"
       responses:
         '200':
           description: Successful response - trigger market order created
@@ -1337,7 +1187,6 @@ paths:
   /api/v4/collateral-account/summary:
     post:
       summary: Collateral Account Summary
-      operationId: collateralAccountSummary
       description: |
         The endpoint retrieves collateral account summary.
         
@@ -1357,13 +1206,8 @@ paths:
               properties:
                 request:
                   type: string
-                  example: "{{request}}"
                 nonce:
                   type: string
-                  example: "{{nonce}}"
-            example:
-              request: "{{request}}"
-              nonce: "{{nonce}}"
       responses:
         '200':
           description: Successful response - returns collateral account summary
@@ -1408,19 +1252,12 @@ paths:
                 pnl: "150.25"
                 leverage: 3
                 marginFraction: "0.3333"
-        '422':
-          description: Request validation failed
-          content:
-            application/json:
-              schema:
-                $ref: '#/components/schemas/ErrorResponse'
         '503':
           description: Service temporarily unavailable
 
   /api/v4/collateral-account/positions:
     post:
       summary: Open Positions
-      operationId: getOpenPositions
       description: |
         The endpoint retrieves open positions.
 
@@ -1448,11 +1285,9 @@ paths:
                 request:
                   type: string
                   description: Request signature
-                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
-                  example: "{{nonce}}"
             example:
               market: "BTC_USDT"
               request: "{{request}}"
@@ -1569,7 +1404,7 @@ paths:
                   amount: "0.1"
                   basePrice: "45658.349"
                   liquidationPrice: null
-                  liquidationState: margin_call
+                  liquidationState: null
                   pnl: "-168.42"
                   pnlPercent: "-0.43"
                   margin: "8316.74"
@@ -1589,7 +1424,7 @@ paths:
                   amount: "0.1"
                   basePrice: "5658.349"
                   liquidationPrice: null
-                  liquidationState: margin_call
+                  liquidationState: null
                   pnl: "-168.42"
                   pnlPercent: "-0.43"
                   margin: "8316.74"
@@ -1610,7 +1445,6 @@ paths:
   /api/v4/collateral-account/position/close:
     post:
       summary: Close Position
-      operationId: closePosition
       description: |
         The endpoint closes a position.
         
@@ -1635,26 +1469,15 @@ paths:
               properties:
                 positionId:
                   type: integer
-                  example: 123
                 positionSide:
                   type: string
-                  enum: [LONG, SHORT, BOTH]
-                  example: "LONG"
+                  enum: [long, short]
                 market:
                   type: string
-                  example: "BTC_USDT"
                 request:
                   type: string
-                  example: "{{request}}"
                 nonce:
                   type: string
-                  example: "{{nonce}}"
-            example:
-              positionId: 123
-              positionSide: LONG
-              market: BTC_USDT
-              request: "{{request}}"
-              nonce: "{{nonce}}"
       responses:
         '200':
           description: Position closed
@@ -1678,7 +1501,6 @@ paths:
   /api/v4/collateral-account/positions/history:
     post:
       summary: Positions History
-      operationId: getPositionsHistory
       description: |
         The endpoint retrieves positions history.
         
@@ -1698,21 +1520,12 @@ paths:
               properties:
                 market:
                   type: string
-                  example: "BTC_USDT"
                 positionId:
                   type: integer
-                  example: 1
                 request:
                   type: string
-                  example: "{{request}}"
                 nonce:
                   type: string
-                  example: "{{nonce}}"
-            example:
-              market: BTC_USDT
-              positionId: 1
-              request: "{{request}}"
-              nonce: "{{nonce}}"
       responses:
         '200':
           description: Successful response - returns array of position history
@@ -1807,7 +1620,7 @@ paths:
                   basePrice: "45658.349"
                   realizedFunding: "0"
                   liquidationPrice: null
-                  liquidationState: margin_call
+                  liquidationState: null
                   orderDetail:
                     id: 97067934
                     tradeAmount: "0.1"
@@ -1836,7 +1649,6 @@ paths:
   /api/v4/collateral-account/funding-history:
     post:
       summary: Funding History
-      operationId: getFundingHistory
       description: |
         The endpoint retrieves funding history.
 
@@ -1874,11 +1686,9 @@ paths:
                 request:
                   type: string
                   description: Request signature
-                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
-                  example: "{{nonce}}"
             example:
               market: "BTC_PERP"
               limit: 100
@@ -1965,7 +1775,6 @@ paths:
   /api/v4/collateral-account/leverage:
     post:
       summary: Change Collateral Account Leverage
-      operationId: changeCollateralAccountLeverage
       description: |
         The endpoint changes account leverage.
         
@@ -1991,17 +1800,10 @@ paths:
                   type: integer
                   minimum: 1
                   maximum: 100
-                  example: 5
                 request:
                   type: string
-                  example: "{{request}}"
                 nonce:
                   type: string
-                  example: "{{nonce}}"
-            example:
-              leverage: 5
-              request: "{{request}}"
-              nonce: "{{nonce}}"
       responses:
         '200':
           description: Successful response - leverage changed
@@ -2028,7 +1830,6 @@ paths:
   /api/v4/collateral-account/hedge-mode:
     post:
       summary: Collateral Account Hedge Mode
-      operationId: getCollateralHedgeMode
       description: |
         The endpoint retrieves hedge mode status.
         
@@ -2048,13 +1849,8 @@ paths:
               properties:
                 request:
                   type: string
-                  example: "{{request}}"
                 nonce:
                   type: string
-                  example: "{{nonce}}"
-            example:
-              request: "{{request}}"
-              nonce: "{{nonce}}"
       responses:
         '200':
           description: Successful response - returns hedge mode status
@@ -2069,12 +1865,6 @@ paths:
                     example: true
               example:
                 hedgeMode: true
-        '422':
-          description: Request validation failed
-          content:
-            application/json:
-              schema:
-                $ref: '#/components/schemas/ErrorResponse'
         '500':
           description: Internal error
         '503':
@@ -2083,7 +1873,6 @@ paths:
   /api/v4/collateral-account/hedge-mode/update:
     post:
       summary: Update Collateral Account Hedge Mode
-      operationId: updateHedgeMode
       description: |
         The endpoint updates hedge mode.
         
@@ -2107,17 +1896,10 @@ paths:
               properties:
                 hedgeMode:
                   type: boolean
-                  example: true
                 request:
                   type: string
-                  example: "{{request}}"
                 nonce:
                   type: string
-                  example: "{{nonce}}"
-            example:
-              hedgeMode: true
-              request: "{{request}}"
-              nonce: "{{nonce}}"
       responses:
         '200':
           description: Successful response - hedge mode updated
@@ -2135,7 +1917,6 @@ paths:
   /api/v4/orders/conditional:
     post:
       summary: Query unexecuted(active) conditional orders
-      operationId: getConditionalOrders
       description: |
         The endpoint retrieves active conditional orders.
         
@@ -2155,25 +1936,16 @@ paths:
               properties:
                 market:
                   type: string
-                  example: "BTC_USDT"
                 offset:
                   type: integer
                   default: 0
-                  example: 0
                 limit:
                   type: integer
                   default: 50
-                  example: 100
                 request:
                   type: string
-                  example: "{{request}}"
                 nonce:
                   type: string
-                  example: "{{nonce}}"
-            example:
-              market: BTC_USDT
-              offset: 0
-              limit: 100
       responses:
         '200':
           description: Successful response - returns paginated conditional orders (OCO and OTO types)
@@ -2351,7 +2123,6 @@ paths:
   /api/v4/orders/oco:
     post:
       summary: Query unexecuted(active) OCO orders
-      operationId: getOcoOrders
       description: |
         The endpoint retrieves active OCO orders.
         
@@ -2371,25 +2142,16 @@ paths:
               properties:
                 market:
                   type: string
-                  example: "BTC_USDT"
                 offset:
                   type: integer
                   default: 0
-                  example: 0
                 limit:
                   type: integer
                   default: 50
-                  example: 100
                 request:
                   type: string
-                  example: "{{request}}"
                 nonce:
                   type: string
-                  example: "{{nonce}}"
-            example:
-              market: BTC_USDT
-              offset: 0
-              limit: 100
       responses:
         '200':
           description: Successful response - returns array of active OCO orders
@@ -2594,7 +2356,6 @@ paths:
   /api/v4/order/collateral/oco:
     post:
       summary: Create collateral OCO order
-      operationId: createCollateralOcoOrder
       description: |
         The endpoint creates a collateral OCO order.
         
@@ -2623,42 +2384,23 @@ paths:
               properties:
                 market:
                   type: string
-                  example: "BTC_USDT"
                 side:
                   type: string
                   enum: [buy, sell]
-                  example: "buy"
                 amount:
                   type: string
-                  example: "0.001"
                 price:
                   type: string
-                  example: "40000"
                 activation_price:
                   type: string
-                  example: "41000"
                 stop_limit_price:
                   type: string
-                  example: "42000"
                 clientOrderId:
                   type: string
-                  example: "order1987111"
                 request:
                   type: string
-                  example: "{{request}}"
                 nonce:
                   type: string
-                  example: "{{nonce}}"
-            example:
-              market: BTC_USDT
-              side: buy
-              amount: "0.001"
-              price: "40000"
-              activation_price: "41000"
-              stop_limit_price: "42000"
-              clientOrderId: order1987111
-              request: "{{request}}"
-              nonce: "{{nonce}}"
       responses:
         '200':
           description: Successful response - OCO order created
@@ -2913,7 +2655,6 @@ paths:
   /api/v4/order/conditional-cancel:
     post:
       summary: Cancel conditional order
-      operationId: cancelConditionalOrder
       description: |
         The endpoint cancels a conditional order.
         
@@ -2938,21 +2679,12 @@ paths:
               properties:
                 market:
                   type: string
-                  example: "BTC_USDT"
                 id:
                   type: integer
-                  example: 117703764514
                 request:
                   type: string
-                  example: "{{request}}"
                 nonce:
                   type: string
-                  example: "{{nonce}}"
-            example:
-              market: BTC_USDT
-              id: 117703764514
-              request: "{{request}}"
-              nonce: "{{nonce}}"
       responses:
         '200':
           description: Order cancelled
@@ -2974,7 +2706,6 @@ paths:
   /api/v4/order/oco-cancel:
     post:
       summary: Cancel OCO order
-      operationId: cancelOcoOrder
       description: |
         The endpoint cancels an OCO order.
         
@@ -2999,21 +2730,12 @@ paths:
               properties:
                 market:
                   type: string
-                  example: "BTC_USDT"
                 orderId:
                   type: integer
-                  example: 117703764514
                 request:
                   type: string
-                  example: "{{request}}"
                 nonce:
                   type: string
-                  example: "{{nonce}}"
-            example:
-              market: BTC_USDT
-              orderId: 117703764514
-              request: "{{request}}"
-              nonce: "{{nonce}}"
       responses:
         '200':
           description: Successful response - OCO order cancelled
@@ -3244,7 +2966,6 @@ paths:
   /api/v4/order/oto-cancel:
     post:
       summary: Cancel OTO order
-      operationId: cancelOtoOrder
       description: |
         The endpoint cancels an OTO order.
         
@@ -3269,21 +2990,12 @@ paths:
               properties:
                 market:
                   type: string
-                  example: "BTC_USDT"
                 otoId:
                   type: integer
-                  example: 117703764514
                 request:
                   type: string
-                  example: "{{request}}"
                 nonce:
                   type: string
-                  example: "{{nonce}}"
-            example:
-              market: BTC_USDT
-              otoId: 117703764514
-              request: "{{request}}"
-              nonce: "{{nonce}}"
       responses:
         '200':
           description: OTO order cancelled
@@ -3312,8 +3024,6 @@ paths:
         Rate limit: 10000 requests/10 sec.
         
       operationId: convertEstimate
-      security:
-        - ApiKeyAuth: []
       requestBody:
         required: true
         content:
@@ -3346,11 +3056,9 @@ paths:
                 nonce:
                   type: integer
                   description: "Nonce for request"
-                  example: 1699260637
                 request:
                   type: string
                   description: "Request path"
-                  example: "{{request}}"
             examples:
               estimateReceive:
                 summary: "Estimate convert of BTC to receive 35,103.1 USDT"
@@ -3447,8 +3155,6 @@ paths:
         Rate limit: 10000 requests/10 sec.
         
       operationId: convertConfirm
-      security:
-        - ApiKeyAuth: []
       requestBody:
         required: true
         content:
@@ -3465,11 +3171,9 @@ paths:
                 nonce:
                   type: integer
                   description: "Nonce for request"
-                  example: 1699260637
                 request:
                   type: string
                   description: "Request path"
-                  example: "{{request}}"
             example:
               quoteId: "4050"
       responses:
@@ -3520,8 +3224,6 @@ paths:
         
         **Note:** The endpoint can retrieve data not older than 6 months from current month. For older data, use the Report on the History page.
       operationId: convertHistory
-      security:
-        - ApiKeyAuth: []
       requestBody:
         required: true
         content:
@@ -3560,11 +3262,9 @@ paths:
                 nonce:
                   type: integer
                   description: "Nonce for request"
-                  example: 1699260637
                 request:
                   type: string
                   description: "Request path"
-                  example: "{{request}}"
             example:
               fromTicker: "BTC"
       responses:
@@ -3657,7 +3357,6 @@ paths:
   /api/v4/market/fee:
     post:
       summary: Query Market Fee
-      operationId: getMarketFee
       description: |
         Returns maker and taker fees for a specific market.
 
@@ -3726,7 +3425,6 @@ paths:
 
     get:
       summary: Query All Market Fees
-      operationId: getAllMarketFees
       description: |
         Returns maker and taker fees for all markets, including assigned custom fees.
 
@@ -3791,7 +3489,6 @@ paths:
   /api/v4/trade-account/balance:
     post:
       summary: Trading Balance
-      operationId: tradeAccountBalance
       description: |
         The endpoint retrieves the [trade balance](/glossary#balance-spotbalance-trade) by currency [ticker](/glossary#ticker) or all balances.
         
@@ -3892,7 +3589,6 @@ paths:
   /api/v4/order/new:
     post:
       summary: Create Limit Order
-      operationId: createLimitOrder
       description: |
         The endpoint creates [limit trading order](/glossary#limit-order).
         
@@ -4122,7 +3818,6 @@ paths:
   /api/v4/order/bulk:
     post:
       summary: Bulk limit order
-      operationId: createBulkLimitOrder
       description: |
         The endpoint creates bulk [limit trading orders](/glossary#limit-order).
         
@@ -4226,39 +3921,11 @@ paths:
                     When true: Processing stops at the first order that fails validation or execution. Only orders up to (but not including) the failed order are processed.
 
                     When false (default): All orders in the bulk request are processed regardless of individual failures. Each order result is returned in the response array.
-                  example: true
+
                 request:
                   type: string
-                  example: "{{request}}"
                 nonce:
                   type: string
-                  example: "{{nonce}}"
-            example:
-              orders:
-                - side: buy
-                  amount: "0.02"
-                  price: "40000"
-                  market: BTC_USDT
-                  postOnly: false
-                  ioc: false
-                  clientOrderId: ""
-                  rpi: true
-                - side: sell
-                  amount: "0.0001"
-                  price: "41000"
-                  market: BTC_USDT
-                  postOnly: false
-                  ioc: false
-                  clientOrderId: ""
-                  rpi: true
-                - side: sell
-                  amount: "0.02"
-                  price: "41000"
-                  market: BTC_USDT
-                  postOnly: false
-                  ioc: false
-                  clientOrderId: ""
-                  rpi: true
       responses:
         '200':
           $ref: '#/components/responses/BulkLimitOrderResponse'
@@ -4280,7 +3947,6 @@ paths:
   /api/v4/order/market:
     post:
       summary: Create market order
-      operationId: createMarketOrder
       description: |
         The endpoint creates [market trading order](/glossary#market-order).
         
@@ -4428,7 +4094,6 @@ paths:
   /api/v4/order/stock_market:
     post:
       summary: Create buy stock market order
-      operationId: createStockMarketOrder
       description: |
         The endpoint creates buy [stock](/glossary#stock) market trading [order](/glossary#orders).
         
@@ -4564,7 +4229,6 @@ paths:
   /api/v4/order/stop_limit:
     post:
       summary: Create stop-limit order
-      operationId: createStopLimitOrder
       description: |
         The endpoint creates [stop-limit trading order](/glossary#stop-limit-order).
         
@@ -4735,7 +4399,6 @@ paths:
   /api/v4/order/stop_market:
     post:
       summary: Create stop-market order
-      operationId: createStopMarketOrder
       description: |
         The endpoint creates [stop-market trading order](/glossary#stop-market-order).
         
@@ -4900,7 +4563,6 @@ paths:
   /api/v4/order/cancel:
     post:
       summary: Cancel order
-      operationId: cancelOrder
       description: |
         Cancel existing [order](/glossary#orders).
         
@@ -5010,13 +4672,10 @@ paths:
                 clientOrderId:
                   type: string
                   description: "Custom client order id. Example: 'customId11'. Required if orderId is not set."
-                  example: "customId11"
                 request:
                   type: string
-                  example: "{{request}}"
                 nonce:
                   type: string
-                  example: "{{nonce}}"
       responses:
         '200':
           description: Order cancelled successfully
@@ -5042,7 +4701,6 @@ paths:
   /api/v4/order/cancel/all:
     post:
       summary: Cancel all orders
-      operationId: cancelAllOrders
       description: |
         Cancels all orders that meet the conditions [order](/glossary#orders).
         
@@ -5107,22 +4765,13 @@ paths:
                 type:
                   type: array
                   description: "Order types value. Example: 'spot', 'margin', 'futures'"
-                  example: ["spot", "margin", "futures"]
                   items:
                     type: string
                     enum: [spot, margin, futures]
                 request:
                   type: string
-                  example: "{{request}}"
                 nonce:
                   type: string
-                  example: "{{nonce}}"
-            example:
-              market: BTC_USDT
-              type:
-                - spot
-                - margin
-                - futures
       responses:
         '200':
           description: Orders cancelled successfully
@@ -5144,7 +4793,6 @@ paths:
   /api/v4/orders:
     post:
       summary: Query unexecuted(active) orders
-      operationId: getActiveOrders
       description: |
         The endpoint retrieves [active orders](/glossary#active-orders) (orders not yet executed).
         
@@ -5196,28 +4844,22 @@ paths:
                 orderId:
                   type: integer
                   description: "Available orderId. Example: 3134995325"
-                  example: 3134995325
                 clientOrderId:
                   type: string
                   description: "Available clientOrderId. Example: customId11"
-                  example: "customId11"
                 offset:
                   type: integer
                   default: 0
                   description: "Starting line index (OFFSET). Default: 0, Min: 0"
-                  example: 0
                 limit:
                   type: integer
                   default: 50
                   maximum: 100
                   description: "LIMIT is a special clause used to limit records a particular query can return. Default: 50, Min: 1, Max: 100"
-                  example: 50
                 request:
                   type: string
-                  example: "{{request}}"
                 nonce:
                   type: string
-                  example: "{{nonce}}"
       responses:
         '200':
           description: List of active orders
@@ -5245,7 +4887,6 @@ paths:
   /api/v4/trade-account/executed-history:
     post:
       summary: Query executed order history
-      operationId: getExecutedOrderHistory
       description: |
         The endpoint retrieves all deals for all markets. Can be filtered by single market if needed.
         
@@ -5293,35 +4934,27 @@ paths:
                 market:
                   type: string
                   description: "Requested [market](/glossary#market). Example: BTC_USDT"
-                  example: "BTC_USDT"
                 clientOrderId:
                   type: string
                   description: "Filter by custom order identifier"
-                  example: "customId11"
                 startDate:
                   type: integer
                   description: "Start date in Unix-time format"
-                  example: 1593233939
                 endDate:
                   type: integer
                   description: "End date in Unix-time format"
-                  example: 1593233939
                 offset:
                   type: integer
                   default: 0
                   description: "Starting line index (OFFSET). Default: 0, Min: 0"
-                  example: 0
                 limit:
                   type: integer
                   default: 50
                   description: "LIMIT is a special clause used to limit records a particular query can return. Default: 50, Min: 1, Max: 100"
-                  example: 50
                 request:
                   type: string
-                  example: "{{request}}"
                 nonce:
                   type: string
-                  example: "{{nonce}}"
       responses:
         '200':
           description: Executed order history
@@ -5395,7 +5028,6 @@ paths:
   /api/v4/trade-account/order:
     post:
       summary: Query executed order deals
-      operationId: getOrderDeals
       description: |
         The endpoint retrieves deals for a specific order.
         
@@ -5419,21 +5051,16 @@ paths:
               properties:
                 orderId:
                   type: integer
-                  example: 3134995325
                 offset:
                   type: integer
                   default: 0
-                  example: 0
                 limit:
                   type: integer
                   default: 50
-                  example: 50
                 request:
                   type: string
-                  example: "{{request}}"
                 nonce:
                   type: string
-                  example: "{{nonce}}"
       responses:
         '200':
           description: Successful response - returns paginated order deals
@@ -5534,7 +5161,6 @@ paths:
   /api/v4/trade-account/order/history:
     post:
       summary: Query executed orders
-      operationId: getOrderHistory
       description: |
         The endpoint retrieves order history.
         
@@ -5554,21 +5180,16 @@ paths:
               properties:
                 market:
                   type: string
-                  example: "BTC_USDT"
                 offset:
                   type: integer
                   default: 0
-                  example: 0
                 limit:
                   type: integer
                   default: 50
-                  example: 50
                 request:
                   type: string
-                  example: "{{request}}"
                 nonce:
                   type: string
-                  example: "{{nonce}}"
       responses:
         '200':
           description: Successful response - returns order history grouped by market. Empty response if order is not yours.
@@ -5698,7 +5319,6 @@ paths:
   /api/v4/order/modify:
     post:
       summary: Modify order
-      operationId: modifyOrder
       description: |
         The endpoint modifies existing [order](/glossary#orders).
         
@@ -5772,37 +5392,28 @@ paths:
                 orderId:
                   type: integer
                   description: "Active order id. Required if clientOrderId is not set."
-                  example: 4180284841
                 clientOrderId:
                   type: string
                   description: "Identifier should be unique and contain letters, dashes, numbers, dots or underscores. Required if orderId is not set."
-                  example: "order1987111"
                 market:
                   type: string
                   description: "Available [market](/glossary#market). Example: BTC_USDT"
-                  example: "BTC_USDT"
                 amount:
                   type: string
                   description: "Amount of [stock](/glossary#stock) currency to buy or sell. Example: '0.001' or 0.001"
-                  example: "0.001"
                 total:
                   type: string
                   description: "Total of [money](/glossary#money) currency to buy or sell. Example: '0.001' or 0.001"
-                  example: "100"
                 price:
                   type: string
                   description: "Price in [money](/glossary#money) currency. Example: '9800' or 9800"
-                  example: "9800"
                 activationPrice:
                   type: string
                   description: "Activation price in [money](/glossary#money) currency. Example: '10000' or 10000"
-                  example: "10000"
                 request:
                   type: string
-                  example: "{{request}}"
                 nonce:
                   type: string
-                  example: "{{nonce}}"
       responses:
         '200':
           description: Order modified successfully
@@ -5828,7 +5439,6 @@ paths:
   /api/v4/order/kill-switch:
     post:
       summary: Sync kill-switch timer
-      operationId: setKillSwitch
       description: |
         The endpoint creates, updates, deletes [kill-switch timer](/glossary#kill-switch-timer).
         
@@ -5895,24 +5505,19 @@ paths:
                 market:
                   type: string
                   description: "Available [market](/glossary#market). Example: BTC_USDT"
-                  example: "BTC_USDT"
                 timeout:
                   type: string
                   description: "Timer value. Example: '5'-'600' or null"
-                  example: "60"
                 types:
                   type: array
                   description: "Order types value. Example: 'spot', 'margin', 'futures' or null"
-                  example: ["spot", "margin"]
                   items:
                     type: string
                     enum: [spot, margin, futures]
                 request:
                   type: string
-                  example: "{{request}}"
                 nonce:
                   type: string
-                  example: "{{nonce}}"
       responses:
         '200':
           description: Successful response - kill-switch timer synced
@@ -5961,7 +5566,6 @@ paths:
   /api/v4/order/kill-switch/status:
     post:
       summary: Status kill-switch timer
-      operationId: getKillSwitchStatus
       description: |
         The endpoint retrieves the status of [kill-switch timer](/glossary#kill-switch-timer).
         
@@ -5999,13 +5603,10 @@ paths:
                 market:
                   type: string
                   description: "Available [market](/glossary#market). Example: BTC_USDT"
-                  example: "BTC_USDT"
                 request:
                   type: string
-                  example: "{{request}}"
                 nonce:
                   type: string
-                  example: "{{nonce}}"
       responses:
         '200':
           description: Successful response - returns array of kill-switch timer statuses
@@ -6069,7 +5670,7 @@ components:
         - X-TXC-SIGNATURE: HMAC SHA512 signature
   responses:
     BulkLimitOrderResponse:
-      description: Orders created
+      description: Bulk limit order response
       content:
         application/json:
           schema:
@@ -6093,7 +5694,6 @@ components:
           type: string
           enum: [buy, sell]
           description: "Order type. Variables: 'buy' / 'sell' Example: 'buy'"
-          example: "buy"
         amount:
           type: string
           description: "Amount of [stock](/glossary#stock) currency to buy or sell. Example: '0.001' or 0.001"
@@ -6105,12 +5705,10 @@ components:
         clientOrderId:
           type: string
           description: "Identifier should be unique and contain letters, dashes, numbers, dots or underscores. The identifier must be unique."
-          example: "order1987111"
         postOnly:
           type: boolean
           default: false
           description: "[Orders](/glossary#orders) are guaranteed to be the [maker](/glossary#maker) order when [executed](/glossary#finished-orders). Variables: 'true' / 'false' Example: 'false'."
-          example: false
         ioc:
           type: boolean
           default: false
@@ -6121,7 +5719,6 @@ components:
             The API returns error code `37` when a request sets both `ioc=true` and `rpi=true`.
 
             Refer to [Order Parameter Rules](/guides/order-parameter-rules) for unsupported parameter combinations.
-          example: false
         bboRole:
           type: integer
           enum: [1, 2]
@@ -6131,7 +5728,6 @@ components:
           enum: [no, cancel_both, cancel_new, cancel_old]
           default: no
           description: "Self trade prevention mode. Variables: 'no' / 'cancel_both' / 'cancel_new' / 'cancel_old'. Example: 'no'."
-          example: "no"
         rpi:
           type: boolean
           description: |
@@ -6146,10 +5742,8 @@ components:
           example: true
         request:
           type: string
-          example: "{{request}}"
         nonce:
           type: string
-          example: "{{nonce}}"
 
     MarketOrderRequest:
       type: object
@@ -6163,31 +5757,25 @@ components:
         market:
           type: string
           description: "Available [market](/glossary#market). Example: BTC_USDT"
-          example: "BTC_USDT"
+          example: BTC_USDT
         side:
           type: string
           enum: [buy, sell]
           description: "Order type. Variables: 'buy' / 'sell' Example: 'buy'"
-          example: "buy"
         amount:
           type: string
           description: "Amount of [money](/glossary#money) currency to buy or amount in [stock](/glossary#stock) currency to sell. Example: '5 USDT' for buy (min total) and '0.001 BTC' for sell (min amount)."
-          example: "100"
         clientOrderId:
           type: string
           description: "Identifier should be unique and contain letters, dashes, numbers, dots or underscores. The identifier must be unique."
-          example: "order1987111"
         stp:
           type: string
           enum: [no, cancel_both, cancel_new, cancel_old]
           description: "Self trade prevention mode. Variables: 'no' / 'cancel_both' / 'cancel_new' / 'cancel_old'. Example: 'no'."
-          example: "no"
         request:
           type: string
-          example: "{{request}}"
         nonce:
           type: string
-          example: "{{nonce}}"
 
     StopLimitOrderRequest:
       type: object
@@ -6203,28 +5791,23 @@ components:
         market:
           type: string
           description: "Available [market](/glossary#market). Example: BTC_USDT"
-          example: "BTC_USDT"
+          example: BTC_USDT
         side:
           type: string
           enum: [buy, sell]
           description: "Order type. Variables: 'buy' / 'sell' Example: 'buy'"
-          example: "buy"
         amount:
           type: string
           description: "Amount of [stock](/glossary#stock) currency to buy or sell. Example: '0.001' or 0.001"
-          example: "0.001"
         price:
           type: string
           description: "Price in [money](/glossary#money) currency. Example: '9800' or 9800"
-          example: "9800"
         activation_price:
           type: string
           description: "Activation price in [money](/glossary#money) currency. Example: '10000' or 10000"
-          example: "10000"
         clientOrderId:
           type: string
           description: "Identifier should be unique and contain letters, dashes, numbers, dots or underscores. The identifier must be unique."
-          example: "order1987111"
         bboRole:
           type: integer
           enum: [1, 2]
@@ -6236,10 +5819,8 @@ components:
           example: "no"
         request:
           type: string
-          example: "{{request}}"
         nonce:
           type: string
-          example: "{{nonce}}"
 
     StopMarketOrderRequest:
       type: object
@@ -6254,24 +5835,20 @@ components:
         market:
           type: string
           description: "Available [market](/glossary#market). Example: BTC_USDT"
-          example: "BTC_USDT"
+          example: BTC_USDT
         side:
           type: string
           enum: [buy, sell]
           description: "Order type. Variables: 'buy' / 'sell' Example: 'buy'"
-          example: "buy"
         amount:
           type: string
           description: "Amount of [money](/glossary#money) currency to buy or amount in [stock](/glossary#stock) currency to sell. Example: '0.01' or 0.01 for buy and '0.0001' for sell."
-          example: "0.01"
         activation_price:
           type: string
           description: "Activation price in [money](/glossary#money) currency. Example: '10000' or 10000"
-          example: "10000"
         clientOrderId:
           type: string
           description: "Identifier should be unique and contain letters, dashes, numbers, dots or underscores. The identifier must be unique."
-          example: "order1987111"
         stp:
           type: string
           enum: [no, cancel_both, cancel_new, cancel_old]
@@ -6279,10 +5856,8 @@ components:
           example: "no"
         request:
           type: string
-          example: "{{request}}"
         nonce:
           type: string
-          example: "{{nonce}}"
 
     BulkOrderItem:
       type: object
@@ -6290,19 +5865,14 @@ components:
         side:
           type: string
           enum: [buy, sell]
-          example: "buy"
         amount:
           type: string
-          example: "0.001"
         price:
           type: string
-          example: "40000"
         market:
           type: string
-          example: "BTC_USDT"
         postOnly:
           type: boolean
-          example: false
         ioc:
           type: boolean
           description: |
@@ -6310,10 +5880,8 @@ components:
 
             IOC does not support `rpi=true` because RPI uses post-only behavior by design.
             The API returns error code `37` when an order item sets both `ioc=true` and `rpi=true`.
-          example: false
         clientOrderId:
           type: string
-          example: ""
         rpi:
           type: boolean
           description: |
@@ -6329,101 +5897,126 @@ components:
         orderId:
           type: integer
           description: "Order ID"
-          example: 4180284841
         clientOrderId:
           type: string
           description: "Custom client order ID; empty string if not specified"
-          example: "order1987111"
         market:
           type: string
           description: "Deal market"
-          example: "BTC_USDT"
         side:
           type: string
           description: "Order side"
-          example: "buy"
         type:
           type: string
           description: "Order type"
-          example: "limit"
         timestamp:
           type: number
           description: "Timestamp of order creation"
-          example: 1595792396.165973
         dealMoney:
           type: string
           description: "If order finished - amount in money currency that is finished"
-          example: "0"
         dealStock:
           type: string
           description: "If order finished - amount in stock currency that is finished"
-          example: "0"
         amount:
           type: string
           description: "Amount"
-          example: "0.01"
         left:
           type: string
           description: "If order not finished - rest of the amount that must be finished"
-          example: "0.001"
         dealFee:
           type: string
           description: "Fee in money currency when order is filled"
-          example: "0"
         price:
           type: string
           description: "Price"
-          example: "40000"
         postOnly:
           type: boolean
           description: "PostOnly flag"
-          example: false
         ioc:
           type: boolean
           description: "IOC flag"
-          example: false
         status:
           type: string
           description: "Order status"
-          example: "FILLED"
         stp:
           type: string
           description: "Self trade prevention mode"
-          example: "no"
         positionSide:
           type: string
           description: "Position side (for collateral orders)"
-          example: "LONG"
         rpi:
           type: boolean
           description: "Indicates Retail Price Improvement (RPI) mode for the order."
           example: true
     BulkLimitOrderResponse:
       type: array
+      description: Orders created
       items:
         type: object
         properties:
           result:
-            type: object
-            allOf:
-              - $ref: '#/components/schemas/OrderResponse'
-            nullable: true
+            $ref: '#/components/schemas/OrderResponse'
           error:
-            type: object
             allOf:
               - $ref: '#/components/schemas/ErrorResponse'
             nullable: true
+      example:
+        - result:
+            orderId: 4326248250
+            clientOrderId: ""
+            market: "BTC_USDT"
+            side: "buy"
+            type: "limit"
+            timestamp: 1684916268.825564
+            dealMoney: "641.988"
+            dealStock: "0.02"
+            amount: "0.02"
+            left: "0"
+            dealFee: "1.283976"
+            ioc: false
+            postOnly: false
+            price: "40000"
+            status: "FILLED"
+            stp: "no"
+            positionSide: "BOTH"
+            rpi: true
+          error: null
+        - result: null
+          error:
+            code: 32
+            message: "Validation failed"
+            errors:
+              amount: ["Given amount is less than min amount 0.001."]
+        - result:
+            orderId: 4326248250
+            clientOrderId: ""
+            market: "BTC_USDT"
+            side: "sell"
+            type: "limit"
+            timestamp: 1684916268.825564
+            dealMoney: "641.988"
+            dealStock: "0.02"
+            amount: "0.02"
+            left: "0"
+            dealFee: "1.283976"
+            ioc: false
+            postOnly: false
+            price: "41000"
+            status: "FILLED"
+            stp: "no"
+            positionSide: "BOTH"
+            rpi: true
+          error: null
     ErrorResponse:
       type: object
       properties:
         code:
           type: integer
           description: "Error code"
-          example: 30
         message:
           type: string
           description: "Error message"
-          example: "Validation failed"
         errors:
           type: object
           additionalProperties:
diff --git a/openapi/private/main_api_v4.yaml b/openapi/private/main_api_v4.yaml
index 809bd22..7d0a73c 100644
--- a/openapi/private/main_api_v4.yaml
+++ b/openapi/private/main_api_v4.yaml
@@ -86,11 +86,9 @@ paths:
                 request:
                   type: string
                   description: Request signature
-                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
-                  example: "{{nonce}}"
       responses:
         "200":
           description: Successful response
@@ -195,11 +193,9 @@ paths:
                 request:
                   type: string
                   description: Request signature
-                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
-                  example: "{{nonce}}"
       responses:
         "200":
           description: Successful response
@@ -412,7 +408,6 @@ paths:
                 uniqueId:
                   type: string
                   description: Unique transaction identifier on client's side
-                  example: "qw22"
                 customer:
                   type: object
                   description: Customer information (required for USD/EUR with VISAMASTER [provider](/glossary#provider))
@@ -423,21 +418,18 @@ paths:
                         Customer billing first name.
 
                         ⚠️ Required if currency USD or EUR with VISAMASTER [provider](/glossary#provider).
-                      example: "John"
                     lastName:
                       type: string
                       description: |
                         Customer billing last name.
 
                         ⚠️ Required if currency USD or EUR with VISAMASTER [provider](/glossary#provider).
-                      example: "Doe"
                     email:
                       type: string
                       description: |
                         Customer billing email.
 
                         ⚠️ Required if currency USD or EUR with VISAMASTER [provider](/glossary#provider).
-                      example: "john_doe@email.com"
                     birthDate:
                       type: string
                       format: date
@@ -445,7 +437,6 @@ paths:
                         Customer birth date (Format YYYY-MM-DD).
 
                         ⚠️ Required if currency USD or EUR with VISAMASTER [provider](/glossary#provider).
-                      example: "1990-01-01"
                     address:
                       type: object
                       properties:
@@ -455,52 +446,42 @@ paths:
                             Customer address line1.
 
                             ⚠️ Required if currency USD or EUR with VISAMASTER [provider](/glossary#provider).
-                          example: "Martinez Campos 37"
                         line2:
                           type: string
                           description: Customer address line2
-                          example: ""
                         city:
                           type: string
                           description: |
                             Customer city.
 
                             ⚠️ Required if currency USD or EUR with VISAMASTER [provider](/glossary#provider).
-                          example: "Madrid"
                         zipCode:
                           type: string
                           description: |
                             Customer zip-code.
 
                             ⚠️ Required if currency USD or EUR with VISAMASTER [provider](/glossary#provider).
-                          example: "28010"
                         countryCode:
                           type: string
                           description: |
                             Customer country code.
 
                             ⚠️ Required if currency USD or EUR with VISAMASTER [provider](/glossary#provider).
-                          example: "ES"
                 successLink:
                   type: string
                   description: Customer will be redirected to this URL by acquiring [provider](/glossary#provider) after success deposit. To activate this feature, please contact support
-                  example: "https://success.example.com"
                 failureLink:
                   type: string
                   description: Customer will be redirected to this URL in case of fail or rejection on acquiring provider side. To activate this feature, please contact support
-                  example: "https://failure.example.com"
                 returnLink:
                   type: string
                   description: Customer will be redirected to the URL defined if selects 'back' option after from the payment success or failure page. To activate this feature, define desired link. If not populated, option 'back' won't be displayed
-                  example: "https://return.example.com"
                 request:
                   type: string
                   description: Request signature
-                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
-                  example: "{{nonce}}"
             examples:
               basic:
                 summary: Basic request
@@ -577,15 +558,12 @@ paths:
                 request:
                   type: string
                   description: Request signature
-                  example: "{{request}}"
                 nonceWindow:
                   type: boolean
                   description: Nonce window setting
-                  example: false
                 nonce:
                   type: string
                   description: Unique request identifier
-                  example: "{{nonce}}"
             example:
               request: "{{request}}"
               nonceWindow: false
@@ -675,11 +653,9 @@ paths:
                 request:
                   type: string
                   description: Request signature
-                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
-                  example: "{{nonce}}"
             example:
               request: "{{request}}"
               nonce: "{{nonce}}"
@@ -842,12 +818,10 @@ paths:
                   type: string
                   description: |
                     Base64-encoded request body. See the [authentication guide](/private/http-auth) for signature generation details.
-                  example: "{{request}}"
                 nonce:
                   type: string
                   description: |
                     A unique identifier for the request. Use a monotonically increasing value such as a Unix timestamp in milliseconds.
-                  example: "{{nonce}}"
             example:
               transactionId: "54bffeb7-7a8f-43f8-bcd8-f14ec10fee85"
               address: "0x1234567890abcdef1234567890abcdef12345678"
@@ -932,7 +906,6 @@ paths:
                     [Memo](/glossary#memodestination-tag).
 
                     ⚠️ Required if currency is memoable.
-                  example: "48565488244493"
                 uniqueId:
                   type: string
                   description: |
@@ -946,7 +919,6 @@ paths:
                     [Fiat](/glossary#fiat) currency [provider](/glossary#provider). Example: VISAMASTER
 
                     ⚠️ Required for fiat currencies. Currency provider should be taken from [Asset Status endpoint](/public/http-v4/asset-status-list) response.
-                  example: "VISAMASTER"
                 network:
                   type: string
                   description: |
@@ -957,7 +929,6 @@ paths:
                 partialEnable:
                   type: boolean
                   description: Optional parameter for [FIAT](/glossary#fiat) withdrawals with increased Maximum Limit if set as "true". To use this parameter, the application must support "Partially successful" withdrawal status and latest updates in deposit/withdrawal history.
-                  example: false
                 beneficiary:
                   type: object
                   description: |
@@ -971,35 +942,30 @@ paths:
                         Beneficiary first name. Max length: 40 symbols, latin letters and special characters.
 
                         ⚠️ Required if currency [ticker](/glossary#ticker) is one of: UAH_IBAN, USD_VISAMASTER, USD, EUR
-                      example: "Firstname"
                     lastName:
                       type: string
                       description: |
                         Beneficiary last name. Max length: 40 symbols, latin letters and special characters.
 
                         ⚠️ Required if currency [ticker](/glossary#ticker) is one of: UAH_IBAN, USD_VISAMASTER, USD, EUR
-                      example: "Lastname"
                     tin:
                       type: integer
                       description: |
                         Beneficiary TAX payer number. Integer, 10 digits.
 
                         ⚠️ Required if currency is UAH_IBAN.
-                      example: 1000000000
                     phone:
                       type: string
                       description: |
                         Beneficiary phone number.
 
                         ⚠️ Required if currency [ticker](/glossary#ticker) is one of: USD_VISAMASTER, EUR_VISAMASTER
-                      example: "1234567891"
                     email:
                       type: string
                       description: |
                         Beneficiary email.
 
                         ⚠️ Required if currency [ticker](/glossary#ticker) is one of: USD_VISAMASTER, EUR_VISAMASTER
-                      example: "john_doe@email.com"
                     birthDate:
                       type: string
                       format: date
@@ -1007,7 +973,6 @@ paths:
                         Beneficiary birth date. Format: YYYY-MM-DD.
 
                         ⚠️ Required if currency [ticker](/glossary#ticker) is one of: USD_VISAMASTER, EUR_VISAMASTER
-                      example: "1990-01-01"
                 travelRule:
                   type: object
                   description: |
@@ -1022,43 +987,36 @@ paths:
                         Travel rule receiver type. Values: "individual" or "entity"
 
                         ⚠️ Required if currency is crypto and the account is from [EEA](/glossary#european-economic-area-eea)
-                      example: "individual"
                     vasp:
                       type: string
                       description: |
                         Travel rule destination platform (VASP) name.
 
                         ⚠️ Required if currency is crypto and the account is from [EEA](/glossary#european-economic-area-eea)
-                      example: "Binance"
                     name:
                       type: string
                       description: |
                         Travel rule. If individual - first_name ; if entity - entity_name
 
                         ⚠️ Required if currency is crypto and the account is from [EEA](/glossary#european-economic-area-eea)
-                      example: "John"
                     address:
                       type: string
                       description: |
                         Travel rule. If individual - last_name ; if entity - entity_address
 
                         ⚠️ Required if currency is crypto and the account is from [EEA](/glossary#european-economic-area-eea)
-                      example: "123 Business Street, London, UK"
                 paymentDescription:
                   type: string
                   description: |
                     Description of withdrawal destination
 
                     ⚠️ Required if currency is crypto and withdrawal from whitebit-tr.com
-                  example: "Payment description"
                 request:
                   type: string
                   description: Request signature
-                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
-                  example: "{{nonce}}"
             examples:
               crypto:
                 summary: Crypto withdrawal
@@ -1311,13 +1269,6 @@ paths:
           application/json:
             schema:
               $ref: "#/components/schemas/WithdrawRequest"
-            example:
-              ticker: ETH
-              amount: "0.9"
-              address: "0x0964A6B8F794A4B8d61b62652dB27ddC9844FB4c"
-              uniqueId: "24529041"
-              request: "{{request}}"
-              nonce: "{{nonce}}"
       responses:
         "201":
           description: Validation succeeded and withdraw creation process is started. Check the request status by uniqueId in deposit/withdraw history.
@@ -1436,7 +1387,6 @@ paths:
                     **Not required** if **from** and **to** are set.
                   enum:
                     [deposit, withdraw, collateral-deposit, collateral-withdraw]
-                  example: "deposit"
                 from:
                   type: string
                   description: |
@@ -1444,7 +1394,6 @@ paths:
 
                     **Not required** if **method** is set.
                   enum: [main, spot, collateral]
-                  example: "main"
                 to:
                   type: string
                   description: |
@@ -1452,11 +1401,10 @@ paths:
 
                     **Not required** if **method** is set.
                   enum: [main, spot, collateral]
-                  example: "spot"
                 ticker:
                   type: string
                   description: "Currency's [ticker](/glossary#ticker). Example: BTC"
-                  example: "XLM"
+                  example: XLM
                 amount:
                   type: string
                   description: "Amount to transfer. Max [precision](/glossary#precision) = 8, value must be greater than zero and less than or equal to the available balance."
@@ -1464,11 +1412,9 @@ paths:
                 request:
                   type: string
                   description: Request signature
-                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
-                  example: "{{nonce}}"
             examples:
               usingMethod:
                 summary: Using method field (deprecated)
@@ -1636,44 +1582,36 @@ paths:
                   description: |
                     Method. Example: **1** to display deposits / **2** to display withdraws. Do not send this parameter in order to receive both deposits and withdraws.
                   enum: [1, 2]
-                  example: 1
                 ticker:
                   type: string
                   description: "Currency's [ticker](/glossary#ticker). Example: BTC"
-                  example: "BTC"
                 address:
                   type: string
                   description: Can be used for filtering transactions by specific address.
-                  example: "3ApEASLcrQtZpg1TsssFgYF5V5YQJAKvuE"
                 memo:
                   type: string
                   description: "Can be used for filtering transactions by specific [memo](/glossary#memodestination-tag)"
-                  example: "48565488244493"
                 addresses:
                   type: array
                   items:
                     type: string
                   maxItems: 20
                   description: Can be used for filtering transactions by specific array of addresses.
-                  example: ["3ApEASLcrQtZpg1TsssFgYF5V5YQJAKvuE"]
                 uniqueId:
                   type: string
                   description: Can be used for filtering transactions by specific unique id
-                  example: "24529041"
                 limit:
                   type: integer
                   minimum: 1
                   maximum: 100
                   default: 50
                   description: LIMIT is a special clause used to limit records a particular query can return.
-                  example: 100
                 offset:
                   type: integer
                   minimum: 0
                   maximum: 10000
                   default: 0
                   description: Use the OFFSET clause to return entries starting from a particular line.
-                  example: 0
                 status:
                   type: array
                   items:
@@ -1682,15 +1620,12 @@ paths:
                     Can be used for filtering transactions by status codes.
 
                     ⚠️ Caution: Use this parameter with the appropriate `transactionMethod` and valid status codes for that method. See the endpoint description above for valid codes. Example: `"status": [3,7]`
-                  example: [3, 7]
                 request:
                   type: string
                   description: Request signature
-                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
-                  example: "{{nonce}}"
             example:
               transactionMethod: 1
               ticker: "BTC"
@@ -1861,15 +1796,12 @@ paths:
                   type: string
                   description: Address type, available for specific currencies list (see address types table in endpoint description)
                   enum: [p2sh-segwit, bech32]
-                  example: "bech32"
                 request:
                   type: string
                   description: Request signature
-                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
-                  example: "{{nonce}}"
             examples:
               basic:
                 summary: Basic request
@@ -2028,20 +1960,16 @@ paths:
                   type: string
                   maxLength: 25
                   description: "Passphrase for applying [WhiteBIT codes](/glossary#whitebit-codes). Passphrase must contain only latin letters, numbers and symbols (like !@#$%^, no whitespaces). Max: 25 symbols."
-                  example: "some passphrase"
                 description:
                   type: string
                   maxLength: 75
                   description: "Additional text description for [code](/glossary#whitebit-codes). Visible only for creator. Max: 75 symbols."
-                  example: "some description"
                 request:
                   type: string
                   description: Request signature
-                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
-                  example: "{{nonce}}"
             example:
               ticker: "ETH"
               amount: "0.002"
@@ -2184,20 +2112,16 @@ paths:
                 code:
                   type: string
                   description: "[Code](/glossary#whitebit-codes) that will be applied."
-                  example: "WBe11f4fce-2a53-4edc-b195-66b693bd77e3ETH"
                 passphrase:
                   type: string
                   maxLength: 25
                   description: "Should be provided if the [code](/glossary#whitebit-codes) was created with passphrase. Max: 25 symbols."
-                  example: "some passphrase"
                 request:
                   type: string
                   description: Request signature
-                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
-                  example: "{{nonce}}"
             example:
               code: "WBe11f4fce-2a53-4edc-b195-66b693bd77e3ETH"
               passphrase: "some passphrase"
@@ -2284,22 +2208,18 @@ paths:
                   maximum: 100
                   default: 30
                   description: LIMIT is a special clause used to limit records a particular query can return.
-                  example: 30
                 offset:
                   type: integer
                   minimum: 0
                   maximum: 10000
                   default: 0
                   description: Use the OFFSET clause to return entries starting from a particular line.
-                  example: 0
                 request:
                   type: string
                   description: Request signature
-                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
-                  example: "{{nonce}}"
             example:
               request: "{{request}}"
               nonce: "{{nonce}}"
@@ -2403,22 +2323,18 @@ paths:
                   maximum: 100
                   default: 30
                   description: LIMIT is a special clause used to limit records a particular query can return.
-                  example: 100
                 offset:
                   type: integer
                   minimum: 0
                   maximum: 10000
                   default: 0
                   description: Use the OFFSET clause to return entries starting from a particular line.
-                  example: 0
                 request:
                   type: string
                   description: Request signature
-                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
-                  example: "{{nonce}}"
             example:
               request: "{{request}}"
               nonce: "{{nonce}}"
@@ -2535,15 +2451,12 @@ paths:
                 ticker:
                   type: string
                   description: "[Invest plan](/glossary#crypto-lending) source currency's [ticker](/glossary#ticker). Example: BTC"
-                  example: "USDT"
                 request:
                   type: string
                   description: Request signature
-                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
-                  example: "{{nonce}}"
             example:
               ticker: "USDT"
               request: "{{request}}"
@@ -2614,19 +2527,15 @@ paths:
                 planId:
                   type: string
                   description: "[Invest plan](/glossary#crypto-lending) identifier"
-                  example: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
                 amount:
                   type: string
                   description: Investment amount
-                  example: "100"
                 request:
                   type: string
                   description: Request signature
-                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
-                  example: "{{nonce}}"
             example:
               planId: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
               amount: "100"
@@ -2798,15 +2707,12 @@ paths:
                 id:
                   type: string
                   description: Investment identifier
-                  example: "0d7b66ff-1909-4938-ab7a-d16d9a64dcd5"
                 request:
                   type: string
                   description: Request signature
-                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
-                  example: "{{nonce}}"
             example:
               id: "0d7b66ff-1909-4938-ab7a-d16d9a64dcd5"
               request: "{{request}}"
@@ -2863,38 +2769,31 @@ paths:
                 id:
                   type: string
                   description: Investment identifier
-                  example: "0d7b66ff-1909-4938-ab7a-d16d9a64dcd5"
                 ticker:
                   type: string
                   description: "[Invest plan](/glossary#crypto-lending) source currency's [ticker](/glossary#ticker)"
-                  example: "USDT"
                 status:
                   type: integer
                   description: Investment status (1 - active, 2 - closed)
                   enum: [1, 2]
-                  example: 1
                 limit:
                   type: integer
                   minimum: 1
                   maximum: 100
                   default: 100
                   description: LIMIT is a special clause used to limit records a particular query can return.
-                  example: 100
                 offset:
                   type: integer
                   minimum: 0
                   maximum: 10000
                   default: 0
                   description: Use the OFFSET clause to return entries starting from a particular line.
-                  example: 0
                 request:
                   type: string
                   description: Request signature
-                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
-                  example: "{{nonce}}"
             example:
               id: "0d7b66ff-1909-4938-ab7a-d16d9a64dcd5"
               ticker: "USDT"
@@ -2985,33 +2884,27 @@ paths:
                 planId:
                   type: string
                   description: "[Invest plan](/glossary#crypto-lending) identifier"
-                  example: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
                 ticker:
                   type: string
                   description: "[Invest plan](/glossary#crypto-lending) target currency's [ticker](/glossary#ticker)"
-                  example: "USDT"
                 limit:
                   type: integer
                   minimum: 1
                   maximum: 100
                   default: 100
                   description: LIMIT is a special clause used to limit records a particular query can return.
-                  example: 100
                 offset:
                   type: integer
                   minimum: 0
                   maximum: 10000
                   default: 0
                   description: Use the OFFSET clause to return entries starting from a particular line.
-                  example: 0
                 request:
                   type: string
                   description: Request signature
-                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
-                  example: "{{nonce}}"
             example:
               planId: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
               ticker: "USDT"
@@ -3091,25 +2984,20 @@ paths:
                   maximum: 100
                   default: 100
                   description: Pagination limit.
-                  example: 50
                 offset:
                   type: integer
                   minimum: 0
                   default: 0
                   description: Pagination offset.
-                  example: 0
                 ticker:
                   type: string
                   description: "Filter by currency [ticker](/glossary#ticker). Example: USDT"
-                  example: "USDT"
                 request:
                   type: string
                   description: Request signature
-                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
-                  example: "{{nonce}}"
             example:
               limit: 50
               offset: 0
@@ -3191,37 +3079,29 @@ paths:
                   type: integer
                   default: 100
                   description: "Pagination limit. Default: 100."
-                  example: 100
                 offset:
                   type: integer
                   default: 0
                   description: "Pagination offset. Default: 0."
-                  example: 0
                 ticker:
                   type: string
                   description: "Filter by currency [ticker](/glossary#ticker). Example: USDT."
-                  example: "USDT"
                 plan:
                   type: string
                   description: Filter by plan ID (UUID).
-                  example: "8f2e9d3c-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
                 investment:
                   type: string
                   description: Filter by investment ID.
-                  example: "inv_7e2d9c3b-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
                 investmentStatus:
                   type: integer
                   description: Filter by status (1=ACTIVE, 0=CLOSED).
                   enum: [0, 1]
-                  example: 1
                 request:
                   type: string
                   description: Request signature
-                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
-                  example: "{{nonce}}"
             example:
               limit: 100
               offset: 0
@@ -3316,46 +3196,36 @@ paths:
                   type: integer
                   default: 50
                   description: Pagination limit.
-                  example: 50
                 offset:
                   type: integer
                   default: 0
                   description: Pagination offset.
-                  example: 0
                 plan:
                   type: string
                   description: Filter by plan ID (UUID).
-                  example: "8f2e9d3c-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
                 investment:
                   type: string
                   description: Filter by investment ID.
-                  example: "inv_7e2d9c3b-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
                 transaction:
                   type: string
                   description: Filter by transaction ID.
-                  example: "tx_9f3e0d4c-2b5c-4d3e-8f6g-7a8b9c0d1e2f"
                 dateFrom:
                   type: integer
                   description: Filter from date (timestamp).
-                  example: 1640995200
                 dateTo:
                   type: integer
                   description: Filter to date (timestamp).
-                  example: 1641081600
                 actionTypes:
                   type: array
                   items:
                     type: integer
                   description: Array of operation type IDs. See table below.
-                  example: [1, 2, 4]
                 request:
                   type: string
                   description: Request signature
-                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
-                  example: "{{nonce}}"
             example:
               limit: 50
               offset: 0
@@ -3444,40 +3314,31 @@ paths:
                   type: integer
                   default: 50
                   description: Pagination limit.
-                  example: 50
                 offset:
                   type: integer
                   default: 0
                   description: Pagination offset.
-                  example: 0
                 plan:
                   type: string
                   description: Filter by plan ID (UUID).
-                  example: "8f2e9d3c-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
                 investment:
                   type: string
                   description: Filter by investment ID.
-                  example: "inv_7e2d9c3b-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
                 transaction:
                   type: string
                   description: Filter by transaction ID.
-                  example: "tx_9f3e0d4c-2b5c-4d3e-8f6g-7a8b9c0d1e2f"
                 dateFrom:
                   type: integer
                   description: Filter from date (timestamp).
-                  example: 1640995200
                 dateTo:
                   type: integer
                   description: Filter to date (timestamp).
-                  example: 1641081600
                 request:
                   type: string
                   description: Request signature
-                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
-                  example: "{{nonce}}"
             example:
               limit: 50
               offset: 0
@@ -3562,24 +3423,19 @@ paths:
                 plan:
                   type: string
                   description: Plan external ID (UUID).
-                  example: "8f2e9d3c-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
                 amount:
                   type: string
                   description: Investment amount.
-                  example: "1000.500000"
                 withReinvest:
                   type: boolean
                   default: false
                   description: Enable auto-reinvestment.
-                  example: true
                 request:
                   type: string
                   description: Request signature
-                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
-                  example: "{{nonce}}"
             example:
               plan: "8f2e9d3c-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
               amount: "1000.500000"
@@ -3666,19 +3522,15 @@ paths:
                 plan:
                   type: string
                   description: Plan external ID (UUID).
-                  example: "8f2e9d3c-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
                 amount:
                   type: string
                   description: Withdrawal amount.
-                  example: "500.250000"
                 request:
                   type: string
                   description: Request signature
-                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
-                  example: "{{nonce}}"
             example:
               plan: "8f2e9d3c-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
               amount: "500.250000"
@@ -3760,15 +3612,12 @@ paths:
                 plan:
                   type: string
                   description: Plan external ID (UUID).
-                  example: "8f2e9d3c-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
                 request:
                   type: string
                   description: Request signature
-                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
-                  example: "{{nonce}}"
             example:
               plan: "8f2e9d3c-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
               request: "{{request}}"
@@ -3847,20 +3696,16 @@ paths:
                 plan:
                   type: string
                   description: Plan external ID (UUID).
-                  example: "8f2e9d3c-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
                 enabled:
                   type: boolean
                   default: false
                   description: Enable or disable auto-reinvestment.
-                  example: true
                 request:
                   type: string
                   description: Request signature
-                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
-                  example: "{{nonce}}"
             example:
               plan: "8f2e9d3c-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
               enabled: true
@@ -3934,11 +3779,9 @@ paths:
                 request:
                   type: string
                   description: Request signature
-                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
-                  example: "{{nonce}}"
       responses:
         "200":
           description: Successful response
@@ -3984,15 +3827,12 @@ paths:
                 alias:
                   type: string
                   description: Name for sub-account
-                  example: "trading_bot"
                 email:
                   type: string
                   description: Sub-account email (required when shareKyc is false)
-                  example: "sub@example.com"
                 shareKyc:
                   type: boolean
                   description: If KYC shared with main account
-                  example: false
                 permissions:
                   type: object
                   required:
@@ -4002,11 +3842,9 @@ paths:
                     spotEnabled:
                       type: boolean
                       description: Enable transfers to trade balance
-                      example: true
                     collateralEnabled:
                       type: boolean
                       description: Enable transfers to collateral balance
-                      example: false
       responses:
         "201":
           description: Sub-account created successfully
@@ -4065,9 +3903,6 @@ paths:
                 id:
                   type: string
                   description: Sub-account id
-                  example: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
-            example:
-              id: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
       responses:
         "200":
           description: Sub-account deleted successfully
@@ -4075,7 +3910,6 @@ paths:
             application/json:
               schema:
                 type: object
-              example: {}
         "400":
           description: Request validation failed
           content:
@@ -4113,11 +3947,9 @@ paths:
                 id:
                   type: string
                   description: Sub-account id
-                  example: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
                 alias:
                   type: string
                   description: Name for sub-account
-                  example: "training"
                 permissions:
                   type: object
                   required:
@@ -4127,17 +3959,9 @@ paths:
                     spotEnabled:
                       type: boolean
                       description: Enable transfers to trade balance
-                      example: true
                     collateralEnabled:
                       type: boolean
                       description: Enable transfers to collateral balance
-                      example: false
-            example:
-              id: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
-              alias: training
-              permissions:
-                spotEnabled: true
-                collateralEnabled: false
       responses:
         "200":
           description: Sub-account edited successfully
@@ -4145,7 +3969,6 @@ paths:
             application/json:
               schema:
                 type: object
-              example: {}
         "400":
           description: Request validation failed
           content:
@@ -4179,19 +4002,16 @@ paths:
                 search:
                   type: string
                   description: Search term
-                  example: "trading"
                 limit:
                   type: integer
                   minimum: 1
                   maximum: 100
                   default: 30
-                  example: 30
                 offset:
                   type: integer
                   minimum: 0
                   maximum: 10000
                   default: 0
-                  example: 0
       responses:
         "200":
           description: Successful response
@@ -4246,20 +4066,16 @@ paths:
                 id:
                   type: string
                   description: Sub-account id
-                  example: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
                 direction:
                   type: string
                   enum: [main_to_sub, sub_to_main]
                   description: Transfer direction
-                  example: "main_to_sub"
                 amount:
                   type: string
                   description: Transfer amount (min 0.00000001)
-                  example: "0.5"
                 ticker:
                   type: string
                   description: "Currency's [ticker](/glossary#ticker)"
-                  example: "ETH"
       responses:
         "200":
           description: Transfer successful
@@ -4306,9 +4122,6 @@ paths:
                 id:
                   type: string
                   description: Sub-account id
-                  example: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
-            example:
-              id: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
       responses:
         "200":
           description: Sub-account blocked successfully
@@ -4316,7 +4129,6 @@ paths:
             application/json:
               schema:
                 type: object
-              example: {}
         "400":
           description: Request validation failed
           content:
@@ -4352,9 +4164,6 @@ paths:
                 id:
                   type: string
                   description: Sub-account id
-                  example: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
-            example:
-              id: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
       responses:
         "200":
           description: Sub-account unblocked successfully
@@ -4362,7 +4171,6 @@ paths:
             application/json:
               schema:
                 type: object
-              example: {}
         "400":
           description: Request validation failed
           content:
@@ -4398,14 +4206,9 @@ paths:
                 id:
                   type: string
                   description: Sub-account id
-                  example: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
                 ticker:
                   type: string
                   description: Currency's ticker (if not provided, returns data by all currencies)
-                  example: "USDC"
-            example:
-              id: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
-              ticker: USDC
       responses:
         "200":
           description: Successful response
@@ -4424,11 +4227,6 @@ paths:
                         type: string
                       collateral:
                         type: string
-              example:
-                USDC:
-                  - main: "42"
-                    spot: "10"
-                    collateral: "14"
         "422":
           description: Account is not confirmed
           content:
@@ -4469,24 +4267,20 @@ paths:
                 id:
                   type: string
                   description: Sub-account id
-                  example: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
                 direction:
                   type: string
                   enum: [main_to_sub, sub_to_main]
                   description: Transfer direction (optional)
-                  example: "main_to_sub"
                 limit:
                   type: integer
                   minimum: 1
                   maximum: 100
                   default: 30
-                  example: 30
                 offset:
                   type: integer
                   minimum: 0
                   maximum: 10000
                   default: 0
-                  example: 0
       responses:
         "200":
           description: Successful response
@@ -4536,15 +4330,12 @@ paths:
                   type: integer
                   description: Type of API key (1 - info and trading; 2 - info, trading, deposits, withdraws)
                   enum: [1, 2]
-                  example: 1
                 subAccountId:
                   type: string
                   description: ID of the sub-account to create the API key for
-                  example: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
                 title:
                   type: string
                   description: Custom title/name for the API key
-                  example: "Trading Bot Key"
       responses:
         "201":
           description: API key created successfully
@@ -4589,11 +4380,9 @@ paths:
                 apiKeyId:
                   type: string
                   description: ID of the API key to update
-                  example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
                 title:
                   type: string
                   description: New title for the API key
-                  example: "Trading Bot Key"
                 urls:
                   type: array
                   description: Array of URL objects for API key restrictions
@@ -4602,18 +4391,8 @@ paths:
                     properties:
                       url:
                         type: string
-                        example: "/api/v4/main-account/balance"
                       enable:
                         type: boolean
-                        example: true
-            example:
-              apiKeyId: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
-              title: Trading Bot Key
-              urls:
-                - url: /api/v4/main-account/withdraw
-                  enable: false
-                - url: /api/v4/main-account/balance
-                  enable: true
       responses:
         "200":
           description: API key updated successfully
@@ -4621,7 +4400,6 @@ paths:
             application/json:
               schema:
                 type: object
-              example: {}
         "400":
           description: Request validation failed
           content:
@@ -4657,9 +4435,6 @@ paths:
                 apiKeyId:
                   type: string
                   description: ID of the API key to delete
-                  example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
-            example:
-              apiKeyId: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
       responses:
         "200":
           description: API key deleted successfully
@@ -4667,7 +4442,6 @@ paths:
             application/json:
               schema:
                 type: object
-              example: {}
         "400":
           description: Request validation failed
           content:
@@ -4702,19 +4476,16 @@ paths:
                 subAccountId:
                   type: string
                   description: ID of the sub-account to list API keys for
-                  example: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
                 limit:
                   type: integer
                   minimum: 1
                   maximum: 100
                   default: 30
-                  example: 30
                 offset:
                   type: integer
                   minimum: 0
                   maximum: 10000
                   default: 0
-                  example: 0
       responses:
         "200":
           description: Successful response
@@ -4766,9 +4537,6 @@ paths:
                 apiKeyId:
                   type: string
                   description: ID of the API key to reset
-                  example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
-            example:
-              apiKeyId: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
       responses:
         "200":
           description: API key reset successfully
@@ -4776,7 +4544,6 @@ paths:
             application/json:
               schema:
                 type: object
-              example: {}
         "400":
           description: Request validation failed
           content:
@@ -4812,7 +4579,6 @@ paths:
                 apiKeyId:
                   type: string
                   description: ID of the API key to list IP addresses for
-                  example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
       responses:
         "200":
           description: Successful response
@@ -4861,11 +4627,9 @@ paths:
                 apiKeyId:
                   type: string
                   description: ID of the API key to add IP address to
-                  example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
                 ip:
                   type: string
                   description: IP address to add to allowed list
-                  example: "192.168.1.100"
       responses:
         "201":
           description: IP address added successfully
@@ -4914,11 +4678,9 @@ paths:
                 apiKeyId:
                   type: string
                   description: ID of the API key to remove IP address from
-                  example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
                 ip:
                   type: string
                   description: IP address to remove from allowed list
-                  example: "192.168.1.100"
       responses:
         "200":
           description: IP address removed successfully
@@ -4964,27 +4726,22 @@ paths:
                 account:
                   type: string
                   description: Mining pool account
-                  example: "miner123"
                 from:
                   type: integer
                   description: Date timestamp starting from which rewards are received
-                  example: 1640995200
                 to:
                   type: integer
                   description: Date timestamp until which rewards are received
-                  example: 1641081600
                 limit:
                   type: integer
                   minimum: 1
                   maximum: 100
                   default: 30
-                  example: 30
                 offset:
                   type: integer
                   minimum: 0
                   maximum: 10000
                   default: 0
-                  example: 0
       responses:
         "200":
           description: Successful response
@@ -5044,21 +4801,17 @@ paths:
                 account:
                   type: string
                   description: Mining pool account
-                  example: "miner123"
                 from:
                   type: integer
                   description: Unix timestamp of starting point
-                  example: 1640995200
                 to:
                   type: integer
                   description: Unix timestamp of final point
-                  example: 1641081600
                 interval:
                   type: string
                   enum: [5m, 1h, 24h]
                   default: 1h
                   description: Timestamp interval
-                  example: "1h"
       responses:
         "200":
           description: Successful response
@@ -5126,11 +4879,9 @@ paths:
                 request:
                   type: string
                   description: Request signature
-                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
-                  example: "{{nonce}}"
       responses:
         "200":
           description: Successful response
@@ -5226,35 +4977,27 @@ components:
         ticker:
           type: string
           description: "Currencies [ticker](/glossary#ticker). Example: BTC ⚠️ Currencies ticker must have \"can_deposit\" status equal to \"true\". Use [Asset Status endpoint](/public/http-v4/asset-status-list) to know more about currency."
-          example: "ETH"
         amount:
           type: string
           description: "Withdraw amount (including [fee](/glossary#fee)). To add the fee to the specified amount, use the /main-account/withdraw-pay request"
-          example: "0.9"
         address:
           type: string
           description: "Target address (wallet address for cryptocurrencies, identifier/[card token](/glossary#card-token) for [fiat](/glossary#fiat) currencies)"
-          example: "0x0964A6B8F794A4B8d61b62652dB27ddC9844FB4c"
         memo:
           type: string
           description: "Required if currency is memoable. See [memo](/glossary#memodestination-tag) for details."
-          example: "48565488244493"
         uniqueId:
           type: string
           description: "Unique transaction identifier. ⚠️ Generate a new unique ID for each withdrawal request."
-          example: "24529041"
         provider:
           type: string
           description: "[Fiat](/glossary#fiat) currency [provider](/glossary#provider). Example: VISAMASTER ⚠️ Currency provider should be taken from [Asset Status endpoint](/public/http-v4/asset-status-list) response. Required if currency is fiat."
-          example: "VISAMASTER"
         network:
           type: string
           description: "Cryptocurrency network. Available for [multinetwork](/glossary#multinetwork) currencies. Example: OMNI ⚠️ Currency network should be taken from [Asset Status endpoint](/public/http-v4/asset-status-list) response. Default for USDT is ERC20"
-          example: "ERC20"
         partialEnable:
           type: boolean
           description: "Optional parameter for [FIAT](/glossary#fiat) withdrawals with increased Maximum Limit if set as \"true\". To use this parameter, the application must support \"Partially successful\" withdrawal status and latest updates in deposit/withdrawal history."
-          example: false
         beneficiary:
           type: object
           description: "Beneficiary information data. Required if currency [ticker](/glossary#ticker) is one of: UAH_IBAN, USD_VISAMASTER, EUR_VISAMASTER, USD, EUR"
@@ -5264,11 +5007,9 @@ components:
         request:
           type: string
           description: "Request signature"
-          example: "{{request}}"
         nonce:
           type: string
           description: "Unique request identifier"
-          example: "{{nonce}}"
 
     TransactionHistory:
       type: object
@@ -5276,61 +5017,47 @@ components:
         address:
           type: string
           description: Deposit/Withdraw address
-          example: "3ApEASLcrQtZpg1TsssFgYF5V5YQJAKvuE"
         uniqueId:
           type: string
           nullable: true
           description: Unique Id of deposit/withdraw
-          example: null
         createdAt:
           type: integer
           description: Timestamp of deposit/withdraw
-          example: 1593437922
         currency:
           type: string
           description: Deposit/Withdraw currency full name
-          example: "Bitcoin"
         ticker:
           type: string
           description: "Deposit/Withdraw currency [ticker](/glossary#ticker)"
-          example: "BTC"
         method:
           type: integer
           description: "Called method: 1 - deposit, 2 - withdraw"
-          example: 1
         amount:
           type: string
           description: Amount of deposit/withdraw
-          example: "0.0006"
         description:
           type: string
           description: Deposit/Withdraw description
-          example: ""
         memo:
           type: string
           description: "[Memo](/glossary#memodestination-tag) for deposit/withdraw"
-          example: ""
         fee:
           type: string
           description: "[Fee](/glossary#fee) for deposit/withdraw"
-          example: "0"
         status:
           type: integer
           description: Transaction status (see endpoint description for status codes)
-          example: 15
         network:
           type: string
           nullable: true
           description: Network if currency is multinetwork
-          example: null
         transactionHash:
           type: string
           description: Deposit/Withdraw transaction hash
-          example: "3b49d7b8cf7a4d3c1234567890abcdef"
         transactionId:
           type: string
           description: Transaction ID
-          example: "tx-id-1234"
         details:
           type: object
           nullable: true
@@ -5343,11 +5070,9 @@ components:
             actual:
               type: integer
               description: Actual number of confirmations
-              example: 3
             required:
               type: integer
               description: Required number of confirmations
-              example: 6
 
     CodeInfo:
       type: object
@@ -5355,27 +5080,21 @@ components:
         amount:
           type: string
           description: "Code amount"
-          example: "100"
         code:
           type: string
           description: "WhiteBIT code"
-          example: "WBe50fbe4d5d...ee33"
         date:
           type: integer
           description: "Code creation timestamp"
-          example: 1598296132
         status:
           type: string
           description: "Code status"
-          example: "active"
         ticker:
           type: string
           description: "Code [ticker](/glossary#ticker)"
-          example: "USDT"
         external_id:
           type: string
           description: "Code external identifier"
-          example: "id1"
 
     CodeHistory:
       type: object
@@ -5383,27 +5102,21 @@ components:
         amount:
           type: string
           description: "Code amount change (- is created, + is applied)"
-          example: "-100"
         code:
           type: string
           description: "WhiteBIT code"
-          example: "WBe50fbe4d5d...ee33"
         date:
           type: integer
           description: "Code activation timestamp (for applied) or code creation timestamp (for created)"
-          example: 1598296132
         status:
           type: string
           description: "Current code status"
-          example: "applied"
         ticker:
           type: string
           description: "Code [ticker](/glossary#ticker)"
-          example: "USDT"
         external_id:
           type: string
           description: "Code external identifier"
-          example: "id1"
 
     FixedPlan:
       type: object
@@ -5411,43 +5124,33 @@ components:
         id:
           type: string
           description: Invest plan identifier
-          example: "1"
         ticker:
           type: string
           description: Source currency ticker
-          example: "BTC"
         status:
           type: integer
           description: Status (1 - active, 2 - no coins left, 3 - inactive, 4 - pause)
-          example: 1
         percent:
           type: string
           description: Interest percent
-          example: "0.01"
         duration:
           type: integer
           description: Investment duration (in minutes)
-          example: 40320
         interestTicker:
           type: string
           description: Target currency ticker
-          example: "BTC"
         interestRatio:
           type: string
           description: Target currency to source currency ratio
-          example: "1"
         minInvestment:
           type: string
           description: "Minimum investment amount"
-          example: "100"
         maxInvestment:
           type: string
           description: "Maximum investment amount"
-          example: "10000"
         maxPossibleInvestment:
           type: string
           description: "Maximum investment amount due to current invest plan state"
-          example: "3000"
 
     Investment:
       type: object
@@ -5455,34 +5158,27 @@ components:
         id:
           type: string
           description: "Investment identifier"
-          example: "1232"
         plan:
           $ref: "#/components/schemas/FixedPlan"
           description: "Investment plan (similar to Get plans response)"
         status:
           type: integer
           description: "Investment status (1 - active, 2 - closed)"
-          example: 1
         created:
           type: integer
           description: "Timestamp of investment creation"
-          example: 1588345560
         updated:
           type: integer
           description: "Timestamp of investment update"
-          example: 1588345560
         paymentTime:
           type: integer
           description: "Timestamp of the payment time"
-          example: 1588345560
         amount:
           type: string
           description: "Investment amount"
-          example: "100"
         interestPaid:
           type: string
           description: "Interest paid amount"
-          example: "0.01"
 
     InterestPayment:
       type: object
@@ -5490,23 +5186,18 @@ components:
         planId:
           type: string
           description: "Invest plan identifier"
-          example: "1"
         investmentId:
           type: string
           description: "Investment identifier"
-          example: "1232"
         amount:
           type: string
           description: "Interest amount"
-          example: "0.01"
         ticker:
           type: string
           description: "Interest currency [ticker](/glossary#ticker)"
-          example: "BTC"
         timestamp:
           type: integer
           description: "Transaction timestamp"
-          example: 1588345560
 
     FlexPlan:
       type: object
@@ -5514,23 +5205,18 @@ components:
         id:
           type: string
           description: "Flex plan identifier"
-          example: "12"
         ticker:
           type: string
           description: "Currency [ticker](/glossary#ticker)"
-          example: "USDT"
         minInvestment:
           type: string
           description: "Minimum investment amount"
-          example: "10.0"
         maxInvestment:
           type: string
           description: "Maximum investment amount"
-          example: "100000.0"
         maxRate:
           type: string
           description: "Maximum interest rate"
-          example: "0.0030"
 
     FlexInvestment:
       type: object
@@ -5538,35 +5224,27 @@ components:
         id:
           type: string
           description: "Flex investment identifier"
-          example: "2765"
         planId:
           type: string
           description: "Flex plan identifier"
-          example: "12"
         currency:
           type: string
           description: "Investment currency"
-          example: "USDT"
         invested:
           type: string
           description: "Invested amount"
-          example: "100"
         withAutoReinvest:
           type: boolean
           description: "Auto-reinvestment enabled"
-          example: true
         status:
           type: integer
           description: "Investment status (1=ACTIVE, 0=CLOSED)"
-          example: 1
         createdAt:
           type: integer
           description: "Investment creation timestamp"
-          example: 1588345560
         updatedAt:
           type: integer
           description: "Investment last update timestamp"
-          example: 1588345560
 
     FlexInvestmentHistory:
       type: object
@@ -5574,31 +5252,24 @@ components:
         createdAt:
           type: integer
           description: "Transaction creation timestamp"
-          example: 1588345560
         planId:
           type: string
           description: "Flex plan identifier"
-          example: "12"
         investmentId:
           type: string
           description: "Flex investment identifier"
-          example: "2765"
         currency:
           type: string
           description: "Transaction currency"
-          example: "USDT"
         amount:
           type: string
           description: "Transaction amount"
-          example: "100"
         transactionId:
           type: string
           description: "Transaction identifier"
-          example: "tx_123456"
         actionType:
           type: integer
           description: "Action type: 1-INVEST, 2-REINVEST, 3-WITHDRAW_FROM_INVESTMENT, 4-DAILY_EARNING, 5-CLOSE_INVESTMENT, 6-OPEN_INVESTMENT"
-          example: 1
 
     FeeInfo:
       type: object
@@ -5606,19 +5277,15 @@ components:
         ticker:
           type: string
           description: "Currency [ticker](/glossary#ticker)"
-          example: "ETH"
         name:
           type: string
           description: "Currency name"
-          example: "Ethereum"
         can_deposit:
           type: string
           description: "Deposit status (currency availability)"
-          example: "1"
         can_withdraw:
           type: string
           description: "Withdrawal status (currency availability)"
-          example: "1"
         deposit:
           type: object
           description: "Deposit fees and limits"
@@ -5626,27 +5293,21 @@ components:
             minFlex:
               type: string
               description: "Minimum fee amount when flex fee is enabled"
-              example: "0"
             maxFlex:
               type: string
               description: "Maximum fee amount when flex fee is enabled"
-              example: "0"
             percentFlex:
               type: string
               description: "Flex fee percent"
-              example: "0"
             fixed:
               type: string
               description: "Fixed fee"
-              example: "0"
             minAmount:
               type: string
               description: "Minimum deposit amount"
-              example: "0.01"
             maxAmount:
               type: string
               description: "Maximum deposit amount"
-              example: "0"
         withdraw:
           type: object
           description: "Withdrawal fees and limits"
@@ -5654,27 +5315,21 @@ components:
             minFlex:
               type: string
               description: "Minimum fee amount when flex fee is enabled"
-              example: "0"
             maxFlex:
               type: string
               description: "Maximum fee amount when flex fee is enabled"
-              example: "0"
             percentFlex:
               type: string
               description: "Flex fee percent"
-              example: "0"
             fixed:
               type: string
               description: "Fixed fee"
-              example: "0.0004"
             minAmount:
               type: string
               description: "Minimum withdrawal amount"
-              example: "0.01"
             maxAmount:
               type: string
               description: "Maximum withdrawal amount"
-              example: "0"
 
     SubAccount:
       type: object
@@ -5682,27 +5337,21 @@ components:
         id:
           type: string
           description: "Sub-account identifier"
-          example: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
         alias:
           type: string
           description: "Sub-account alias/name"
-          example: "trading_bot"
         userId:
           type: string
           description: "User identifier associated with account"
-          example: "u-12345"
         email:
           type: string
           description: "Sub-account email (masked)"
-          example: "s***@example.com"
         status:
           type: string
           description: "Sub-account status"
-          example: "active"
         color:
           type: string
           description: "Sub-account color"
-          example: "#FF5733"
         kyc:
           type: object
           description: "KYC information"
@@ -5710,11 +5359,9 @@ components:
             shareKyc:
               type: boolean
               description: "Whether KYC is shared with main account"
-              example: false
             kycStatus:
               type: string
               description: "KYC status"
-              example: "verified"
         permissions:
           type: object
           description: "Sub-account permissions"
@@ -5722,11 +5369,9 @@ components:
             spotEnabled:
               type: boolean
               description: "Spot trading enabled"
-              example: true
             collateralEnabled:
               type: boolean
               description: "Collateral trading enabled"
-              example: false
 
     SubAccountTransfer:
       type: object
@@ -5734,28 +5379,22 @@ components:
         transactionId:
           type: string
           description: "Transaction identifier. Same value as id. Correlate with the transfer endpoint response using the transactionId field."
-          example: "tx-abc123"
         id:
           type: string
           description: "Transfer identifier"
           deprecated: true
-          example: "tx-abc123"
         direction:
           type: string
           description: "Transfer direction (main_to_sub or sub_to_main)"
-          example: "main_to_sub"
         currency:
           type: string
           description: "Currency transferred"
-          example: "ETH"
         amount:
           type: string
           description: "Transfer amount"
-          example: "0.5"
         createdAt:
           type: integer
           description: "Transfer creation timestamp"
-          example: 1641081600
 
     SubAccountApiKey:
       type: object
@@ -5763,39 +5402,30 @@ components:
         subAccountId:
           type: string
           description: "Sub-account identifier"
-          example: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
         id:
           type: string
           description: "API key identifier"
-          example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
         title:
           type: string
           description: "API key title/name"
-          example: "Trading Bot Key"
         isEnabled:
           type: boolean
           description: "Whether the API key is enabled"
-          example: true
         apiKey:
           type: string
           description: "API key"
-          example: "pub-key-abc123"
         apiSecret:
           type: string
           description: "API secret"
-          example: "secret-xyz789"
         type:
           type: integer
           description: "API key type (1 - info and trading, 2 - info, trading, deposit and withdraw)"
-          example: 1
         lastActivity:
           type: integer
           description: "Last activity timestamp"
-          example: 1641081600
         restrictAccess:
           type: boolean
           description: "Whether access is restricted"
-          example: false
         accessEndpoints:
           type: array
           description: "List of allowed endpoints"
@@ -5805,43 +5435,32 @@ components:
               name:
                 type: string
                 description: "Endpoint name"
-                example: "/api/v4/main-account/balance"
               title:
                 type: string
                 description: "Endpoint title"
-                example: "Get Balance"
 
     SubAccountApiKeyList:
       type: object
       properties:
         subAccountId:
           type: string
-          example: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
         id:
           type: string
-          example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
         title:
           type: string
-          example: "Trading Bot Key"
         isEnabled:
           type: boolean
-          example: true
         apiKey:
           type: string
-          example: "pub-key-abc123"
         apiSecret:
           type: string
           description: Empty for security (only shown during creation)
-          example: ""
         type:
           type: string
-          example: "1"
         lastActivity:
           type: integer
-          example: 1641081600
         restrictAccess:
           type: boolean
-          example: false
         accessEndpoints:
           type: array
           items:
@@ -5849,10 +5468,8 @@ components:
             properties:
               name:
                 type: string
-                example: "/api/v4/main-account/balance"
               title:
                 type: string
-                example: "Get Balance"
 
     MiningReward:
       type: object
@@ -5860,56 +5477,41 @@ components:
         miningAccountName:
           type: string
           description: "Mining account name"
-          example: "miner123"
         totalReward:
           type: string
           description: "Total reward amount"
-          example: "0.00125"
         reward:
           type: string
           description: "Reward amount (without fee)"
-          example: "0.001"
         fee:
           type: string
           description: "Fee amount"
-          example: "0.00025"
         fppsRate:
           type: string
           description: "FPPS rate"
-          example: "0.000125"
         hashRate:
           type: string
           description: "Hash rate"
-          example: "100TH/s"
         date:
           type: integer
           description: "Reward date timestamp"
-          example: 1641081600
 
     CreditLine:
       type: object
       properties:
         asset:
           type: string
-          example: "BTC"
         amount:
           type: string
-          example: "1.5"
         totalFunding:
           type: string
-          example: "0.5"
         currentLtv:
           type: string
-          example: "25"
         initialLtv:
           type: string
-          example: "60"
         marginCallLtv:
           type: string
-          example: "75"
         liquidationLtv:
           type: string
-          example: "85"
         createdAt:
-          type: integer
-          example: 1715339355
\ No newline at end of file
+          type: integer
\ No newline at end of file
diff --git a/openapi/public/http-v4.yaml b/openapi/public/http-v4.yaml
index 884ecae..14cc5c4 100644
--- a/openapi/public/http-v4.yaml
+++ b/openapi/public/http-v4.yaml
@@ -36,9 +36,9 @@ paths:
                 type: object
                 properties:
                   status:
-                    type: string
+                    type: integer
                     description: "1 - system operational, 0 - system maintenance"
-                    example: "1"
+                    example: 1
 
   /api/v4/public/markets:
     get:
@@ -512,54 +512,8 @@ paths:
             application/json:
               schema:
                 type: object
-                additionalProperties:
-                  $ref: '#/components/schemas/FeeInfo'
-              example:
-                "USDT (ERC20)":
-                  ticker: "USDT"
-                  name: "Tether US"
-                  providers: []
-                  deposit:
-                    min_amount: "0.0005"
-                    max_amount: "0.1"
-                    fixed: "0.0005"
-                    flex:
-                      min_fee: "100"
-                      max_fee: "1000"
-                      percent: "10"
-                  withdraw:
-                    min_amount: "0.001"
-                    max_amount: "0"
-                    fixed: null
-                    flex: null
-                  is_depositable: true
-                  is_withdrawal: true
-                  is_api_withdrawal: true
-                  is_api_depositable: true
-                USD:
-                  ticker: "USD"
-                  name: "United States Dollar"
-                  providers: ["USD_ADVCASH", "USD_CAPITALIST", "USD_EPAY_COM", "USD_PERFECT_MONEY", "USD_VISAMASTER_INTERKASSA"]
-                  deposit:
-                    USD_VISAMASTER_INTERKASSA:
-                      min_amount: "10"
-                      max_amount: "1500"
-                      fixed: null
-                      flex: null
-                      is_depositable: false
-                      is_api_depositable: true
-                      name: "USD Visa/MasterCard Interkassa"
-                      ticker: "USD_VISAMASTER_INTERKASSA"
-                  withdraw:
-                    USD_VISAMASTER_INTERKASSA:
-                      min_amount: "20"
-                      max_amount: "1500"
-                      fixed: null
-                      flex: null
-                      is_withdrawal: false
-                      is_api_withdrawal: true
-                      name: "USD Visa/MasterCard Interkassa"
-                      ticker: "USD_VISAMASTER_INTERKASSA"
+                description: Map of currency tickers to fee information
+                x-fern-type-name: FeeMap
         'default':
           description: Error response
           content:
@@ -825,10 +779,8 @@ paths:
                 type: object
                 properties:
                   data:
-                    type: array
-                    items:
-                      type: object
-                      properties:
+                    type: object
+                    properties:
                         connectionLinks:
                           type: array
                           items:
@@ -1064,96 +1016,69 @@ components:
       properties:
         ticker:
           type: string
-          example: USDT
         name:
           type: string
-          example: Tether US
         providers:
           type: array
           items:
             type: string
-          example: []
         deposit:
-          oneOf:
-            - $ref: '#/components/schemas/FeeDetails'
-            - type: object
-              additionalProperties:
-                $ref: '#/components/schemas/ProviderFeeDetails'
+          description: Fee details for deposits
+          type: object
         withdraw:
-          oneOf:
-            - $ref: '#/components/schemas/FeeDetails'
-            - type: object
-              additionalProperties:
-                $ref: '#/components/schemas/ProviderFeeDetails'
+          description: Fee details for withdrawals
+          type: object
         is_depositable:
           type: boolean
-          example: true
         is_withdrawal:
           type: boolean
-          example: true
         is_api_withdrawal:
           type: boolean
-          example: true
         is_api_depositable:
           type: boolean
-          example: true
 
     FeeDetails:
       type: object
       properties:
         min_amount:
           type: string
-          example: "0.0005"
         max_amount:
           type: string
-          example: "0.1"
         fixed:
           type: string
           nullable: true
-          example: "0.0005"
         flex:
           type: object
           nullable: true
           properties:
             min_fee:
               type: string
-              example: "100"
             max_fee:
               type: string
-              example: "1000"
             percent:
               type: string
-              example: "10"
 
     ProviderFeeDetails:
       type: object
       properties:
         min_amount:
           type: string
-          example: "10"
         max_amount:
           type: string
-          example: "1500"
         fixed:
           type: string
           nullable: true
-          example: null
         flex:
           type: string
           nullable: true
-          example: null
         is_depositable:
           type: boolean
-          example: false
         is_api_depositable:
           type: boolean
-          example: true
         is_withdrawal:
           type: boolean
-          example: false
         is_api_withdrawal:
           type: boolean
-          example: true
         name:
           type: string
           example: USD Visa/MasterCard Interkassa

From add097c486dd086974469f0b84421a9b87305cf5 Mon Sep 17 00:00:00 2001
From: whitebit-robot 
Date: Fri, 6 Mar 2026 12:48:07 +0100
Subject: [PATCH 49/84] DV-21: refreshed

---
 openapi/private/http-trade-v4.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/openapi/private/http-trade-v4.yaml b/openapi/private/http-trade-v4.yaml
index b4d829c..5187186 100644
--- a/openapi/private/http-trade-v4.yaml
+++ b/openapi/private/http-trade-v4.yaml
@@ -3393,6 +3393,7 @@ paths:
             application/json:
               schema:
                 type: object
+                x-fern-type-name: GetMarketFeeResponse
                 properties:
                   error:
                     type: string
@@ -3445,6 +3446,7 @@ paths:
             application/json:
               schema:
                 type: object
+                x-fern-type-name: GetAllMarketFeesResponse
                 properties:
                   error:
                     type: string

From d5e95b8f6ed701481b7caf812c8a88e3b60f0c24 Mon Sep 17 00:00:00 2001
From: whitebit-robot 
Date: Fri, 6 Mar 2026 15:30:11 +0100
Subject: [PATCH 50/84] DV-43: added 2 endponits for mining

---
 changelog.mdx                    |  23 +++++
 docs.json                        |   2 +
 openapi/private/main_api_v4.yaml | 160 +++++++++++++++++++++++++++++++
 3 files changed, 185 insertions(+)

diff --git a/changelog.mdx b/changelog.mdx
index 9fe94ad..147f9a5 100644
--- a/changelog.mdx
+++ b/changelog.mdx
@@ -49,6 +49,29 @@ All authenticated endpoints require the MINING_POOL feature to be enabled on the
 
 
 
+
+## Mining Account Management
+**Create and list mining accounts**
+
+Added endpoints to create and manage mining pool accounts programmatically.
+
+**Account creation:**
+- Create named mining accounts with optional referral codes
+- Unique account names with alphanumeric and underscore support
+- Automatic validation for duplicate names
+
+**Account listing:**
+- Retrieve all mining accounts or filter by name
+- Results sorted by creation date (newest first)
+
+All endpoints require the MINING_POOL feature to be enabled on the API key.
+
+
+  
+  
+
+
+
 
 ## API Documentation Updates
 **Sub-account transfer endpoints: add transactionId for correlation**
diff --git a/docs.json b/docs.json
index 119508d..19a0229 100644
--- a/docs.json
+++ b/docs.json
@@ -351,6 +351,8 @@
             "group": "Mining Pool",
             "icon": "pickaxe",
             "pages": [
+              "api-reference/mining-pool/create-mining-account",
+              "api-reference/mining-pool/get-mining-accounts",
               "api-reference/mining-pool/pool-overview",
               "api-reference/mining-pool/get-rewards",
               "api-reference/mining-pool/account-hashrate",
diff --git a/openapi/private/main_api_v4.yaml b/openapi/private/main_api_v4.yaml
index 0c5c587..e10dad7 100644
--- a/openapi/private/main_api_v4.yaml
+++ b/openapi/private/main_api_v4.yaml
@@ -5666,6 +5666,166 @@ paths:
                 errors:
                   user: ["Mining pool account 'unknown_miner' not found"]
 
+  /api/v4/mining/accounts/create:
+    post:
+      tags:
+        - Mining Pool
+      summary: Create Mining Account
+      description: |
+        Creates a new mining account for the authenticated user. The account name must be unique within the user's accounts.
+
+        
+        Rate limit: 1000 requests/10 sec.
+        
+      operationId: createMiningAccount
+      requestBody:
+        required: true
+        content:
+          application/json:
+            schema:
+              type: object
+              required:
+                - name
+                - request
+                - nonce
+              properties:
+                name:
+                  type: string
+                  maxLength: 255
+                  description: Mining pool account name. Must be unique. Alphanumeric characters and underscores allowed.
+                  example: "my_miner_01"
+                referralCode:
+                  type: string
+                  maxLength: 50
+                  description: Optional referral code for account creation
+                  example: "REF123"
+                request:
+                  type: string
+                  description: Request signature
+                  example: "{{request}}"
+                nonce:
+                  type: string
+                  description: Unique request identifier
+                  example: "{{nonce}}"
+      responses:
+        "200":
+          description: Successful response
+          content:
+            application/json:
+              schema:
+                type: object
+                properties:
+                  data:
+                    type: object
+                    properties:
+                      name:
+                        type: string
+                        description: Created mining account name
+                      createdAt:
+                        type: integer
+                        description: Account creation timestamp (Unix time)
+              example:
+                data:
+                  name: "my_miner_01"
+                  createdAt: 1709340000
+        "400":
+          description: Validation failed
+          content:
+            application/json:
+              schema:
+                type: object
+                properties:
+                  code:
+                    type: integer
+                  message:
+                    type: string
+                  errors:
+                    type: object
+              example:
+                code: 0
+                message: "Validation failed"
+                errors:
+                  name: ["The name has already been taken."]
+
+  /api/v4/mining/accounts:
+    post:
+      tags:
+        - Mining Pool
+      summary: Get Mining Accounts
+      description: |
+        Returns a list of mining accounts for the authenticated user. Supports filtering by account name.
+
+        
+        Rate limit: 1000 requests/10 sec.
+        
+      operationId: getMiningAccounts
+      requestBody:
+        required: true
+        content:
+          application/json:
+            schema:
+              type: object
+              required:
+                - request
+                - nonce
+              properties:
+                name:
+                  type: string
+                  maxLength: 255
+                  description: Optional filter to search for a specific mining account name (exact match)
+                  example: "my_miner_01"
+                request:
+                  type: string
+                  description: Request signature
+                  example: "{{request}}"
+                nonce:
+                  type: string
+                  description: Unique request identifier
+                  example: "{{nonce}}"
+      responses:
+        "200":
+          description: Successful response
+          content:
+            application/json:
+              schema:
+                type: object
+                properties:
+                  data:
+                    type: array
+                    items:
+                      type: object
+                      properties:
+                        name:
+                          type: string
+                          description: Mining account name
+                        createdAt:
+                          type: integer
+                          description: Account creation timestamp (Unix time)
+              example:
+                data:
+                  - name: "my_miner_01"
+                    createdAt: 1709340000
+                  - name: "my_miner_02"
+                    createdAt: 1709350000
+        "400":
+          description: Validation failed
+          content:
+            application/json:
+              schema:
+                type: object
+                properties:
+                  code:
+                    type: integer
+                  message:
+                    type: string
+                  errors:
+                    type: object
+              example:
+                code: 0
+                message: "Validation failed"
+                errors:
+                  name: ["Some error"]
+
   /api/v4/credit-line/loans/info:
     post:
       tags:

From 49c2fb6e059a9c8c2037f6659e5efdaab491c109 Mon Sep 17 00:00:00 2001
From: whitebit-robot 
Date: Fri, 6 Mar 2026 17:03:15 +0100
Subject: [PATCH 51/84] docs(api): add missing mining pool endpoint MDX pages

- Create api-reference/mining-pool/ directory with 12 stub pages
- Pages reference operations in main_api_v4.yaml (11 private
  endpoints) and http-v4.yaml (pool overview public endpoint)
- Fixes 404 errors and group rendering for all Mining Pool nav items
---
 api-reference/mining-pool/account-hashrate.mdx       | 4 ++++
 api-reference/mining-pool/create-mining-account.mdx  | 4 ++++
 api-reference/mining-pool/create-watcher-link.mdx    | 4 ++++
 api-reference/mining-pool/get-mining-accounts.mdx    | 4 ++++
 api-reference/mining-pool/get-payout-destination.mdx | 4 ++++
 api-reference/mining-pool/get-rewards.mdx            | 4 ++++
 api-reference/mining-pool/list-watcher-links.mdx     | 4 ++++
 api-reference/mining-pool/miner-info.mdx             | 4 ++++
 api-reference/mining-pool/pool-overview.mdx          | 4 ++++
 api-reference/mining-pool/set-payout-destination.mdx | 4 ++++
 api-reference/mining-pool/worker-hashrate.mdx        | 4 ++++
 api-reference/mining-pool/worker-names.mdx           | 4 ++++
 12 files changed, 48 insertions(+)
 create mode 100644 api-reference/mining-pool/account-hashrate.mdx
 create mode 100644 api-reference/mining-pool/create-mining-account.mdx
 create mode 100644 api-reference/mining-pool/create-watcher-link.mdx
 create mode 100644 api-reference/mining-pool/get-mining-accounts.mdx
 create mode 100644 api-reference/mining-pool/get-payout-destination.mdx
 create mode 100644 api-reference/mining-pool/get-rewards.mdx
 create mode 100644 api-reference/mining-pool/list-watcher-links.mdx
 create mode 100644 api-reference/mining-pool/miner-info.mdx
 create mode 100644 api-reference/mining-pool/pool-overview.mdx
 create mode 100644 api-reference/mining-pool/set-payout-destination.mdx
 create mode 100644 api-reference/mining-pool/worker-hashrate.mdx
 create mode 100644 api-reference/mining-pool/worker-names.mdx

diff --git a/api-reference/mining-pool/account-hashrate.mdx b/api-reference/mining-pool/account-hashrate.mdx
new file mode 100644
index 0000000..1dbcd34
--- /dev/null
+++ b/api-reference/mining-pool/account-hashrate.mdx
@@ -0,0 +1,4 @@
+---
+title: "Account Hashrate"
+openapi: /openapi/private/main_api_v4.yaml POST /api/v4/mining/hashrate
+---
diff --git a/api-reference/mining-pool/create-mining-account.mdx b/api-reference/mining-pool/create-mining-account.mdx
new file mode 100644
index 0000000..53ddb4e
--- /dev/null
+++ b/api-reference/mining-pool/create-mining-account.mdx
@@ -0,0 +1,4 @@
+---
+title: "Create Mining Account"
+openapi: /openapi/private/main_api_v4.yaml POST /api/v4/mining/accounts/create
+---
diff --git a/api-reference/mining-pool/create-watcher-link.mdx b/api-reference/mining-pool/create-watcher-link.mdx
new file mode 100644
index 0000000..b662719
--- /dev/null
+++ b/api-reference/mining-pool/create-watcher-link.mdx
@@ -0,0 +1,4 @@
+---
+title: "Create Watcher Link"
+openapi: /openapi/private/main_api_v4.yaml POST /api/v4/mining/watcher-links/create
+---
diff --git a/api-reference/mining-pool/get-mining-accounts.mdx b/api-reference/mining-pool/get-mining-accounts.mdx
new file mode 100644
index 0000000..6f7f19e
--- /dev/null
+++ b/api-reference/mining-pool/get-mining-accounts.mdx
@@ -0,0 +1,4 @@
+---
+title: "Get Mining Accounts"
+openapi: /openapi/private/main_api_v4.yaml POST /api/v4/mining/accounts
+---
diff --git a/api-reference/mining-pool/get-payout-destination.mdx b/api-reference/mining-pool/get-payout-destination.mdx
new file mode 100644
index 0000000..6f20e03
--- /dev/null
+++ b/api-reference/mining-pool/get-payout-destination.mdx
@@ -0,0 +1,4 @@
+---
+title: "Get Payout Destination"
+openapi: /openapi/private/main_api_v4.yaml POST /api/v4/mining/payout-destination
+---
diff --git a/api-reference/mining-pool/get-rewards.mdx b/api-reference/mining-pool/get-rewards.mdx
new file mode 100644
index 0000000..2c0f340
--- /dev/null
+++ b/api-reference/mining-pool/get-rewards.mdx
@@ -0,0 +1,4 @@
+---
+title: "Get Rewards"
+openapi: /openapi/private/main_api_v4.yaml POST /api/v4/mining/rewards
+---
diff --git a/api-reference/mining-pool/list-watcher-links.mdx b/api-reference/mining-pool/list-watcher-links.mdx
new file mode 100644
index 0000000..9f21a9a
--- /dev/null
+++ b/api-reference/mining-pool/list-watcher-links.mdx
@@ -0,0 +1,4 @@
+---
+title: "List Watcher Links"
+openapi: /openapi/private/main_api_v4.yaml POST /api/v4/mining/watcher-links/list
+---
diff --git a/api-reference/mining-pool/miner-info.mdx b/api-reference/mining-pool/miner-info.mdx
new file mode 100644
index 0000000..9088a12
--- /dev/null
+++ b/api-reference/mining-pool/miner-info.mdx
@@ -0,0 +1,4 @@
+---
+title: "Miner Info"
+openapi: /openapi/private/main_api_v4.yaml POST /api/v4/mining/miners/info
+---
diff --git a/api-reference/mining-pool/pool-overview.mdx b/api-reference/mining-pool/pool-overview.mdx
new file mode 100644
index 0000000..8b2d703
--- /dev/null
+++ b/api-reference/mining-pool/pool-overview.mdx
@@ -0,0 +1,4 @@
+---
+title: "Pool Overview"
+openapi: /openapi/public/http-v4.yaml GET /api/v4/public/mining-pool
+---
diff --git a/api-reference/mining-pool/set-payout-destination.mdx b/api-reference/mining-pool/set-payout-destination.mdx
new file mode 100644
index 0000000..269ecb0
--- /dev/null
+++ b/api-reference/mining-pool/set-payout-destination.mdx
@@ -0,0 +1,4 @@
+---
+title: "Set Payout Destination"
+openapi: /openapi/private/main_api_v4.yaml POST /api/v4/mining/payout-destination/edit
+---
diff --git a/api-reference/mining-pool/worker-hashrate.mdx b/api-reference/mining-pool/worker-hashrate.mdx
new file mode 100644
index 0000000..53deabe
--- /dev/null
+++ b/api-reference/mining-pool/worker-hashrate.mdx
@@ -0,0 +1,4 @@
+---
+title: "Worker Hashrate"
+openapi: /openapi/private/main_api_v4.yaml POST /api/v4/mining/workers/hashrate
+---
diff --git a/api-reference/mining-pool/worker-names.mdx b/api-reference/mining-pool/worker-names.mdx
new file mode 100644
index 0000000..ce8bbdb
--- /dev/null
+++ b/api-reference/mining-pool/worker-names.mdx
@@ -0,0 +1,4 @@
+---
+title: "Worker Names"
+openapi: /openapi/private/main_api_v4.yaml POST /api/v4/mining/workers/names
+---

From d192719a4afb9d6897a27e27cf01a869435ff511 Mon Sep 17 00:00:00 2001
From: whitebit-robot 
Date: Mon, 9 Mar 2026 10:37:04 +0100
Subject: [PATCH 52/84] DV-21: Returned exapmles

---
 openapi/private/http-trade-v4.yaml |  533 +++++++++--
 openapi/private/main_api_v4.yaml   | 1392 +++++++++++++++++++++++++---
 2 files changed, 1730 insertions(+), 195 deletions(-)

diff --git a/openapi/private/http-trade-v4.yaml b/openapi/private/http-trade-v4.yaml
index 5187186..9872736 100644
--- a/openapi/private/http-trade-v4.yaml
+++ b/openapi/private/http-trade-v4.yaml
@@ -12,6 +12,9 @@ info:
     
     Authentication required for all endpoints.
   version: 4.0.0
+  license:
+    name: WhiteBIT Terms of Service
+    url: https://whitebit.com/terms
 servers:
   - url: https://whitebit.com
     description: WhiteBIT Global Server
@@ -22,6 +25,7 @@ paths:
   /api/v4/collateral-account/balance:
     post:
       summary: Collateral Account Balance
+      operationId: collateralAccountBalance
       description: |
         The endpoint returns a current [collateral balance](/glossary#balance-collateral).
         
@@ -65,9 +69,15 @@ paths:
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
+            example:
+              ticker: BTC
+              request: "{{request}}"
+              nonce: "{{nonce}}"
       responses:
         '200':
           description: Successful response - returns collateral balances by asset
@@ -95,6 +105,7 @@ paths:
   /api/v4/collateral-account/balance-summary:
     post:
       summary: Collateral Account Balance Summary
+      operationId: collateralAccountBalanceSummary
       description: |
         The endpoint retrieves collateral account balance summary with detailed breakdown per asset.
         
@@ -138,9 +149,15 @@ paths:
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
+            example:
+              ticker: BTC
+              request: "{{request}}"
+              nonce: "{{nonce}}"
       responses:
         '200':
           description: Successful response - returns detailed balance information per asset
@@ -194,6 +211,7 @@ paths:
   /api/v4/order/collateral/limit:
     post:
       summary: Collateral Limit Order
+      operationId: createCollateralLimitOrder
       description: |
         The endpoint creates [limit order](/glossary#limit-order) using [collateral balance](/glossary#balance-collateral).
         
@@ -239,37 +257,46 @@ paths:
                 market:
                   type: string
                   description: "Available margin [market](/glossary#market). Example: BTC_USDT"
+                  example: "BTC_USDT"
                 side:
                   type: string
                   enum: [buy, sell]
                   description: "Order type. Variables: 'buy' / 'sell'. For open long position use **buy**, for short **sell**."
+                  example: "buy"
                 amount:
                   type: string
                   description: "Amount of [stock](/glossary#stock) currency to buy or sell."
+                  example: "0.01"
                 price:
                   type: string
                   description: "Price in [money](/glossary#money) currency. Example: '9800'"
+                  example: "40000"
                 clientOrderId:
                   type: string
                   description: "Identifier should be unique and contain letters, dashes, numbers, dots or underscores."
+                  example: "order1987111"
                 stopLoss:
                   type: string
                   description: |
                     Stop loss price.
 
                     When provided, the system creates an [OTO](/glossary#one-triggers-the-other-oto) order with a stop loss condition.
+                  example: "50000"
                 takeProfit:
                   type: string
                   description: |
                     Take profit price.
 
                     When provided, the system creates an [OTO](/glossary#one-triggers-the-other-oto) order with a take profit condition.
+                  example: "30000"
                 postOnly:
                   type: boolean
                   description: "Orders are guaranteed to be the [maker](/glossary#maker) order when [executed](/glossary#finished-orders)."
+                  example: false
                 ioc:
                   type: boolean
                   description: "An immediate or cancel order (IOC) is an order that attempts to execute all or part immediately and then cancels any unfilled portion."
+                  example: false
                 rpi:
                   type: boolean
                   description: |
@@ -279,12 +306,29 @@ paths:
                   example: true
                 positionSide:
                   type: string
-                  enum: [long, short, both]
+                  enum: [LONG, SHORT, BOTH]
                   description: "Defines the position direction when hedge mode is enabled. See [positionSide](/glossary#position-side)"
+                  example: "LONG"
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
+            example:
+              market: BTC_USDT
+              side: buy
+              amount: "0.01"
+              price: "40000"
+              postOnly: false
+              ioc: false
+              clientOrderId: order1987111
+              stopLoss: "50000"
+              takeProfit: "30000"
+              positionSide: LONG
+              rpi: true
+              request: "{{request}}"
+              nonce: "{{nonce}}"
       responses:
         '200':
           description: Successful response - order created
@@ -420,6 +464,7 @@ paths:
   /api/v4/order/collateral/bulk:
     post:
       summary: Collateral bulk limit order
+      operationId: createCollateralBulkOrder
       description: |
         The endpoint creates multiple collateral limit orders.
         
@@ -445,34 +490,42 @@ paths:
                       market:
                         type: string
                         description: "Available margin [market](/glossary#market). Example: BTC_USDT"
+                        example: "BTC_PERP"
                       side:
                         type: string
                         enum: [buy, sell]
                         description: "Order type. Variables: 'buy' / 'sell'."
+                        example: "buy"
                       amount:
                         type: string
                         description: "Amount of [stock](/glossary#stock) currency to buy or sell."
+                        example: "0.02"
                       price:
                         type: string
                         description: "Price in [money](/glossary#money) currency."
+                        example: "40000"
                       clientOrderId:
                         type: string
                         description: "Identifier must be unique and contain letters, numbers, dashes, dots, or underscores."
+                        example: ""
                       stopLoss:
                         type: string
                         description: |
                           Stop loss price.
 
                           When provided, the system creates an [OTO](/glossary#one-triggers-the-other-oto) order with a stop loss condition.
+                        example: "50000"
                       takeProfit:
                         type: string
                         description: |
                           Take profit price.
 
                           When provided, the system creates an [OTO](/glossary#one-triggers-the-other-oto) order with a take profit condition.
+                        example: "30000"
                       postOnly:
                         type: boolean
                         description: "Ensures the order adds liquidity and executes as maker."
+                        example: false
                       ioc:
                         type: boolean
                         description: |
@@ -480,6 +533,7 @@ paths:
 
                           IOC does not support `rpi=true` because RPI uses post-only behavior by design.
                           The API returns error code `37` when an order item sets both `ioc=true` and `rpi=true`.
+                        example: false
                       rpi:
                         type: boolean
                         description: |
@@ -490,8 +544,9 @@ paths:
                         example: true
                       positionSide:
                         type: string
-                        enum: [long, short, both]
+                        enum: [LONG, SHORT, BOTH]
                         description: "Defines the position direction when hedge mode is enabled. See [positionSide](/glossary#position-side)"
+                        example: "LONG"
                 stopOnFail:
                   type: boolean
                   default: false
@@ -501,10 +556,45 @@ paths:
                     When true: Processing stops at the first order that fails validation or execution. Only orders up to (but not including) the failed order are processed.
 
                     When false (default): All orders in the bulk request are processed regardless of individual failures. Each order result is returned in the response array.
+                  example: true
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
+            example:
+              orders:
+                - side: buy
+                  amount: "0.02"
+                  price: "40000"
+                  market: BTC_PERP
+                  postOnly: false
+                  ioc: false
+                  clientOrderId: ""
+                  positionSide: LONG
+                  rpi: true
+                - side: sell
+                  amount: "0.0001"
+                  price: "41000"
+                  market: BTC_USDT
+                  postOnly: false
+                  ioc: false
+                  clientOrderId: ""
+                  positionSide: LONG
+                  rpi: true
+                - side: sell
+                  amount: "0.02"
+                  price: "0.030"
+                  market: ETH_BTC
+                  postOnly: false
+                  ioc: false
+                  clientOrderId: ""
+                  positionSide: LONG
+                  rpi: true
+              stopOnFail: true
+              request: "{{request}}"
+              nonce: "{{nonce}}"
       responses:
         '200':
           description: Successful response - returns array of order results
@@ -683,6 +773,7 @@ paths:
   /api/v4/order/collateral/market:
     post:
       summary: Collateral Market Order
+      operationId: createCollateralMarketOrder
       description: |
         The endpoint creates a collateral market order.
         
@@ -708,24 +799,40 @@ paths:
               properties:
                 market:
                   type: string
+                  example: "BTC_USDT"
                 side:
                   type: string
                   enum: [buy, sell]
+                  example: "buy"
                 amount:
                   type: string
+                  example: "0.01"
                 clientOrderId:
                   type: string
+                  example: "order1987111"
                 stopLoss:
                   type: string
+                  example: "50000"
                 takeProfit:
                   type: string
+                  example: "40000"
                 positionSide:
                   type: string
-                  enum: [long, short]
+                  enum: [LONG, SHORT, BOTH]
+                  example: "LONG"
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
+            example:
+              market: BTC_USDT
+              side: buy
+              amount: "0.01"
+              clientOrderId: order1987111
+              request: "{{request}}"
+              nonce: "{{nonce}}"
       responses:
         '200':
           description: Successful response - market order created
@@ -841,6 +948,7 @@ paths:
   /api/v4/order/collateral/stop-limit:
     post:
       summary: Collateral Stop-Limit Order
+      operationId: createCollateralStopLimitOrder
       description: |
         The endpoint creates a collateral stop-limit order.
         
@@ -868,28 +976,51 @@ paths:
               properties:
                 market:
                   type: string
+                  example: "BTC_USDT"
                 side:
                   type: string
                   enum: [buy, sell]
+                  example: "buy"
                 amount:
                   type: string
+                  example: "0.001"
                 price:
                   type: string
+                  example: "40000"
                 activation_price:
                   type: string
+                  example: "40000"
                 stopLoss:
                   type: string
+                  example: "30000"
                 takeProfit:
                   type: string
+                  example: "50000"
                 clientOrderId:
                   type: string
+                  example: "order1987111"
                 positionSide:
                   type: string
-                  enum: [long, short]
+                  enum: [LONG, SHORT, BOTH]
+                  example: "LONG"
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
+            example:
+              market: BTC_USDT
+              side: buy
+              amount: "0.001"
+              price: "40000"
+              activation_price: "40000"
+              stopLoss: "30000"
+              takeProfit: "50000"
+              clientOrderId: order1987111
+              positionSide: LONG
+              request: "{{request}}"
+              nonce: "{{nonce}}"
       responses:
         '200':
           description: Successful response - stop-limit order created
@@ -1021,6 +1152,7 @@ paths:
   /api/v4/order/collateral/trigger-market:
     post:
       summary: Collateral Trigger Market Order
+      operationId: createCollateralTriggerMarketOrder
       description: |
         The endpoint creates a collateral trigger market order.
         
@@ -1047,26 +1179,44 @@ paths:
               properties:
                 market:
                   type: string
+                  example: "BTC_USDT"
                 side:
                   type: string
                   enum: [buy, sell]
+                  example: "buy"
                 amount:
                   type: string
+                  example: "0.01"
                 activation_price:
                   type: string
+                  example: "40000"
                 clientOrderId:
                   type: string
+                  example: "order1987111"
                 stopLoss:
                   type: string
+                  example: "50000"
                 takeProfit:
                   type: string
+                  example: "30000"
                 positionSide:
                   type: string
-                  enum: [long, short]
+                  enum: [LONG, SHORT, BOTH]
+                  example: "LONG"
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
+            example:
+              market: BTC_USDT
+              side: buy
+              amount: "0.01"
+              activation_price: "40000"
+              clientOrderId: order1987111
+              request: "{{request}}"
+              nonce: "{{nonce}}"
       responses:
         '200':
           description: Successful response - trigger market order created
@@ -1187,6 +1337,7 @@ paths:
   /api/v4/collateral-account/summary:
     post:
       summary: Collateral Account Summary
+      operationId: collateralAccountSummary
       description: |
         The endpoint retrieves collateral account summary.
         
@@ -1206,8 +1357,13 @@ paths:
               properties:
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
+            example:
+              request: "{{request}}"
+              nonce: "{{nonce}}"
       responses:
         '200':
           description: Successful response - returns collateral account summary
@@ -1252,12 +1408,19 @@ paths:
                 pnl: "150.25"
                 leverage: 3
                 marginFraction: "0.3333"
+        '422':
+          description: Request validation failed
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/ErrorResponse'
         '503':
           description: Service temporarily unavailable
 
   /api/v4/collateral-account/positions:
     post:
       summary: Open Positions
+      operationId: getOpenPositions
       description: |
         The endpoint retrieves open positions.
 
@@ -1285,9 +1448,11 @@ paths:
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             example:
               market: "BTC_USDT"
               request: "{{request}}"
@@ -1404,7 +1569,7 @@ paths:
                   amount: "0.1"
                   basePrice: "45658.349"
                   liquidationPrice: null
-                  liquidationState: null
+                  liquidationState: margin_call
                   pnl: "-168.42"
                   pnlPercent: "-0.43"
                   margin: "8316.74"
@@ -1424,7 +1589,7 @@ paths:
                   amount: "0.1"
                   basePrice: "5658.349"
                   liquidationPrice: null
-                  liquidationState: null
+                  liquidationState: margin_call
                   pnl: "-168.42"
                   pnlPercent: "-0.43"
                   margin: "8316.74"
@@ -1445,6 +1610,7 @@ paths:
   /api/v4/collateral-account/position/close:
     post:
       summary: Close Position
+      operationId: closePosition
       description: |
         The endpoint closes a position.
         
@@ -1469,15 +1635,26 @@ paths:
               properties:
                 positionId:
                   type: integer
+                  example: 123
                 positionSide:
                   type: string
-                  enum: [long, short]
+                  enum: [LONG, SHORT, BOTH]
+                  example: "LONG"
                 market:
                   type: string
+                  example: "BTC_USDT"
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
+            example:
+              positionId: 123
+              positionSide: LONG
+              market: BTC_USDT
+              request: "{{request}}"
+              nonce: "{{nonce}}"
       responses:
         '200':
           description: Position closed
@@ -1501,6 +1678,7 @@ paths:
   /api/v4/collateral-account/positions/history:
     post:
       summary: Positions History
+      operationId: getPositionsHistory
       description: |
         The endpoint retrieves positions history.
         
@@ -1520,12 +1698,21 @@ paths:
               properties:
                 market:
                   type: string
+                  example: "BTC_USDT"
                 positionId:
                   type: integer
+                  example: 1
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
+            example:
+              market: BTC_USDT
+              positionId: 1
+              request: "{{request}}"
+              nonce: "{{nonce}}"
       responses:
         '200':
           description: Successful response - returns array of position history
@@ -1620,7 +1807,7 @@ paths:
                   basePrice: "45658.349"
                   realizedFunding: "0"
                   liquidationPrice: null
-                  liquidationState: null
+                  liquidationState: margin_call
                   orderDetail:
                     id: 97067934
                     tradeAmount: "0.1"
@@ -1649,6 +1836,7 @@ paths:
   /api/v4/collateral-account/funding-history:
     post:
       summary: Funding History
+      operationId: getFundingHistory
       description: |
         The endpoint retrieves funding history.
 
@@ -1686,9 +1874,11 @@ paths:
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             example:
               market: "BTC_PERP"
               limit: 100
@@ -1775,6 +1965,7 @@ paths:
   /api/v4/collateral-account/leverage:
     post:
       summary: Change Collateral Account Leverage
+      operationId: changeCollateralAccountLeverage
       description: |
         The endpoint changes account leverage.
         
@@ -1800,10 +1991,17 @@ paths:
                   type: integer
                   minimum: 1
                   maximum: 100
+                  example: 5
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
+            example:
+              leverage: 5
+              request: "{{request}}"
+              nonce: "{{nonce}}"
       responses:
         '200':
           description: Successful response - leverage changed
@@ -1830,6 +2028,7 @@ paths:
   /api/v4/collateral-account/hedge-mode:
     post:
       summary: Collateral Account Hedge Mode
+      operationId: getCollateralHedgeMode
       description: |
         The endpoint retrieves hedge mode status.
         
@@ -1849,8 +2048,13 @@ paths:
               properties:
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
+            example:
+              request: "{{request}}"
+              nonce: "{{nonce}}"
       responses:
         '200':
           description: Successful response - returns hedge mode status
@@ -1865,6 +2069,12 @@ paths:
                     example: true
               example:
                 hedgeMode: true
+        '422':
+          description: Request validation failed
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/ErrorResponse'
         '500':
           description: Internal error
         '503':
@@ -1873,6 +2083,7 @@ paths:
   /api/v4/collateral-account/hedge-mode/update:
     post:
       summary: Update Collateral Account Hedge Mode
+      operationId: updateHedgeMode
       description: |
         The endpoint updates hedge mode.
         
@@ -1896,10 +2107,17 @@ paths:
               properties:
                 hedgeMode:
                   type: boolean
+                  example: true
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
+            example:
+              hedgeMode: true
+              request: "{{request}}"
+              nonce: "{{nonce}}"
       responses:
         '200':
           description: Successful response - hedge mode updated
@@ -1917,6 +2135,7 @@ paths:
   /api/v4/orders/conditional:
     post:
       summary: Query unexecuted(active) conditional orders
+      operationId: getConditionalOrders
       description: |
         The endpoint retrieves active conditional orders.
         
@@ -1936,16 +2155,25 @@ paths:
               properties:
                 market:
                   type: string
+                  example: "BTC_USDT"
                 offset:
                   type: integer
                   default: 0
+                  example: 0
                 limit:
                   type: integer
                   default: 50
+                  example: 100
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
+            example:
+              market: BTC_USDT
+              offset: 0
+              limit: 100
       responses:
         '200':
           description: Successful response - returns paginated conditional orders (OCO and OTO types)
@@ -2123,6 +2351,7 @@ paths:
   /api/v4/orders/oco:
     post:
       summary: Query unexecuted(active) OCO orders
+      operationId: getOcoOrders
       description: |
         The endpoint retrieves active OCO orders.
         
@@ -2142,16 +2371,25 @@ paths:
               properties:
                 market:
                   type: string
+                  example: "BTC_USDT"
                 offset:
                   type: integer
                   default: 0
+                  example: 0
                 limit:
                   type: integer
                   default: 50
+                  example: 100
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
+            example:
+              market: BTC_USDT
+              offset: 0
+              limit: 100
       responses:
         '200':
           description: Successful response - returns array of active OCO orders
@@ -2356,6 +2594,7 @@ paths:
   /api/v4/order/collateral/oco:
     post:
       summary: Create collateral OCO order
+      operationId: createCollateralOcoOrder
       description: |
         The endpoint creates a collateral OCO order.
         
@@ -2384,23 +2623,42 @@ paths:
               properties:
                 market:
                   type: string
+                  example: "BTC_USDT"
                 side:
                   type: string
                   enum: [buy, sell]
+                  example: "buy"
                 amount:
                   type: string
+                  example: "0.001"
                 price:
                   type: string
+                  example: "40000"
                 activation_price:
                   type: string
+                  example: "41000"
                 stop_limit_price:
                   type: string
+                  example: "42000"
                 clientOrderId:
                   type: string
+                  example: "order1987111"
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
+            example:
+              market: BTC_USDT
+              side: buy
+              amount: "0.001"
+              price: "40000"
+              activation_price: "41000"
+              stop_limit_price: "42000"
+              clientOrderId: order1987111
+              request: "{{request}}"
+              nonce: "{{nonce}}"
       responses:
         '200':
           description: Successful response - OCO order created
@@ -2655,6 +2913,7 @@ paths:
   /api/v4/order/conditional-cancel:
     post:
       summary: Cancel conditional order
+      operationId: cancelConditionalOrder
       description: |
         The endpoint cancels a conditional order.
         
@@ -2679,12 +2938,21 @@ paths:
               properties:
                 market:
                   type: string
+                  example: "BTC_USDT"
                 id:
                   type: integer
+                  example: 117703764514
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
+            example:
+              market: BTC_USDT
+              id: 117703764514
+              request: "{{request}}"
+              nonce: "{{nonce}}"
       responses:
         '200':
           description: Order cancelled
@@ -2706,6 +2974,7 @@ paths:
   /api/v4/order/oco-cancel:
     post:
       summary: Cancel OCO order
+      operationId: cancelOcoOrder
       description: |
         The endpoint cancels an OCO order.
         
@@ -2730,12 +2999,21 @@ paths:
               properties:
                 market:
                   type: string
+                  example: "BTC_USDT"
                 orderId:
                   type: integer
+                  example: 117703764514
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
+            example:
+              market: BTC_USDT
+              orderId: 117703764514
+              request: "{{request}}"
+              nonce: "{{nonce}}"
       responses:
         '200':
           description: Successful response - OCO order cancelled
@@ -2966,6 +3244,7 @@ paths:
   /api/v4/order/oto-cancel:
     post:
       summary: Cancel OTO order
+      operationId: cancelOtoOrder
       description: |
         The endpoint cancels an OTO order.
         
@@ -2990,12 +3269,21 @@ paths:
               properties:
                 market:
                   type: string
+                  example: "BTC_USDT"
                 otoId:
                   type: integer
+                  example: 117703764514
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
+            example:
+              market: BTC_USDT
+              otoId: 117703764514
+              request: "{{request}}"
+              nonce: "{{nonce}}"
       responses:
         '200':
           description: OTO order cancelled
@@ -3024,6 +3312,8 @@ paths:
         Rate limit: 10000 requests/10 sec.
         
       operationId: convertEstimate
+      security:
+        - ApiKeyAuth: []
       requestBody:
         required: true
         content:
@@ -3056,9 +3346,11 @@ paths:
                 nonce:
                   type: integer
                   description: "Nonce for request"
+                  example: 1699260637
                 request:
                   type: string
                   description: "Request path"
+                  example: "{{request}}"
             examples:
               estimateReceive:
                 summary: "Estimate convert of BTC to receive 35,103.1 USDT"
@@ -3155,6 +3447,8 @@ paths:
         Rate limit: 10000 requests/10 sec.
         
       operationId: convertConfirm
+      security:
+        - ApiKeyAuth: []
       requestBody:
         required: true
         content:
@@ -3171,9 +3465,11 @@ paths:
                 nonce:
                   type: integer
                   description: "Nonce for request"
+                  example: 1699260637
                 request:
                   type: string
                   description: "Request path"
+                  example: "{{request}}"
             example:
               quoteId: "4050"
       responses:
@@ -3224,6 +3520,8 @@ paths:
         
         **Note:** The endpoint can retrieve data not older than 6 months from current month. For older data, use the Report on the History page.
       operationId: convertHistory
+      security:
+        - ApiKeyAuth: []
       requestBody:
         required: true
         content:
@@ -3262,9 +3560,11 @@ paths:
                 nonce:
                   type: integer
                   description: "Nonce for request"
+                  example: 1699260637
                 request:
                   type: string
                   description: "Request path"
+                  example: "{{request}}"
             example:
               fromTicker: "BTC"
       responses:
@@ -3357,6 +3657,7 @@ paths:
   /api/v4/market/fee:
     post:
       summary: Query Market Fee
+      operationId: getMarketFee
       description: |
         Returns maker and taker fees for a specific market.
 
@@ -3426,6 +3727,7 @@ paths:
 
     get:
       summary: Query All Market Fees
+      operationId: getAllMarketFees
       description: |
         Returns maker and taker fees for all markets, including assigned custom fees.
 
@@ -3491,6 +3793,7 @@ paths:
   /api/v4/trade-account/balance:
     post:
       summary: Trading Balance
+      operationId: tradeAccountBalance
       description: |
         The endpoint retrieves the [trade balance](/glossary#balance-spotbalance-trade) by currency [ticker](/glossary#ticker) or all balances.
         
@@ -3591,6 +3894,7 @@ paths:
   /api/v4/order/new:
     post:
       summary: Create Limit Order
+      operationId: createLimitOrder
       description: |
         The endpoint creates [limit trading order](/glossary#limit-order).
         
@@ -3820,6 +4124,7 @@ paths:
   /api/v4/order/bulk:
     post:
       summary: Bulk limit order
+      operationId: createBulkLimitOrder
       description: |
         The endpoint creates bulk [limit trading orders](/glossary#limit-order).
         
@@ -3923,11 +4228,39 @@ paths:
                     When true: Processing stops at the first order that fails validation or execution. Only orders up to (but not including) the failed order are processed.
 
                     When false (default): All orders in the bulk request are processed regardless of individual failures. Each order result is returned in the response array.
-
+                  example: true
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
+            example:
+              orders:
+                - side: buy
+                  amount: "0.02"
+                  price: "40000"
+                  market: BTC_USDT
+                  postOnly: false
+                  ioc: false
+                  clientOrderId: ""
+                  rpi: true
+                - side: sell
+                  amount: "0.0001"
+                  price: "41000"
+                  market: BTC_USDT
+                  postOnly: false
+                  ioc: false
+                  clientOrderId: ""
+                  rpi: true
+                - side: sell
+                  amount: "0.02"
+                  price: "41000"
+                  market: BTC_USDT
+                  postOnly: false
+                  ioc: false
+                  clientOrderId: ""
+                  rpi: true
       responses:
         '200':
           $ref: '#/components/responses/BulkLimitOrderResponse'
@@ -3949,6 +4282,7 @@ paths:
   /api/v4/order/market:
     post:
       summary: Create market order
+      operationId: createMarketOrder
       description: |
         The endpoint creates [market trading order](/glossary#market-order).
         
@@ -4096,6 +4430,7 @@ paths:
   /api/v4/order/stock_market:
     post:
       summary: Create buy stock market order
+      operationId: createStockMarketOrder
       description: |
         The endpoint creates buy [stock](/glossary#stock) market trading [order](/glossary#orders).
         
@@ -4231,6 +4566,7 @@ paths:
   /api/v4/order/stop_limit:
     post:
       summary: Create stop-limit order
+      operationId: createStopLimitOrder
       description: |
         The endpoint creates [stop-limit trading order](/glossary#stop-limit-order).
         
@@ -4401,6 +4737,7 @@ paths:
   /api/v4/order/stop_market:
     post:
       summary: Create stop-market order
+      operationId: createStopMarketOrder
       description: |
         The endpoint creates [stop-market trading order](/glossary#stop-market-order).
         
@@ -4565,6 +4902,7 @@ paths:
   /api/v4/order/cancel:
     post:
       summary: Cancel order
+      operationId: cancelOrder
       description: |
         Cancel existing [order](/glossary#orders).
         
@@ -4674,10 +5012,13 @@ paths:
                 clientOrderId:
                   type: string
                   description: "Custom client order id. Example: 'customId11'. Required if orderId is not set."
+                  example: "customId11"
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
       responses:
         '200':
           description: Order cancelled successfully
@@ -4703,6 +5044,7 @@ paths:
   /api/v4/order/cancel/all:
     post:
       summary: Cancel all orders
+      operationId: cancelAllOrders
       description: |
         Cancels all orders that meet the conditions [order](/glossary#orders).
         
@@ -4767,13 +5109,22 @@ paths:
                 type:
                   type: array
                   description: "Order types value. Example: 'spot', 'margin', 'futures'"
+                  example: ["spot", "margin", "futures"]
                   items:
                     type: string
                     enum: [spot, margin, futures]
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
+            example:
+              market: BTC_USDT
+              type:
+                - spot
+                - margin
+                - futures
       responses:
         '200':
           description: Orders cancelled successfully
@@ -4795,6 +5146,7 @@ paths:
   /api/v4/orders:
     post:
       summary: Query unexecuted(active) orders
+      operationId: getActiveOrders
       description: |
         The endpoint retrieves [active orders](/glossary#active-orders) (orders not yet executed).
         
@@ -4846,22 +5198,28 @@ paths:
                 orderId:
                   type: integer
                   description: "Available orderId. Example: 3134995325"
+                  example: 3134995325
                 clientOrderId:
                   type: string
                   description: "Available clientOrderId. Example: customId11"
+                  example: "customId11"
                 offset:
                   type: integer
                   default: 0
                   description: "Starting line index (OFFSET). Default: 0, Min: 0"
+                  example: 0
                 limit:
                   type: integer
                   default: 50
                   maximum: 100
                   description: "LIMIT is a special clause used to limit records a particular query can return. Default: 50, Min: 1, Max: 100"
+                  example: 50
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
       responses:
         '200':
           description: List of active orders
@@ -4889,6 +5247,7 @@ paths:
   /api/v4/trade-account/executed-history:
     post:
       summary: Query executed order history
+      operationId: getExecutedOrderHistory
       description: |
         The endpoint retrieves all deals for all markets. Can be filtered by single market if needed.
         
@@ -4936,27 +5295,35 @@ paths:
                 market:
                   type: string
                   description: "Requested [market](/glossary#market). Example: BTC_USDT"
+                  example: "BTC_USDT"
                 clientOrderId:
                   type: string
                   description: "Filter by custom order identifier"
+                  example: "customId11"
                 startDate:
                   type: integer
                   description: "Start date in Unix-time format"
+                  example: 1593233939
                 endDate:
                   type: integer
                   description: "End date in Unix-time format"
+                  example: 1593233939
                 offset:
                   type: integer
                   default: 0
                   description: "Starting line index (OFFSET). Default: 0, Min: 0"
+                  example: 0
                 limit:
                   type: integer
                   default: 50
                   description: "LIMIT is a special clause used to limit records a particular query can return. Default: 50, Min: 1, Max: 100"
+                  example: 50
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
       responses:
         '200':
           description: Executed order history
@@ -5030,6 +5397,7 @@ paths:
   /api/v4/trade-account/order:
     post:
       summary: Query executed order deals
+      operationId: getOrderDeals
       description: |
         The endpoint retrieves deals for a specific order.
         
@@ -5053,16 +5421,21 @@ paths:
               properties:
                 orderId:
                   type: integer
+                  example: 3134995325
                 offset:
                   type: integer
                   default: 0
+                  example: 0
                 limit:
                   type: integer
                   default: 50
+                  example: 50
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
       responses:
         '200':
           description: Successful response - returns paginated order deals
@@ -5163,6 +5536,7 @@ paths:
   /api/v4/trade-account/order/history:
     post:
       summary: Query executed orders
+      operationId: getOrderHistory
       description: |
         The endpoint retrieves order history.
         
@@ -5182,16 +5556,21 @@ paths:
               properties:
                 market:
                   type: string
+                  example: "BTC_USDT"
                 offset:
                   type: integer
                   default: 0
+                  example: 0
                 limit:
                   type: integer
                   default: 50
+                  example: 50
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
       responses:
         '200':
           description: Successful response - returns order history grouped by market. Empty response if order is not yours.
@@ -5321,6 +5700,7 @@ paths:
   /api/v4/order/modify:
     post:
       summary: Modify order
+      operationId: modifyOrder
       description: |
         The endpoint modifies existing [order](/glossary#orders).
         
@@ -5394,28 +5774,37 @@ paths:
                 orderId:
                   type: integer
                   description: "Active order id. Required if clientOrderId is not set."
+                  example: 4180284841
                 clientOrderId:
                   type: string
                   description: "Identifier should be unique and contain letters, dashes, numbers, dots or underscores. Required if orderId is not set."
+                  example: "order1987111"
                 market:
                   type: string
                   description: "Available [market](/glossary#market). Example: BTC_USDT"
+                  example: "BTC_USDT"
                 amount:
                   type: string
                   description: "Amount of [stock](/glossary#stock) currency to buy or sell. Example: '0.001' or 0.001"
+                  example: "0.001"
                 total:
                   type: string
                   description: "Total of [money](/glossary#money) currency to buy or sell. Example: '0.001' or 0.001"
+                  example: "100"
                 price:
                   type: string
                   description: "Price in [money](/glossary#money) currency. Example: '9800' or 9800"
+                  example: "9800"
                 activationPrice:
                   type: string
                   description: "Activation price in [money](/glossary#money) currency. Example: '10000' or 10000"
+                  example: "10000"
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
       responses:
         '200':
           description: Order modified successfully
@@ -5441,6 +5830,7 @@ paths:
   /api/v4/order/kill-switch:
     post:
       summary: Sync kill-switch timer
+      operationId: setKillSwitch
       description: |
         The endpoint creates, updates, deletes [kill-switch timer](/glossary#kill-switch-timer).
         
@@ -5507,19 +5897,24 @@ paths:
                 market:
                   type: string
                   description: "Available [market](/glossary#market). Example: BTC_USDT"
+                  example: "BTC_USDT"
                 timeout:
                   type: string
                   description: "Timer value. Example: '5'-'600' or null"
+                  example: "60"
                 types:
                   type: array
                   description: "Order types value. Example: 'spot', 'margin', 'futures' or null"
+                  example: ["spot", "margin"]
                   items:
                     type: string
                     enum: [spot, margin, futures]
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
       responses:
         '200':
           description: Successful response - kill-switch timer synced
@@ -5568,6 +5963,7 @@ paths:
   /api/v4/order/kill-switch/status:
     post:
       summary: Status kill-switch timer
+      operationId: getKillSwitchStatus
       description: |
         The endpoint retrieves the status of [kill-switch timer](/glossary#kill-switch-timer).
         
@@ -5605,10 +6001,13 @@ paths:
                 market:
                   type: string
                   description: "Available [market](/glossary#market). Example: BTC_USDT"
+                  example: "BTC_USDT"
                 request:
                   type: string
+                  example: "{{request}}"
                 nonce:
                   type: string
+                  example: "{{nonce}}"
       responses:
         '200':
           description: Successful response - returns array of kill-switch timer statuses
@@ -5672,7 +6071,7 @@ components:
         - X-TXC-SIGNATURE: HMAC SHA512 signature
   responses:
     BulkLimitOrderResponse:
-      description: Bulk limit order response
+      description: Orders created
       content:
         application/json:
           schema:
@@ -5696,6 +6095,7 @@ components:
           type: string
           enum: [buy, sell]
           description: "Order type. Variables: 'buy' / 'sell' Example: 'buy'"
+          example: "buy"
         amount:
           type: string
           description: "Amount of [stock](/glossary#stock) currency to buy or sell. Example: '0.001' or 0.001"
@@ -5707,10 +6107,12 @@ components:
         clientOrderId:
           type: string
           description: "Identifier should be unique and contain letters, dashes, numbers, dots or underscores. The identifier must be unique."
+          example: "order1987111"
         postOnly:
           type: boolean
           default: false
           description: "[Orders](/glossary#orders) are guaranteed to be the [maker](/glossary#maker) order when [executed](/glossary#finished-orders). Variables: 'true' / 'false' Example: 'false'."
+          example: false
         ioc:
           type: boolean
           default: false
@@ -5721,6 +6123,7 @@ components:
             The API returns error code `37` when a request sets both `ioc=true` and `rpi=true`.
 
             Refer to [Order Parameter Rules](/guides/order-parameter-rules) for unsupported parameter combinations.
+          example: false
         bboRole:
           type: integer
           enum: [1, 2]
@@ -5730,6 +6133,7 @@ components:
           enum: [no, cancel_both, cancel_new, cancel_old]
           default: no
           description: "Self trade prevention mode. Variables: 'no' / 'cancel_both' / 'cancel_new' / 'cancel_old'. Example: 'no'."
+          example: "no"
         rpi:
           type: boolean
           description: |
@@ -5744,8 +6148,10 @@ components:
           example: true
         request:
           type: string
+          example: "{{request}}"
         nonce:
           type: string
+          example: "{{nonce}}"
 
     MarketOrderRequest:
       type: object
@@ -5759,25 +6165,31 @@ components:
         market:
           type: string
           description: "Available [market](/glossary#market). Example: BTC_USDT"
-          example: BTC_USDT
+          example: "BTC_USDT"
         side:
           type: string
           enum: [buy, sell]
           description: "Order type. Variables: 'buy' / 'sell' Example: 'buy'"
+          example: "buy"
         amount:
           type: string
           description: "Amount of [money](/glossary#money) currency to buy or amount in [stock](/glossary#stock) currency to sell. Example: '5 USDT' for buy (min total) and '0.001 BTC' for sell (min amount)."
+          example: "100"
         clientOrderId:
           type: string
           description: "Identifier should be unique and contain letters, dashes, numbers, dots or underscores. The identifier must be unique."
+          example: "order1987111"
         stp:
           type: string
           enum: [no, cancel_both, cancel_new, cancel_old]
           description: "Self trade prevention mode. Variables: 'no' / 'cancel_both' / 'cancel_new' / 'cancel_old'. Example: 'no'."
+          example: "no"
         request:
           type: string
+          example: "{{request}}"
         nonce:
           type: string
+          example: "{{nonce}}"
 
     StopLimitOrderRequest:
       type: object
@@ -5793,23 +6205,28 @@ components:
         market:
           type: string
           description: "Available [market](/glossary#market). Example: BTC_USDT"
-          example: BTC_USDT
+          example: "BTC_USDT"
         side:
           type: string
           enum: [buy, sell]
           description: "Order type. Variables: 'buy' / 'sell' Example: 'buy'"
+          example: "buy"
         amount:
           type: string
           description: "Amount of [stock](/glossary#stock) currency to buy or sell. Example: '0.001' or 0.001"
+          example: "0.001"
         price:
           type: string
           description: "Price in [money](/glossary#money) currency. Example: '9800' or 9800"
+          example: "9800"
         activation_price:
           type: string
           description: "Activation price in [money](/glossary#money) currency. Example: '10000' or 10000"
+          example: "10000"
         clientOrderId:
           type: string
           description: "Identifier should be unique and contain letters, dashes, numbers, dots or underscores. The identifier must be unique."
+          example: "order1987111"
         bboRole:
           type: integer
           enum: [1, 2]
@@ -5821,8 +6238,10 @@ components:
           example: "no"
         request:
           type: string
+          example: "{{request}}"
         nonce:
           type: string
+          example: "{{nonce}}"
 
     StopMarketOrderRequest:
       type: object
@@ -5837,20 +6256,24 @@ components:
         market:
           type: string
           description: "Available [market](/glossary#market). Example: BTC_USDT"
-          example: BTC_USDT
+          example: "BTC_USDT"
         side:
           type: string
           enum: [buy, sell]
           description: "Order type. Variables: 'buy' / 'sell' Example: 'buy'"
+          example: "buy"
         amount:
           type: string
           description: "Amount of [money](/glossary#money) currency to buy or amount in [stock](/glossary#stock) currency to sell. Example: '0.01' or 0.01 for buy and '0.0001' for sell."
+          example: "0.01"
         activation_price:
           type: string
           description: "Activation price in [money](/glossary#money) currency. Example: '10000' or 10000"
+          example: "10000"
         clientOrderId:
           type: string
           description: "Identifier should be unique and contain letters, dashes, numbers, dots or underscores. The identifier must be unique."
+          example: "order1987111"
         stp:
           type: string
           enum: [no, cancel_both, cancel_new, cancel_old]
@@ -5858,8 +6281,10 @@ components:
           example: "no"
         request:
           type: string
+          example: "{{request}}"
         nonce:
           type: string
+          example: "{{nonce}}"
 
     BulkOrderItem:
       type: object
@@ -5867,14 +6292,19 @@ components:
         side:
           type: string
           enum: [buy, sell]
+          example: "buy"
         amount:
           type: string
+          example: "0.001"
         price:
           type: string
+          example: "40000"
         market:
           type: string
+          example: "BTC_USDT"
         postOnly:
           type: boolean
+          example: false
         ioc:
           type: boolean
           description: |
@@ -5882,8 +6312,10 @@ components:
 
             IOC does not support `rpi=true` because RPI uses post-only behavior by design.
             The API returns error code `37` when an order item sets both `ioc=true` and `rpi=true`.
+          example: false
         clientOrderId:
           type: string
+          example: ""
         rpi:
           type: boolean
           description: |
@@ -5899,126 +6331,101 @@ components:
         orderId:
           type: integer
           description: "Order ID"
+          example: 4180284841
         clientOrderId:
           type: string
           description: "Custom client order ID; empty string if not specified"
+          example: "order1987111"
         market:
           type: string
           description: "Deal market"
+          example: "BTC_USDT"
         side:
           type: string
           description: "Order side"
+          example: "buy"
         type:
           type: string
           description: "Order type"
+          example: "limit"
         timestamp:
           type: number
           description: "Timestamp of order creation"
+          example: 1595792396.165973
         dealMoney:
           type: string
           description: "If order finished - amount in money currency that is finished"
+          example: "0"
         dealStock:
           type: string
           description: "If order finished - amount in stock currency that is finished"
+          example: "0"
         amount:
           type: string
           description: "Amount"
+          example: "0.01"
         left:
           type: string
           description: "If order not finished - rest of the amount that must be finished"
+          example: "0.001"
         dealFee:
           type: string
           description: "Fee in money currency when order is filled"
+          example: "0"
         price:
           type: string
           description: "Price"
+          example: "40000"
         postOnly:
           type: boolean
           description: "PostOnly flag"
+          example: false
         ioc:
           type: boolean
           description: "IOC flag"
+          example: false
         status:
           type: string
           description: "Order status"
+          example: "FILLED"
         stp:
           type: string
           description: "Self trade prevention mode"
+          example: "no"
         positionSide:
           type: string
           description: "Position side (for collateral orders)"
+          example: "LONG"
         rpi:
           type: boolean
           description: "Indicates Retail Price Improvement (RPI) mode for the order."
           example: true
     BulkLimitOrderResponse:
       type: array
-      description: Orders created
       items:
         type: object
         properties:
           result:
-            $ref: '#/components/schemas/OrderResponse'
+            type: object
+            allOf:
+              - $ref: '#/components/schemas/OrderResponse'
+            nullable: true
           error:
+            type: object
             allOf:
               - $ref: '#/components/schemas/ErrorResponse'
             nullable: true
-      example:
-        - result:
-            orderId: 4326248250
-            clientOrderId: ""
-            market: "BTC_USDT"
-            side: "buy"
-            type: "limit"
-            timestamp: 1684916268.825564
-            dealMoney: "641.988"
-            dealStock: "0.02"
-            amount: "0.02"
-            left: "0"
-            dealFee: "1.283976"
-            ioc: false
-            postOnly: false
-            price: "40000"
-            status: "FILLED"
-            stp: "no"
-            positionSide: "BOTH"
-            rpi: true
-          error: null
-        - result: null
-          error:
-            code: 32
-            message: "Validation failed"
-            errors:
-              amount: ["Given amount is less than min amount 0.001."]
-        - result:
-            orderId: 4326248250
-            clientOrderId: ""
-            market: "BTC_USDT"
-            side: "sell"
-            type: "limit"
-            timestamp: 1684916268.825564
-            dealMoney: "641.988"
-            dealStock: "0.02"
-            amount: "0.02"
-            left: "0"
-            dealFee: "1.283976"
-            ioc: false
-            postOnly: false
-            price: "41000"
-            status: "FILLED"
-            stp: "no"
-            positionSide: "BOTH"
-            rpi: true
-          error: null
     ErrorResponse:
       type: object
       properties:
         code:
           type: integer
           description: "Error code"
+          example: 30
         message:
           type: string
           description: "Error message"
+          example: "Validation failed"
         errors:
           type: object
           additionalProperties:
diff --git a/openapi/private/main_api_v4.yaml b/openapi/private/main_api_v4.yaml
index 7d0a73c..e10dad7 100644
--- a/openapi/private/main_api_v4.yaml
+++ b/openapi/private/main_api_v4.yaml
@@ -86,9 +86,11 @@ paths:
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
       responses:
         "200":
           description: Successful response
@@ -193,9 +195,11 @@ paths:
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
       responses:
         "200":
           description: Successful response
@@ -408,6 +412,7 @@ paths:
                 uniqueId:
                   type: string
                   description: Unique transaction identifier on client's side
+                  example: "qw22"
                 customer:
                   type: object
                   description: Customer information (required for USD/EUR with VISAMASTER [provider](/glossary#provider))
@@ -418,18 +423,21 @@ paths:
                         Customer billing first name.
 
                         ⚠️ Required if currency USD or EUR with VISAMASTER [provider](/glossary#provider).
+                      example: "John"
                     lastName:
                       type: string
                       description: |
                         Customer billing last name.
 
                         ⚠️ Required if currency USD or EUR with VISAMASTER [provider](/glossary#provider).
+                      example: "Doe"
                     email:
                       type: string
                       description: |
                         Customer billing email.
 
                         ⚠️ Required if currency USD or EUR with VISAMASTER [provider](/glossary#provider).
+                      example: "john_doe@email.com"
                     birthDate:
                       type: string
                       format: date
@@ -437,6 +445,7 @@ paths:
                         Customer birth date (Format YYYY-MM-DD).
 
                         ⚠️ Required if currency USD or EUR with VISAMASTER [provider](/glossary#provider).
+                      example: "1990-01-01"
                     address:
                       type: object
                       properties:
@@ -446,42 +455,52 @@ paths:
                             Customer address line1.
 
                             ⚠️ Required if currency USD or EUR with VISAMASTER [provider](/glossary#provider).
+                          example: "Martinez Campos 37"
                         line2:
                           type: string
                           description: Customer address line2
+                          example: ""
                         city:
                           type: string
                           description: |
                             Customer city.
 
                             ⚠️ Required if currency USD or EUR with VISAMASTER [provider](/glossary#provider).
+                          example: "Madrid"
                         zipCode:
                           type: string
                           description: |
                             Customer zip-code.
 
                             ⚠️ Required if currency USD or EUR with VISAMASTER [provider](/glossary#provider).
+                          example: "28010"
                         countryCode:
                           type: string
                           description: |
                             Customer country code.
 
                             ⚠️ Required if currency USD or EUR with VISAMASTER [provider](/glossary#provider).
+                          example: "ES"
                 successLink:
                   type: string
                   description: Customer will be redirected to this URL by acquiring [provider](/glossary#provider) after success deposit. To activate this feature, please contact support
+                  example: "https://success.example.com"
                 failureLink:
                   type: string
                   description: Customer will be redirected to this URL in case of fail or rejection on acquiring provider side. To activate this feature, please contact support
+                  example: "https://failure.example.com"
                 returnLink:
                   type: string
                   description: Customer will be redirected to the URL defined if selects 'back' option after from the payment success or failure page. To activate this feature, define desired link. If not populated, option 'back' won't be displayed
+                  example: "https://return.example.com"
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             examples:
               basic:
                 summary: Basic request
@@ -558,12 +577,15 @@ paths:
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonceWindow:
                   type: boolean
                   description: Nonce window setting
+                  example: false
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             example:
               request: "{{request}}"
               nonceWindow: false
@@ -653,9 +675,11 @@ paths:
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             example:
               request: "{{request}}"
               nonce: "{{nonce}}"
@@ -818,10 +842,12 @@ paths:
                   type: string
                   description: |
                     Base64-encoded request body. See the [authentication guide](/private/http-auth) for signature generation details.
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: |
                     A unique identifier for the request. Use a monotonically increasing value such as a Unix timestamp in milliseconds.
+                  example: "{{nonce}}"
             example:
               transactionId: "54bffeb7-7a8f-43f8-bcd8-f14ec10fee85"
               address: "0x1234567890abcdef1234567890abcdef12345678"
@@ -906,6 +932,7 @@ paths:
                     [Memo](/glossary#memodestination-tag).
 
                     ⚠️ Required if currency is memoable.
+                  example: "48565488244493"
                 uniqueId:
                   type: string
                   description: |
@@ -919,6 +946,7 @@ paths:
                     [Fiat](/glossary#fiat) currency [provider](/glossary#provider). Example: VISAMASTER
 
                     ⚠️ Required for fiat currencies. Currency provider should be taken from [Asset Status endpoint](/public/http-v4/asset-status-list) response.
+                  example: "VISAMASTER"
                 network:
                   type: string
                   description: |
@@ -929,6 +957,7 @@ paths:
                 partialEnable:
                   type: boolean
                   description: Optional parameter for [FIAT](/glossary#fiat) withdrawals with increased Maximum Limit if set as "true". To use this parameter, the application must support "Partially successful" withdrawal status and latest updates in deposit/withdrawal history.
+                  example: false
                 beneficiary:
                   type: object
                   description: |
@@ -942,30 +971,35 @@ paths:
                         Beneficiary first name. Max length: 40 symbols, latin letters and special characters.
 
                         ⚠️ Required if currency [ticker](/glossary#ticker) is one of: UAH_IBAN, USD_VISAMASTER, USD, EUR
+                      example: "Firstname"
                     lastName:
                       type: string
                       description: |
                         Beneficiary last name. Max length: 40 symbols, latin letters and special characters.
 
                         ⚠️ Required if currency [ticker](/glossary#ticker) is one of: UAH_IBAN, USD_VISAMASTER, USD, EUR
+                      example: "Lastname"
                     tin:
                       type: integer
                       description: |
                         Beneficiary TAX payer number. Integer, 10 digits.
 
                         ⚠️ Required if currency is UAH_IBAN.
+                      example: 1000000000
                     phone:
                       type: string
                       description: |
                         Beneficiary phone number.
 
                         ⚠️ Required if currency [ticker](/glossary#ticker) is one of: USD_VISAMASTER, EUR_VISAMASTER
+                      example: "1234567891"
                     email:
                       type: string
                       description: |
                         Beneficiary email.
 
                         ⚠️ Required if currency [ticker](/glossary#ticker) is one of: USD_VISAMASTER, EUR_VISAMASTER
+                      example: "john_doe@email.com"
                     birthDate:
                       type: string
                       format: date
@@ -973,6 +1007,7 @@ paths:
                         Beneficiary birth date. Format: YYYY-MM-DD.
 
                         ⚠️ Required if currency [ticker](/glossary#ticker) is one of: USD_VISAMASTER, EUR_VISAMASTER
+                      example: "1990-01-01"
                 travelRule:
                   type: object
                   description: |
@@ -987,36 +1022,43 @@ paths:
                         Travel rule receiver type. Values: "individual" or "entity"
 
                         ⚠️ Required if currency is crypto and the account is from [EEA](/glossary#european-economic-area-eea)
+                      example: "individual"
                     vasp:
                       type: string
                       description: |
                         Travel rule destination platform (VASP) name.
 
                         ⚠️ Required if currency is crypto and the account is from [EEA](/glossary#european-economic-area-eea)
+                      example: "Binance"
                     name:
                       type: string
                       description: |
                         Travel rule. If individual - first_name ; if entity - entity_name
 
                         ⚠️ Required if currency is crypto and the account is from [EEA](/glossary#european-economic-area-eea)
+                      example: "John"
                     address:
                       type: string
                       description: |
                         Travel rule. If individual - last_name ; if entity - entity_address
 
                         ⚠️ Required if currency is crypto and the account is from [EEA](/glossary#european-economic-area-eea)
+                      example: "123 Business Street, London, UK"
                 paymentDescription:
                   type: string
                   description: |
                     Description of withdrawal destination
 
                     ⚠️ Required if currency is crypto and withdrawal from whitebit-tr.com
+                  example: "Payment description"
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             examples:
               crypto:
                 summary: Crypto withdrawal
@@ -1269,6 +1311,13 @@ paths:
           application/json:
             schema:
               $ref: "#/components/schemas/WithdrawRequest"
+            example:
+              ticker: ETH
+              amount: "0.9"
+              address: "0x0964A6B8F794A4B8d61b62652dB27ddC9844FB4c"
+              uniqueId: "24529041"
+              request: "{{request}}"
+              nonce: "{{nonce}}"
       responses:
         "201":
           description: Validation succeeded and withdraw creation process is started. Check the request status by uniqueId in deposit/withdraw history.
@@ -1387,6 +1436,7 @@ paths:
                     **Not required** if **from** and **to** are set.
                   enum:
                     [deposit, withdraw, collateral-deposit, collateral-withdraw]
+                  example: "deposit"
                 from:
                   type: string
                   description: |
@@ -1394,6 +1444,7 @@ paths:
 
                     **Not required** if **method** is set.
                   enum: [main, spot, collateral]
+                  example: "main"
                 to:
                   type: string
                   description: |
@@ -1401,10 +1452,11 @@ paths:
 
                     **Not required** if **method** is set.
                   enum: [main, spot, collateral]
+                  example: "spot"
                 ticker:
                   type: string
                   description: "Currency's [ticker](/glossary#ticker). Example: BTC"
-                  example: XLM
+                  example: "XLM"
                 amount:
                   type: string
                   description: "Amount to transfer. Max [precision](/glossary#precision) = 8, value must be greater than zero and less than or equal to the available balance."
@@ -1412,9 +1464,11 @@ paths:
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             examples:
               usingMethod:
                 summary: Using method field (deprecated)
@@ -1582,36 +1636,44 @@ paths:
                   description: |
                     Method. Example: **1** to display deposits / **2** to display withdraws. Do not send this parameter in order to receive both deposits and withdraws.
                   enum: [1, 2]
+                  example: 1
                 ticker:
                   type: string
                   description: "Currency's [ticker](/glossary#ticker). Example: BTC"
+                  example: "BTC"
                 address:
                   type: string
                   description: Can be used for filtering transactions by specific address.
+                  example: "3ApEASLcrQtZpg1TsssFgYF5V5YQJAKvuE"
                 memo:
                   type: string
                   description: "Can be used for filtering transactions by specific [memo](/glossary#memodestination-tag)"
+                  example: "48565488244493"
                 addresses:
                   type: array
                   items:
                     type: string
                   maxItems: 20
                   description: Can be used for filtering transactions by specific array of addresses.
+                  example: ["3ApEASLcrQtZpg1TsssFgYF5V5YQJAKvuE"]
                 uniqueId:
                   type: string
                   description: Can be used for filtering transactions by specific unique id
+                  example: "24529041"
                 limit:
                   type: integer
                   minimum: 1
                   maximum: 100
                   default: 50
                   description: LIMIT is a special clause used to limit records a particular query can return.
+                  example: 100
                 offset:
                   type: integer
                   minimum: 0
                   maximum: 10000
                   default: 0
                   description: Use the OFFSET clause to return entries starting from a particular line.
+                  example: 0
                 status:
                   type: array
                   items:
@@ -1620,12 +1682,15 @@ paths:
                     Can be used for filtering transactions by status codes.
 
                     ⚠️ Caution: Use this parameter with the appropriate `transactionMethod` and valid status codes for that method. See the endpoint description above for valid codes. Example: `"status": [3,7]`
+                  example: [3, 7]
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             example:
               transactionMethod: 1
               ticker: "BTC"
@@ -1796,12 +1861,15 @@ paths:
                   type: string
                   description: Address type, available for specific currencies list (see address types table in endpoint description)
                   enum: [p2sh-segwit, bech32]
+                  example: "bech32"
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             examples:
               basic:
                 summary: Basic request
@@ -1960,16 +2028,20 @@ paths:
                   type: string
                   maxLength: 25
                   description: "Passphrase for applying [WhiteBIT codes](/glossary#whitebit-codes). Passphrase must contain only latin letters, numbers and symbols (like !@#$%^, no whitespaces). Max: 25 symbols."
+                  example: "some passphrase"
                 description:
                   type: string
                   maxLength: 75
                   description: "Additional text description for [code](/glossary#whitebit-codes). Visible only for creator. Max: 75 symbols."
+                  example: "some description"
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             example:
               ticker: "ETH"
               amount: "0.002"
@@ -2112,16 +2184,20 @@ paths:
                 code:
                   type: string
                   description: "[Code](/glossary#whitebit-codes) that will be applied."
+                  example: "WBe11f4fce-2a53-4edc-b195-66b693bd77e3ETH"
                 passphrase:
                   type: string
                   maxLength: 25
                   description: "Should be provided if the [code](/glossary#whitebit-codes) was created with passphrase. Max: 25 symbols."
+                  example: "some passphrase"
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             example:
               code: "WBe11f4fce-2a53-4edc-b195-66b693bd77e3ETH"
               passphrase: "some passphrase"
@@ -2208,18 +2284,22 @@ paths:
                   maximum: 100
                   default: 30
                   description: LIMIT is a special clause used to limit records a particular query can return.
+                  example: 30
                 offset:
                   type: integer
                   minimum: 0
                   maximum: 10000
                   default: 0
                   description: Use the OFFSET clause to return entries starting from a particular line.
+                  example: 0
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             example:
               request: "{{request}}"
               nonce: "{{nonce}}"
@@ -2323,18 +2403,22 @@ paths:
                   maximum: 100
                   default: 30
                   description: LIMIT is a special clause used to limit records a particular query can return.
+                  example: 100
                 offset:
                   type: integer
                   minimum: 0
                   maximum: 10000
                   default: 0
                   description: Use the OFFSET clause to return entries starting from a particular line.
+                  example: 0
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             example:
               request: "{{request}}"
               nonce: "{{nonce}}"
@@ -2451,12 +2535,15 @@ paths:
                 ticker:
                   type: string
                   description: "[Invest plan](/glossary#crypto-lending) source currency's [ticker](/glossary#ticker). Example: BTC"
+                  example: "USDT"
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             example:
               ticker: "USDT"
               request: "{{request}}"
@@ -2527,15 +2614,19 @@ paths:
                 planId:
                   type: string
                   description: "[Invest plan](/glossary#crypto-lending) identifier"
+                  example: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
                 amount:
                   type: string
                   description: Investment amount
+                  example: "100"
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             example:
               planId: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
               amount: "100"
@@ -2707,12 +2798,15 @@ paths:
                 id:
                   type: string
                   description: Investment identifier
+                  example: "0d7b66ff-1909-4938-ab7a-d16d9a64dcd5"
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             example:
               id: "0d7b66ff-1909-4938-ab7a-d16d9a64dcd5"
               request: "{{request}}"
@@ -2769,31 +2863,38 @@ paths:
                 id:
                   type: string
                   description: Investment identifier
+                  example: "0d7b66ff-1909-4938-ab7a-d16d9a64dcd5"
                 ticker:
                   type: string
                   description: "[Invest plan](/glossary#crypto-lending) source currency's [ticker](/glossary#ticker)"
+                  example: "USDT"
                 status:
                   type: integer
                   description: Investment status (1 - active, 2 - closed)
                   enum: [1, 2]
+                  example: 1
                 limit:
                   type: integer
                   minimum: 1
                   maximum: 100
                   default: 100
                   description: LIMIT is a special clause used to limit records a particular query can return.
+                  example: 100
                 offset:
                   type: integer
                   minimum: 0
                   maximum: 10000
                   default: 0
                   description: Use the OFFSET clause to return entries starting from a particular line.
+                  example: 0
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             example:
               id: "0d7b66ff-1909-4938-ab7a-d16d9a64dcd5"
               ticker: "USDT"
@@ -2884,27 +2985,33 @@ paths:
                 planId:
                   type: string
                   description: "[Invest plan](/glossary#crypto-lending) identifier"
+                  example: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
                 ticker:
                   type: string
                   description: "[Invest plan](/glossary#crypto-lending) target currency's [ticker](/glossary#ticker)"
+                  example: "USDT"
                 limit:
                   type: integer
                   minimum: 1
                   maximum: 100
                   default: 100
                   description: LIMIT is a special clause used to limit records a particular query can return.
+                  example: 100
                 offset:
                   type: integer
                   minimum: 0
                   maximum: 10000
                   default: 0
                   description: Use the OFFSET clause to return entries starting from a particular line.
+                  example: 0
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             example:
               planId: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
               ticker: "USDT"
@@ -2984,20 +3091,25 @@ paths:
                   maximum: 100
                   default: 100
                   description: Pagination limit.
+                  example: 50
                 offset:
                   type: integer
                   minimum: 0
                   default: 0
                   description: Pagination offset.
+                  example: 0
                 ticker:
                   type: string
                   description: "Filter by currency [ticker](/glossary#ticker). Example: USDT"
+                  example: "USDT"
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             example:
               limit: 50
               offset: 0
@@ -3079,29 +3191,37 @@ paths:
                   type: integer
                   default: 100
                   description: "Pagination limit. Default: 100."
+                  example: 100
                 offset:
                   type: integer
                   default: 0
                   description: "Pagination offset. Default: 0."
+                  example: 0
                 ticker:
                   type: string
                   description: "Filter by currency [ticker](/glossary#ticker). Example: USDT."
+                  example: "USDT"
                 plan:
                   type: string
                   description: Filter by plan ID (UUID).
+                  example: "8f2e9d3c-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
                 investment:
                   type: string
                   description: Filter by investment ID.
+                  example: "inv_7e2d9c3b-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
                 investmentStatus:
                   type: integer
                   description: Filter by status (1=ACTIVE, 0=CLOSED).
                   enum: [0, 1]
+                  example: 1
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             example:
               limit: 100
               offset: 0
@@ -3196,36 +3316,46 @@ paths:
                   type: integer
                   default: 50
                   description: Pagination limit.
+                  example: 50
                 offset:
                   type: integer
                   default: 0
                   description: Pagination offset.
+                  example: 0
                 plan:
                   type: string
                   description: Filter by plan ID (UUID).
+                  example: "8f2e9d3c-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
                 investment:
                   type: string
                   description: Filter by investment ID.
+                  example: "inv_7e2d9c3b-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
                 transaction:
                   type: string
                   description: Filter by transaction ID.
+                  example: "tx_9f3e0d4c-2b5c-4d3e-8f6g-7a8b9c0d1e2f"
                 dateFrom:
                   type: integer
                   description: Filter from date (timestamp).
+                  example: 1640995200
                 dateTo:
                   type: integer
                   description: Filter to date (timestamp).
+                  example: 1641081600
                 actionTypes:
                   type: array
                   items:
                     type: integer
                   description: Array of operation type IDs. See table below.
+                  example: [1, 2, 4]
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             example:
               limit: 50
               offset: 0
@@ -3314,31 +3444,40 @@ paths:
                   type: integer
                   default: 50
                   description: Pagination limit.
+                  example: 50
                 offset:
                   type: integer
                   default: 0
                   description: Pagination offset.
+                  example: 0
                 plan:
                   type: string
                   description: Filter by plan ID (UUID).
+                  example: "8f2e9d3c-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
                 investment:
                   type: string
                   description: Filter by investment ID.
+                  example: "inv_7e2d9c3b-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
                 transaction:
                   type: string
                   description: Filter by transaction ID.
+                  example: "tx_9f3e0d4c-2b5c-4d3e-8f6g-7a8b9c0d1e2f"
                 dateFrom:
                   type: integer
                   description: Filter from date (timestamp).
+                  example: 1640995200
                 dateTo:
                   type: integer
                   description: Filter to date (timestamp).
+                  example: 1641081600
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             example:
               limit: 50
               offset: 0
@@ -3423,19 +3562,24 @@ paths:
                 plan:
                   type: string
                   description: Plan external ID (UUID).
+                  example: "8f2e9d3c-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
                 amount:
                   type: string
                   description: Investment amount.
+                  example: "1000.500000"
                 withReinvest:
                   type: boolean
                   default: false
                   description: Enable auto-reinvestment.
+                  example: true
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             example:
               plan: "8f2e9d3c-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
               amount: "1000.500000"
@@ -3522,15 +3666,19 @@ paths:
                 plan:
                   type: string
                   description: Plan external ID (UUID).
+                  example: "8f2e9d3c-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
                 amount:
                   type: string
                   description: Withdrawal amount.
+                  example: "500.250000"
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             example:
               plan: "8f2e9d3c-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
               amount: "500.250000"
@@ -3612,12 +3760,15 @@ paths:
                 plan:
                   type: string
                   description: Plan external ID (UUID).
+                  example: "8f2e9d3c-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             example:
               plan: "8f2e9d3c-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
               request: "{{request}}"
@@ -3696,16 +3847,20 @@ paths:
                 plan:
                   type: string
                   description: Plan external ID (UUID).
+                  example: "8f2e9d3c-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
                 enabled:
                   type: boolean
                   default: false
                   description: Enable or disable auto-reinvestment.
+                  example: true
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
             example:
               plan: "8f2e9d3c-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
               enabled: true
@@ -3779,9 +3934,11 @@ paths:
                 request:
                   type: string
                   description: Request signature
+                  example: "{{request}}"
                 nonce:
                   type: string
                   description: Unique request identifier
+                  example: "{{nonce}}"
       responses:
         "200":
           description: Successful response
@@ -3827,12 +3984,15 @@ paths:
                 alias:
                   type: string
                   description: Name for sub-account
+                  example: "trading_bot"
                 email:
                   type: string
                   description: Sub-account email (required when shareKyc is false)
+                  example: "sub@example.com"
                 shareKyc:
                   type: boolean
                   description: If KYC shared with main account
+                  example: false
                 permissions:
                   type: object
                   required:
@@ -3842,9 +4002,11 @@ paths:
                     spotEnabled:
                       type: boolean
                       description: Enable transfers to trade balance
+                      example: true
                     collateralEnabled:
                       type: boolean
                       description: Enable transfers to collateral balance
+                      example: false
       responses:
         "201":
           description: Sub-account created successfully
@@ -3903,6 +4065,9 @@ paths:
                 id:
                   type: string
                   description: Sub-account id
+                  example: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
+            example:
+              id: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
       responses:
         "200":
           description: Sub-account deleted successfully
@@ -3910,6 +4075,7 @@ paths:
             application/json:
               schema:
                 type: object
+              example: {}
         "400":
           description: Request validation failed
           content:
@@ -3947,9 +4113,11 @@ paths:
                 id:
                   type: string
                   description: Sub-account id
+                  example: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
                 alias:
                   type: string
                   description: Name for sub-account
+                  example: "training"
                 permissions:
                   type: object
                   required:
@@ -3959,9 +4127,17 @@ paths:
                     spotEnabled:
                       type: boolean
                       description: Enable transfers to trade balance
+                      example: true
                     collateralEnabled:
                       type: boolean
                       description: Enable transfers to collateral balance
+                      example: false
+            example:
+              id: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
+              alias: training
+              permissions:
+                spotEnabled: true
+                collateralEnabled: false
       responses:
         "200":
           description: Sub-account edited successfully
@@ -3969,6 +4145,7 @@ paths:
             application/json:
               schema:
                 type: object
+              example: {}
         "400":
           description: Request validation failed
           content:
@@ -4002,16 +4179,19 @@ paths:
                 search:
                   type: string
                   description: Search term
+                  example: "trading"
                 limit:
                   type: integer
                   minimum: 1
                   maximum: 100
                   default: 30
+                  example: 30
                 offset:
                   type: integer
                   minimum: 0
                   maximum: 10000
                   default: 0
+                  example: 0
       responses:
         "200":
           description: Successful response
@@ -4066,16 +4246,20 @@ paths:
                 id:
                   type: string
                   description: Sub-account id
+                  example: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
                 direction:
                   type: string
                   enum: [main_to_sub, sub_to_main]
                   description: Transfer direction
+                  example: "main_to_sub"
                 amount:
                   type: string
                   description: Transfer amount (min 0.00000001)
+                  example: "0.5"
                 ticker:
                   type: string
                   description: "Currency's [ticker](/glossary#ticker)"
+                  example: "ETH"
       responses:
         "200":
           description: Transfer successful
@@ -4122,6 +4306,9 @@ paths:
                 id:
                   type: string
                   description: Sub-account id
+                  example: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
+            example:
+              id: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
       responses:
         "200":
           description: Sub-account blocked successfully
@@ -4129,6 +4316,7 @@ paths:
             application/json:
               schema:
                 type: object
+              example: {}
         "400":
           description: Request validation failed
           content:
@@ -4164,6 +4352,9 @@ paths:
                 id:
                   type: string
                   description: Sub-account id
+                  example: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
+            example:
+              id: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
       responses:
         "200":
           description: Sub-account unblocked successfully
@@ -4171,6 +4362,7 @@ paths:
             application/json:
               schema:
                 type: object
+              example: {}
         "400":
           description: Request validation failed
           content:
@@ -4206,9 +4398,14 @@ paths:
                 id:
                   type: string
                   description: Sub-account id
+                  example: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
                 ticker:
                   type: string
                   description: Currency's ticker (if not provided, returns data by all currencies)
+                  example: "USDC"
+            example:
+              id: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
+              ticker: USDC
       responses:
         "200":
           description: Successful response
@@ -4227,6 +4424,11 @@ paths:
                         type: string
                       collateral:
                         type: string
+              example:
+                USDC:
+                  - main: "42"
+                    spot: "10"
+                    collateral: "14"
         "422":
           description: Account is not confirmed
           content:
@@ -4267,20 +4469,24 @@ paths:
                 id:
                   type: string
                   description: Sub-account id
+                  example: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
                 direction:
                   type: string
                   enum: [main_to_sub, sub_to_main]
                   description: Transfer direction (optional)
+                  example: "main_to_sub"
                 limit:
                   type: integer
                   minimum: 1
                   maximum: 100
                   default: 30
+                  example: 30
                 offset:
                   type: integer
                   minimum: 0
                   maximum: 10000
                   default: 0
+                  example: 0
       responses:
         "200":
           description: Successful response
@@ -4330,12 +4536,15 @@ paths:
                   type: integer
                   description: Type of API key (1 - info and trading; 2 - info, trading, deposits, withdraws)
                   enum: [1, 2]
+                  example: 1
                 subAccountId:
                   type: string
                   description: ID of the sub-account to create the API key for
+                  example: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
                 title:
                   type: string
                   description: Custom title/name for the API key
+                  example: "Trading Bot Key"
       responses:
         "201":
           description: API key created successfully
@@ -4380,9 +4589,11 @@ paths:
                 apiKeyId:
                   type: string
                   description: ID of the API key to update
+                  example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
                 title:
                   type: string
                   description: New title for the API key
+                  example: "Trading Bot Key"
                 urls:
                   type: array
                   description: Array of URL objects for API key restrictions
@@ -4391,8 +4602,18 @@ paths:
                     properties:
                       url:
                         type: string
+                        example: "/api/v4/main-account/balance"
                       enable:
                         type: boolean
+                        example: true
+            example:
+              apiKeyId: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
+              title: Trading Bot Key
+              urls:
+                - url: /api/v4/main-account/withdraw
+                  enable: false
+                - url: /api/v4/main-account/balance
+                  enable: true
       responses:
         "200":
           description: API key updated successfully
@@ -4400,6 +4621,7 @@ paths:
             application/json:
               schema:
                 type: object
+              example: {}
         "400":
           description: Request validation failed
           content:
@@ -4435,6 +4657,9 @@ paths:
                 apiKeyId:
                   type: string
                   description: ID of the API key to delete
+                  example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
+            example:
+              apiKeyId: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
       responses:
         "200":
           description: API key deleted successfully
@@ -4442,6 +4667,7 @@ paths:
             application/json:
               schema:
                 type: object
+              example: {}
         "400":
           description: Request validation failed
           content:
@@ -4476,16 +4702,19 @@ paths:
                 subAccountId:
                   type: string
                   description: ID of the sub-account to list API keys for
+                  example: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
                 limit:
                   type: integer
                   minimum: 1
                   maximum: 100
                   default: 30
+                  example: 30
                 offset:
                   type: integer
                   minimum: 0
                   maximum: 10000
                   default: 0
+                  example: 0
       responses:
         "200":
           description: Successful response
@@ -4537,6 +4766,9 @@ paths:
                 apiKeyId:
                   type: string
                   description: ID of the API key to reset
+                  example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
+            example:
+              apiKeyId: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
       responses:
         "200":
           description: API key reset successfully
@@ -4544,6 +4776,7 @@ paths:
             application/json:
               schema:
                 type: object
+              example: {}
         "400":
           description: Request validation failed
           content:
@@ -4579,6 +4812,7 @@ paths:
                 apiKeyId:
                   type: string
                   description: ID of the API key to list IP addresses for
+                  example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
       responses:
         "200":
           description: Successful response
@@ -4627,9 +4861,11 @@ paths:
                 apiKeyId:
                   type: string
                   description: ID of the API key to add IP address to
+                  example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
                 ip:
                   type: string
                   description: IP address to add to allowed list
+                  example: "192.168.1.100"
       responses:
         "201":
           description: IP address added successfully
@@ -4678,9 +4914,11 @@ paths:
                 apiKeyId:
                   type: string
                   description: ID of the API key to remove IP address from
+                  example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
                 ip:
                   type: string
                   description: IP address to remove from allowed list
+                  example: "192.168.1.100"
       responses:
         "200":
           description: IP address removed successfully
@@ -4726,22 +4964,27 @@ paths:
                 account:
                   type: string
                   description: Mining pool account
+                  example: "miner123"
                 from:
                   type: integer
                   description: Date timestamp starting from which rewards are received
+                  example: 1640995200
                 to:
                   type: integer
                   description: Date timestamp until which rewards are received
+                  example: 1641081600
                 limit:
                   type: integer
                   minimum: 1
                   maximum: 100
                   default: 30
+                  example: 30
                 offset:
                   type: integer
                   minimum: 0
                   maximum: 10000
                   default: 0
+                  example: 0
       responses:
         "200":
           description: Successful response
@@ -4801,17 +5044,21 @@ paths:
                 account:
                   type: string
                   description: Mining pool account
+                  example: "miner123"
                 from:
                   type: integer
                   description: Unix timestamp of starting point
+                  example: 1640995200
                 to:
                   type: integer
                   description: Unix timestamp of final point
+                  example: 1641081600
                 interval:
                   type: string
                   enum: [5m, 1h, 24h]
                   default: 1h
                   description: Timestamp interval
+                  example: "1h"
       responses:
         "200":
           description: Successful response
@@ -4849,23 +5096,18 @@ paths:
                 code: 422
                 message: "Incorrect timestamp"
 
-  /api/v4/credit-line/loans/info:
+  /api/v4/mining/payout-destination:
     post:
       tags:
-        - Credit Line
-      summary: List Credit Lines
+        - Mining Pool
+      summary: Get Payout Destination
       description: |
-        The endpoint returns an active loan.
-        The endpoint works on demand - contact WhiteBIT support to get access.
+        Returns the current payout destination setting for a specific mining account belonging to the authenticated user.
 
         
         Rate limit: 1000 requests/10 sec.
         
-        
-        
-        The API does not cache the response.
-        
-      operationId: getCreditLineInfo
+      operationId: getMiningPayoutDestination
       requestBody:
         required: true
         content:
@@ -4873,33 +5115,33 @@ paths:
             schema:
               type: object
               required:
-                - request
-                - nonce
+                - accountName
               properties:
-                request:
+                accountName:
                   type: string
-                  description: Request signature
-                nonce:
-                  type: string
-                  description: Unique request identifier
+                  description: Mining pool account name
+                  example: "my_miner_01"
       responses:
         "200":
           description: Successful response
           content:
             application/json:
               schema:
-                $ref: "#/components/schemas/CreditLine"
+                type: object
+                properties:
+                  payoutDestination:
+                    type: string
+                    enum: [main_balance, external_address]
+                    description: Payout destination type
+                  externalAddress:
+                    type: string
+                    nullable: true
+                    description: External BTC address (null if destination is main_balance)
               example:
-                asset: "BTC"
-                amount: "1.5"
-                totalFunding: "0.5"
-                currentLtv: "25"
-                initialLtv: "60"
-                marginCallLtv: "75"
-                liquidationLtv: "85"
-                createdAt: 1715339355
+                payoutDestination: "main_balance"
+                externalAddress: null
         "400":
-          description: No active loan
+          description: Validation failed
           content:
             application/json:
               schema:
@@ -4909,11 +5151,69 @@ paths:
                     type: integer
                   message:
                     type: string
+                  errors:
+                    type: object
               example:
                 code: 0
-                message: "No active loan at the moment"
-        "404":
-          description: Loans not available - contact support
+                message: "Validation failed"
+                errors:
+                  user: ["Mining account not found."]
+
+  /api/v4/mining/payout-destination/edit:
+    post:
+      tags:
+        - Mining Pool
+      summary: Set Payout Destination
+      description: |
+        Updates the payout destination for a specific mining account belonging to the authenticated user. Can be set to main balance or an external BTC address.
+
+        
+        Rate limit: 1000 requests/10 sec.
+        
+      operationId: setMiningPayoutDestination
+      requestBody:
+        required: true
+        content:
+          application/json:
+            schema:
+              type: object
+              required:
+                - accountName
+                - destination
+              properties:
+                accountName:
+                  type: string
+                  description: Mining pool account name
+                  example: "my_miner_01"
+                destination:
+                  type: string
+                  enum: [main_balance, external_address]
+                  description: Payout destination type
+                  example: "external_address"
+                address:
+                  type: string
+                  maxLength: 100
+                  description: External BTC address. Required when destination is external_address. Supports all standard Bitcoin address formats.
+                  example: "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh"
+      responses:
+        "200":
+          description: Successful response
+          content:
+            application/json:
+              schema:
+                type: object
+                properties:
+                  payoutDestination:
+                    type: string
+                    enum: [main_balance, external_address]
+                  externalAddress:
+                    type: string
+                    nullable: true
+              example:
+                payoutDestination: "external_address"
+                externalAddress: "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh"
+        "400":
+          description: Validation failed
           content:
             application/json:
               schema:
@@ -4923,141 +5223,844 @@ paths:
                     type: integer
                   message:
                     type: string
+                  errors:
+                    type: object
               example:
                 code: 0
-                message: ""
-
-components:
-  securitySchemes:
-    ApiKeyAuth:
-      type: apiKey
-      in: header
-      name: X-TXC-APIKEY
-      description: API key authentication using signed requests
+                message: "Validation failed"
+                errors:
+                  user: ["Mining account not found."]
 
-  schemas:
-    Error:
-      type: object
-      properties:
-        code:
-          type: integer
-        message:
-          type: string
-        errors:
-          type: object
-          additionalProperties:
-            type: array
-            items:
-              type: string
+  /api/v4/mining/miners/info:
+    post:
+      tags:
+        - Mining Pool
+      summary: Miner Info
+      description: |
+        Returns fee information and stratum connection details with worker counts for a specific mining account.
 
-    ErrorInner:
-      type: object
-      properties:
-        code:
-          type: integer
-        message:
-          type: string
-        errors:
-          type: object
-          additionalProperties:
-            type: array
-            items:
-              type: string
+        
+        Rate limit: 1000 requests/10 sec.
+        
+      operationId: getMiningMinerInfo
+      requestBody:
+        required: true
+        content:
+          application/json:
+            schema:
+              type: object
+              required:
+                - account
+              properties:
+                account:
+                  type: string
+                  maxLength: 255
+                  description: Mining pool account name
+                  example: "my_miner_01"
+      responses:
+        "200":
+          description: Successful response
+          content:
+            application/json:
+              schema:
+                type: object
+                properties:
+                  data:
+                    type: object
+                    properties:
+                      fee:
+                        type: string
+                        description: Fee percentage
+                      stratum:
+                        type: array
+                        items:
+                          type: object
+                          properties:
+                            url:
+                              type: string
+                            workersCount:
+                              type: integer
+              example:
+                data:
+                  fee: "2.5"
+                  stratum:
+                    - url: "stratum+tcp://pool.whitebit.com:3333"
+                      workersCount: 5
+                    - url: "stratum+tcp://pool.whitebit.com:3334"
+                      workersCount: 3
+        "400":
+          description: Validation failed
+          content:
+            application/json:
+              schema:
+                type: object
+                properties:
+                  code:
+                    type: integer
+                  message:
+                    type: string
+                  errors:
+                    type: object
+              example:
+                code: 0
+                message: "Validation failed"
+                errors:
+                  user: ["Mining pool account 'unknown_miner' not found"]
 
-    WithdrawRequest:
-      type: object
-      required:
-        - ticker
-        - amount
-        - address
-        - uniqueId
-        - request
-        - nonce
-      properties:
-        ticker:
-          type: string
-          description: "Currencies [ticker](/glossary#ticker). Example: BTC ⚠️ Currencies ticker must have \"can_deposit\" status equal to \"true\". Use [Asset Status endpoint](/public/http-v4/asset-status-list) to know more about currency."
-        amount:
-          type: string
-          description: "Withdraw amount (including [fee](/glossary#fee)). To add the fee to the specified amount, use the /main-account/withdraw-pay request"
-        address:
-          type: string
-          description: "Target address (wallet address for cryptocurrencies, identifier/[card token](/glossary#card-token) for [fiat](/glossary#fiat) currencies)"
-        memo:
-          type: string
-          description: "Required if currency is memoable. See [memo](/glossary#memodestination-tag) for details."
-        uniqueId:
-          type: string
-          description: "Unique transaction identifier. ⚠️ Generate a new unique ID for each withdrawal request."
-        provider:
-          type: string
-          description: "[Fiat](/glossary#fiat) currency [provider](/glossary#provider). Example: VISAMASTER ⚠️ Currency provider should be taken from [Asset Status endpoint](/public/http-v4/asset-status-list) response. Required if currency is fiat."
-        network:
-          type: string
-          description: "Cryptocurrency network. Available for [multinetwork](/glossary#multinetwork) currencies. Example: OMNI ⚠️ Currency network should be taken from [Asset Status endpoint](/public/http-v4/asset-status-list) response. Default for USDT is ERC20"
-        partialEnable:
-          type: boolean
-          description: "Optional parameter for [FIAT](/glossary#fiat) withdrawals with increased Maximum Limit if set as \"true\". To use this parameter, the application must support \"Partially successful\" withdrawal status and latest updates in deposit/withdrawal history."
-        beneficiary:
-          type: object
-          description: "Beneficiary information data. Required if currency [ticker](/glossary#ticker) is one of: UAH_IBAN, USD_VISAMASTER, EUR_VISAMASTER, USD, EUR"
-        travelRule:
-          type: object
-          description: "Travel Rule information data. Required if currency is crypto and the account is from [EEA](/glossary#european-economic-area-eea)"
-        request:
-          type: string
-          description: "Request signature"
-        nonce:
-          type: string
-          description: "Unique request identifier"
+  /api/v4/mining/workers/names:
+    post:
+      tags:
+        - Mining Pool
+      summary: Worker Names
+      description: |
+        Returns a paginated list of online worker names for a specific mining account.
 
-    TransactionHistory:
-      type: object
-      properties:
-        address:
-          type: string
-          description: Deposit/Withdraw address
-        uniqueId:
-          type: string
-          nullable: true
-          description: Unique Id of deposit/withdraw
-        createdAt:
-          type: integer
-          description: Timestamp of deposit/withdraw
-        currency:
-          type: string
-          description: Deposit/Withdraw currency full name
-        ticker:
-          type: string
+        
+        Rate limit: 1000 requests/10 sec.
+        
+      operationId: getMiningWorkerNames
+      requestBody:
+        required: true
+        content:
+          application/json:
+            schema:
+              type: object
+              required:
+                - account
+              properties:
+                account:
+                  type: string
+                  maxLength: 255
+                  description: Mining pool account name
+                  example: "my_miner_01"
+                offset:
+                  type: integer
+                  minimum: 0
+                  maximum: 10000
+                  default: 0
+                  description: Pagination offset
+                  example: 0
+                limit:
+                  type: integer
+                  minimum: 1
+                  maximum: 100
+                  default: 100
+                  description: Pagination limit
+                  example: 50
+      responses:
+        "200":
+          description: Successful response
+          content:
+            application/json:
+              schema:
+                type: object
+                properties:
+                  data:
+                    type: object
+                    properties:
+                      workers:
+                        type: array
+                        items:
+                          type: string
+                  limit:
+                    type: integer
+                  offset:
+                    type: integer
+              example:
+                data:
+                  workers: ["worker_001", "worker_002", "worker_003"]
+                limit: 50
+                offset: 0
+        "400":
+          description: Validation failed
+          content:
+            application/json:
+              schema:
+                type: object
+                properties:
+                  code:
+                    type: integer
+                  message:
+                    type: string
+                  errors:
+                    type: object
+              example:
+                code: 0
+                message: "Validation failed"
+                errors:
+                  user: ["Mining pool account 'unknown_miner' not found"]
+
+  /api/v4/mining/workers/hashrate:
+    post:
+      tags:
+        - Mining Pool
+      summary: Worker Hashrate History
+      description: |
+        Returns hashrate performance history for a specific worker on a mining account.
+
+        
+        Rate limit: 1000 requests/10 sec.
+        
+      operationId: getMiningWorkerHashrate
+      requestBody:
+        required: true
+        content:
+          application/json:
+            schema:
+              type: object
+              required:
+                - account
+                - worker
+              properties:
+                account:
+                  type: string
+                  maxLength: 255
+                  description: Mining pool account name
+                  example: "my_miner_01"
+                worker:
+                  type: string
+                  maxLength: 255
+                  description: Worker name
+                  example: "worker_001"
+                interval:
+                  type: string
+                  enum: [5m, 1h, 24h]
+                  default: 1h
+                  description: Time frame granularity
+                  example: "1h"
+                from:
+                  type: integer
+                  description: Start timestamp in Unix seconds. Must be <= now
+                  example: 1709290000
+                to:
+                  type: integer
+                  description: End timestamp in Unix seconds. Must be <= now
+                  example: 1709340000
+      responses:
+        "200":
+          description: Successful response
+          content:
+            application/json:
+              schema:
+                type: object
+                properties:
+                  data:
+                    type: object
+                    properties:
+                      hashrates:
+                        type: array
+                        items:
+                          type: object
+                          properties:
+                            time:
+                              type: integer
+                            hashrate:
+                              type: string
+                              description: Hashrate in TH/s
+              example:
+                data:
+                  hashrates:
+                    - time: 1709290000
+                      hashrate: "42.1"
+                    - time: 1709293600
+                      hashrate: "43.5"
+        "400":
+          description: Validation failed
+          content:
+            application/json:
+              schema:
+                type: object
+                properties:
+                  code:
+                    type: integer
+                  message:
+                    type: string
+                  errors:
+                    type: object
+              example:
+                code: 0
+                message: "Validation failed"
+                errors:
+                  user: ["Mining pool account 'unknown_miner' not found"]
+
+  /api/v4/mining/watcher-links/create:
+    post:
+      tags:
+        - Mining Pool
+      summary: Create Watcher Link
+      description: |
+        Creates a new watcher link for one or more mining accounts, granting specific permissions with a configurable expiration.
+
+        
+        Rate limit: 1000 requests/10 sec.
+        
+      operationId: createMiningWatcherLink
+      requestBody:
+        required: true
+        content:
+          application/json:
+            schema:
+              type: object
+              required:
+                - accounts
+                - name
+                - permissions
+                - liveUntil
+              properties:
+                accounts:
+                  type: array
+                  minItems: 1
+                  items:
+                    type: string
+                    maxLength: 255
+                  description: Array of mining account names
+                  example: ["my_miner_01", "my_miner_02"]
+                name:
+                  type: string
+                  maxLength: 255
+                  pattern: '^[a-zA-Z0-9_]+$'
+                  description: Link name (alphanumeric and underscores only)
+                  example: "monitoring_link"
+                permissions:
+                  type: array
+                  minItems: 1
+                  maxItems: 3
+                  items:
+                    type: string
+                    enum: [dashboard, rewards, workers]
+                  description: Array of permissions
+                  example: ["dashboard", "workers"]
+                liveUntil:
+                  type: string
+                  enum: [1h, 24h, 7d, always]
+                  description: Expiration period
+                  example: "7d"
+      responses:
+        "201":
+          description: Watcher link created successfully
+          content:
+            application/json:
+              schema:
+                type: object
+                properties:
+                  data:
+                    type: object
+                    properties:
+                      id:
+                        type: string
+                      link:
+                        type: string
+                      liveUntil:
+                        type: integer
+                        nullable: true
+                      createdAt:
+                        type: integer
+              example:
+                data:
+                  id: "abc123-external-id"
+                  link: "https://whitebit.com/mining-pool/watcher-link/abc123-external-id"
+                  liveUntil: 1709944800
+                  createdAt: 1709340000
+        "400":
+          description: Validation failed
+          content:
+            application/json:
+              schema:
+                type: object
+                properties:
+                  code:
+                    type: integer
+                  message:
+                    type: string
+                  errors:
+                    type: object
+              example:
+                code: 0
+                message: "Validation failed"
+                errors:
+                  user: ["Limit exceeded"]
+
+  /api/v4/mining/watcher-links/list:
+    post:
+      tags:
+        - Mining Pool
+      summary: List Watcher Links
+      description: |
+        Returns all active watcher links for a specific mining account.
+
+        
+        Rate limit: 1000 requests/10 sec.
+        
+      operationId: listMiningWatcherLinks
+      requestBody:
+        required: true
+        content:
+          application/json:
+            schema:
+              type: object
+              required:
+                - account
+              properties:
+                account:
+                  type: string
+                  maxLength: 255
+                  description: Mining pool account name
+                  example: "my_miner_01"
+      responses:
+        "200":
+          description: Successful response
+          content:
+            application/json:
+              schema:
+                type: object
+                properties:
+                  data:
+                    type: array
+                    items:
+                      type: object
+                      properties:
+                        id:
+                          type: string
+                        accounts:
+                          type: array
+                          items:
+                            type: string
+                        name:
+                          type: string
+                        link:
+                          type: string
+                        permissions:
+                          type: array
+                          items:
+                            type: string
+                        liveUntil:
+                          type: integer
+                          nullable: true
+                        createdAt:
+                          type: integer
+              example:
+                data:
+                  - id: "abc123-external-id"
+                    accounts: ["my_miner_01"]
+                    name: "monitoring_link"
+                    link: "https://whitebit.com/mining-pool/watcher-link/abc123-external-id"
+                    permissions: ["dashboard", "workers"]
+                    liveUntil: 1709944800
+                    createdAt: 1709340000
+        "400":
+          description: Validation failed
+          content:
+            application/json:
+              schema:
+                type: object
+                properties:
+                  code:
+                    type: integer
+                  message:
+                    type: string
+                  errors:
+                    type: object
+              example:
+                code: 0
+                message: "Validation failed"
+                errors:
+                  user: ["Mining pool account 'unknown_miner' not found"]
+
+  /api/v4/mining/accounts/create:
+    post:
+      tags:
+        - Mining Pool
+      summary: Create Mining Account
+      description: |
+        Creates a new mining account for the authenticated user. The account name must be unique within the user's accounts.
+
+        
+        Rate limit: 1000 requests/10 sec.
+        
+      operationId: createMiningAccount
+      requestBody:
+        required: true
+        content:
+          application/json:
+            schema:
+              type: object
+              required:
+                - name
+                - request
+                - nonce
+              properties:
+                name:
+                  type: string
+                  maxLength: 255
+                  description: Mining pool account name. Must be unique. Alphanumeric characters and underscores allowed.
+                  example: "my_miner_01"
+                referralCode:
+                  type: string
+                  maxLength: 50
+                  description: Optional referral code for account creation
+                  example: "REF123"
+                request:
+                  type: string
+                  description: Request signature
+                  example: "{{request}}"
+                nonce:
+                  type: string
+                  description: Unique request identifier
+                  example: "{{nonce}}"
+      responses:
+        "200":
+          description: Successful response
+          content:
+            application/json:
+              schema:
+                type: object
+                properties:
+                  data:
+                    type: object
+                    properties:
+                      name:
+                        type: string
+                        description: Created mining account name
+                      createdAt:
+                        type: integer
+                        description: Account creation timestamp (Unix time)
+              example:
+                data:
+                  name: "my_miner_01"
+                  createdAt: 1709340000
+        "400":
+          description: Validation failed
+          content:
+            application/json:
+              schema:
+                type: object
+                properties:
+                  code:
+                    type: integer
+                  message:
+                    type: string
+                  errors:
+                    type: object
+              example:
+                code: 0
+                message: "Validation failed"
+                errors:
+                  name: ["The name has already been taken."]
+
+  /api/v4/mining/accounts:
+    post:
+      tags:
+        - Mining Pool
+      summary: Get Mining Accounts
+      description: |
+        Returns a list of mining accounts for the authenticated user. Supports filtering by account name.
+
+        
+        Rate limit: 1000 requests/10 sec.
+        
+      operationId: getMiningAccounts
+      requestBody:
+        required: true
+        content:
+          application/json:
+            schema:
+              type: object
+              required:
+                - request
+                - nonce
+              properties:
+                name:
+                  type: string
+                  maxLength: 255
+                  description: Optional filter to search for a specific mining account name (exact match)
+                  example: "my_miner_01"
+                request:
+                  type: string
+                  description: Request signature
+                  example: "{{request}}"
+                nonce:
+                  type: string
+                  description: Unique request identifier
+                  example: "{{nonce}}"
+      responses:
+        "200":
+          description: Successful response
+          content:
+            application/json:
+              schema:
+                type: object
+                properties:
+                  data:
+                    type: array
+                    items:
+                      type: object
+                      properties:
+                        name:
+                          type: string
+                          description: Mining account name
+                        createdAt:
+                          type: integer
+                          description: Account creation timestamp (Unix time)
+              example:
+                data:
+                  - name: "my_miner_01"
+                    createdAt: 1709340000
+                  - name: "my_miner_02"
+                    createdAt: 1709350000
+        "400":
+          description: Validation failed
+          content:
+            application/json:
+              schema:
+                type: object
+                properties:
+                  code:
+                    type: integer
+                  message:
+                    type: string
+                  errors:
+                    type: object
+              example:
+                code: 0
+                message: "Validation failed"
+                errors:
+                  name: ["Some error"]
+
+  /api/v4/credit-line/loans/info:
+    post:
+      tags:
+        - Credit Line
+      summary: List Credit Lines
+      description: |
+        The endpoint returns an active loan.
+        The endpoint works on demand - contact WhiteBIT support to get access.
+
+        
+        Rate limit: 1000 requests/10 sec.
+        
+        
+        
+        The API does not cache the response.
+        
+      operationId: getCreditLineInfo
+      requestBody:
+        required: true
+        content:
+          application/json:
+            schema:
+              type: object
+              required:
+                - request
+                - nonce
+              properties:
+                request:
+                  type: string
+                  description: Request signature
+                  example: "{{request}}"
+                nonce:
+                  type: string
+                  description: Unique request identifier
+                  example: "{{nonce}}"
+      responses:
+        "200":
+          description: Successful response
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/CreditLine"
+              example:
+                asset: "BTC"
+                amount: "1.5"
+                totalFunding: "0.5"
+                currentLtv: "25"
+                initialLtv: "60"
+                marginCallLtv: "75"
+                liquidationLtv: "85"
+                createdAt: 1715339355
+        "400":
+          description: No active loan
+          content:
+            application/json:
+              schema:
+                type: object
+                properties:
+                  code:
+                    type: integer
+                  message:
+                    type: string
+              example:
+                code: 0
+                message: "No active loan at the moment"
+        "404":
+          description: Loans not available - contact support
+          content:
+            application/json:
+              schema:
+                type: object
+                properties:
+                  code:
+                    type: integer
+                  message:
+                    type: string
+              example:
+                code: 0
+                message: ""
+
+components:
+  securitySchemes:
+    ApiKeyAuth:
+      type: apiKey
+      in: header
+      name: X-TXC-APIKEY
+      description: API key authentication using signed requests
+
+  schemas:
+    Error:
+      type: object
+      properties:
+        code:
+          type: integer
+        message:
+          type: string
+        errors:
+          type: object
+          additionalProperties:
+            type: array
+            items:
+              type: string
+
+    ErrorInner:
+      type: object
+      properties:
+        code:
+          type: integer
+        message:
+          type: string
+        errors:
+          type: object
+          additionalProperties:
+            type: array
+            items:
+              type: string
+
+    WithdrawRequest:
+      type: object
+      required:
+        - ticker
+        - amount
+        - address
+        - uniqueId
+        - request
+        - nonce
+      properties:
+        ticker:
+          type: string
+          description: "Currencies [ticker](/glossary#ticker). Example: BTC ⚠️ Currencies ticker must have \"can_deposit\" status equal to \"true\". Use [Asset Status endpoint](/public/http-v4/asset-status-list) to know more about currency."
+          example: "ETH"
+        amount:
+          type: string
+          description: "Withdraw amount (including [fee](/glossary#fee)). To add the fee to the specified amount, use the /main-account/withdraw-pay request"
+          example: "0.9"
+        address:
+          type: string
+          description: "Target address (wallet address for cryptocurrencies, identifier/[card token](/glossary#card-token) for [fiat](/glossary#fiat) currencies)"
+          example: "0x0964A6B8F794A4B8d61b62652dB27ddC9844FB4c"
+        memo:
+          type: string
+          description: "Required if currency is memoable. See [memo](/glossary#memodestination-tag) for details."
+          example: "48565488244493"
+        uniqueId:
+          type: string
+          description: "Unique transaction identifier. ⚠️ Generate a new unique ID for each withdrawal request."
+          example: "24529041"
+        provider:
+          type: string
+          description: "[Fiat](/glossary#fiat) currency [provider](/glossary#provider). Example: VISAMASTER ⚠️ Currency provider should be taken from [Asset Status endpoint](/public/http-v4/asset-status-list) response. Required if currency is fiat."
+          example: "VISAMASTER"
+        network:
+          type: string
+          description: "Cryptocurrency network. Available for [multinetwork](/glossary#multinetwork) currencies. Example: OMNI ⚠️ Currency network should be taken from [Asset Status endpoint](/public/http-v4/asset-status-list) response. Default for USDT is ERC20"
+          example: "ERC20"
+        partialEnable:
+          type: boolean
+          description: "Optional parameter for [FIAT](/glossary#fiat) withdrawals with increased Maximum Limit if set as \"true\". To use this parameter, the application must support \"Partially successful\" withdrawal status and latest updates in deposit/withdrawal history."
+          example: false
+        beneficiary:
+          type: object
+          description: "Beneficiary information data. Required if currency [ticker](/glossary#ticker) is one of: UAH_IBAN, USD_VISAMASTER, EUR_VISAMASTER, USD, EUR"
+        travelRule:
+          type: object
+          description: "Travel Rule information data. Required if currency is crypto and the account is from [EEA](/glossary#european-economic-area-eea)"
+        request:
+          type: string
+          description: "Request signature"
+          example: "{{request}}"
+        nonce:
+          type: string
+          description: "Unique request identifier"
+          example: "{{nonce}}"
+
+    TransactionHistory:
+      type: object
+      properties:
+        address:
+          type: string
+          description: Deposit/Withdraw address
+          example: "3ApEASLcrQtZpg1TsssFgYF5V5YQJAKvuE"
+        uniqueId:
+          type: string
+          nullable: true
+          description: Unique Id of deposit/withdraw
+          example: null
+        createdAt:
+          type: integer
+          description: Timestamp of deposit/withdraw
+          example: 1593437922
+        currency:
+          type: string
+          description: Deposit/Withdraw currency full name
+          example: "Bitcoin"
+        ticker:
+          type: string
           description: "Deposit/Withdraw currency [ticker](/glossary#ticker)"
+          example: "BTC"
         method:
           type: integer
           description: "Called method: 1 - deposit, 2 - withdraw"
+          example: 1
         amount:
           type: string
           description: Amount of deposit/withdraw
+          example: "0.0006"
         description:
           type: string
           description: Deposit/Withdraw description
+          example: ""
         memo:
           type: string
           description: "[Memo](/glossary#memodestination-tag) for deposit/withdraw"
+          example: ""
         fee:
           type: string
           description: "[Fee](/glossary#fee) for deposit/withdraw"
+          example: "0"
         status:
           type: integer
           description: Transaction status (see endpoint description for status codes)
+          example: 15
         network:
           type: string
           nullable: true
           description: Network if currency is multinetwork
+          example: null
         transactionHash:
           type: string
           description: Deposit/Withdraw transaction hash
+          example: "3b49d7b8cf7a4d3c1234567890abcdef"
         transactionId:
           type: string
           description: Transaction ID
+          example: "tx-id-1234"
         details:
           type: object
           nullable: true
@@ -5070,9 +6073,11 @@ components:
             actual:
               type: integer
               description: Actual number of confirmations
+              example: 3
             required:
               type: integer
               description: Required number of confirmations
+              example: 6
 
     CodeInfo:
       type: object
@@ -5080,21 +6085,27 @@ components:
         amount:
           type: string
           description: "Code amount"
+          example: "100"
         code:
           type: string
           description: "WhiteBIT code"
+          example: "WBe50fbe4d5d...ee33"
         date:
           type: integer
           description: "Code creation timestamp"
+          example: 1598296132
         status:
           type: string
           description: "Code status"
+          example: "active"
         ticker:
           type: string
           description: "Code [ticker](/glossary#ticker)"
+          example: "USDT"
         external_id:
           type: string
           description: "Code external identifier"
+          example: "id1"
 
     CodeHistory:
       type: object
@@ -5102,21 +6113,27 @@ components:
         amount:
           type: string
           description: "Code amount change (- is created, + is applied)"
+          example: "-100"
         code:
           type: string
           description: "WhiteBIT code"
+          example: "WBe50fbe4d5d...ee33"
         date:
           type: integer
           description: "Code activation timestamp (for applied) or code creation timestamp (for created)"
+          example: 1598296132
         status:
           type: string
           description: "Current code status"
+          example: "applied"
         ticker:
           type: string
           description: "Code [ticker](/glossary#ticker)"
+          example: "USDT"
         external_id:
           type: string
           description: "Code external identifier"
+          example: "id1"
 
     FixedPlan:
       type: object
@@ -5124,33 +6141,43 @@ components:
         id:
           type: string
           description: Invest plan identifier
+          example: "1"
         ticker:
           type: string
           description: Source currency ticker
+          example: "BTC"
         status:
           type: integer
           description: Status (1 - active, 2 - no coins left, 3 - inactive, 4 - pause)
+          example: 1
         percent:
           type: string
           description: Interest percent
+          example: "0.01"
         duration:
           type: integer
           description: Investment duration (in minutes)
+          example: 40320
         interestTicker:
           type: string
           description: Target currency ticker
+          example: "BTC"
         interestRatio:
           type: string
           description: Target currency to source currency ratio
+          example: "1"
         minInvestment:
           type: string
           description: "Minimum investment amount"
+          example: "100"
         maxInvestment:
           type: string
           description: "Maximum investment amount"
+          example: "10000"
         maxPossibleInvestment:
           type: string
           description: "Maximum investment amount due to current invest plan state"
+          example: "3000"
 
     Investment:
       type: object
@@ -5158,27 +6185,34 @@ components:
         id:
           type: string
           description: "Investment identifier"
+          example: "1232"
         plan:
           $ref: "#/components/schemas/FixedPlan"
           description: "Investment plan (similar to Get plans response)"
         status:
           type: integer
           description: "Investment status (1 - active, 2 - closed)"
+          example: 1
         created:
           type: integer
           description: "Timestamp of investment creation"
+          example: 1588345560
         updated:
           type: integer
           description: "Timestamp of investment update"
+          example: 1588345560
         paymentTime:
           type: integer
           description: "Timestamp of the payment time"
+          example: 1588345560
         amount:
           type: string
           description: "Investment amount"
+          example: "100"
         interestPaid:
           type: string
           description: "Interest paid amount"
+          example: "0.01"
 
     InterestPayment:
       type: object
@@ -5186,18 +6220,23 @@ components:
         planId:
           type: string
           description: "Invest plan identifier"
+          example: "1"
         investmentId:
           type: string
           description: "Investment identifier"
+          example: "1232"
         amount:
           type: string
           description: "Interest amount"
+          example: "0.01"
         ticker:
           type: string
           description: "Interest currency [ticker](/glossary#ticker)"
+          example: "BTC"
         timestamp:
           type: integer
           description: "Transaction timestamp"
+          example: 1588345560
 
     FlexPlan:
       type: object
@@ -5205,18 +6244,23 @@ components:
         id:
           type: string
           description: "Flex plan identifier"
+          example: "12"
         ticker:
           type: string
           description: "Currency [ticker](/glossary#ticker)"
+          example: "USDT"
         minInvestment:
           type: string
           description: "Minimum investment amount"
+          example: "10.0"
         maxInvestment:
           type: string
           description: "Maximum investment amount"
+          example: "100000.0"
         maxRate:
           type: string
           description: "Maximum interest rate"
+          example: "0.0030"
 
     FlexInvestment:
       type: object
@@ -5224,27 +6268,35 @@ components:
         id:
           type: string
           description: "Flex investment identifier"
+          example: "2765"
         planId:
           type: string
           description: "Flex plan identifier"
+          example: "12"
         currency:
           type: string
           description: "Investment currency"
+          example: "USDT"
         invested:
           type: string
           description: "Invested amount"
+          example: "100"
         withAutoReinvest:
           type: boolean
           description: "Auto-reinvestment enabled"
+          example: true
         status:
           type: integer
           description: "Investment status (1=ACTIVE, 0=CLOSED)"
+          example: 1
         createdAt:
           type: integer
           description: "Investment creation timestamp"
+          example: 1588345560
         updatedAt:
           type: integer
           description: "Investment last update timestamp"
+          example: 1588345560
 
     FlexInvestmentHistory:
       type: object
@@ -5252,24 +6304,31 @@ components:
         createdAt:
           type: integer
           description: "Transaction creation timestamp"
+          example: 1588345560
         planId:
           type: string
           description: "Flex plan identifier"
+          example: "12"
         investmentId:
           type: string
           description: "Flex investment identifier"
+          example: "2765"
         currency:
           type: string
           description: "Transaction currency"
+          example: "USDT"
         amount:
           type: string
           description: "Transaction amount"
+          example: "100"
         transactionId:
           type: string
           description: "Transaction identifier"
+          example: "tx_123456"
         actionType:
           type: integer
           description: "Action type: 1-INVEST, 2-REINVEST, 3-WITHDRAW_FROM_INVESTMENT, 4-DAILY_EARNING, 5-CLOSE_INVESTMENT, 6-OPEN_INVESTMENT"
+          example: 1
 
     FeeInfo:
       type: object
@@ -5277,15 +6336,19 @@ components:
         ticker:
           type: string
           description: "Currency [ticker](/glossary#ticker)"
+          example: "ETH"
         name:
           type: string
           description: "Currency name"
+          example: "Ethereum"
         can_deposit:
           type: string
           description: "Deposit status (currency availability)"
+          example: "1"
         can_withdraw:
           type: string
           description: "Withdrawal status (currency availability)"
+          example: "1"
         deposit:
           type: object
           description: "Deposit fees and limits"
@@ -5293,21 +6356,27 @@ components:
             minFlex:
               type: string
               description: "Minimum fee amount when flex fee is enabled"
+              example: "0"
             maxFlex:
               type: string
               description: "Maximum fee amount when flex fee is enabled"
+              example: "0"
             percentFlex:
               type: string
               description: "Flex fee percent"
+              example: "0"
             fixed:
               type: string
               description: "Fixed fee"
+              example: "0"
             minAmount:
               type: string
               description: "Minimum deposit amount"
+              example: "0.01"
             maxAmount:
               type: string
               description: "Maximum deposit amount"
+              example: "0"
         withdraw:
           type: object
           description: "Withdrawal fees and limits"
@@ -5315,21 +6384,27 @@ components:
             minFlex:
               type: string
               description: "Minimum fee amount when flex fee is enabled"
+              example: "0"
             maxFlex:
               type: string
               description: "Maximum fee amount when flex fee is enabled"
+              example: "0"
             percentFlex:
               type: string
               description: "Flex fee percent"
+              example: "0"
             fixed:
               type: string
               description: "Fixed fee"
+              example: "0.0004"
             minAmount:
               type: string
               description: "Minimum withdrawal amount"
+              example: "0.01"
             maxAmount:
               type: string
               description: "Maximum withdrawal amount"
+              example: "0"
 
     SubAccount:
       type: object
@@ -5337,21 +6412,27 @@ components:
         id:
           type: string
           description: "Sub-account identifier"
+          example: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
         alias:
           type: string
           description: "Sub-account alias/name"
+          example: "trading_bot"
         userId:
           type: string
           description: "User identifier associated with account"
+          example: "u-12345"
         email:
           type: string
           description: "Sub-account email (masked)"
+          example: "s***@example.com"
         status:
           type: string
           description: "Sub-account status"
+          example: "active"
         color:
           type: string
           description: "Sub-account color"
+          example: "#FF5733"
         kyc:
           type: object
           description: "KYC information"
@@ -5359,9 +6440,11 @@ components:
             shareKyc:
               type: boolean
               description: "Whether KYC is shared with main account"
+              example: false
             kycStatus:
               type: string
               description: "KYC status"
+              example: "verified"
         permissions:
           type: object
           description: "Sub-account permissions"
@@ -5369,9 +6452,11 @@ components:
             spotEnabled:
               type: boolean
               description: "Spot trading enabled"
+              example: true
             collateralEnabled:
               type: boolean
               description: "Collateral trading enabled"
+              example: false
 
     SubAccountTransfer:
       type: object
@@ -5379,22 +6464,28 @@ components:
         transactionId:
           type: string
           description: "Transaction identifier. Same value as id. Correlate with the transfer endpoint response using the transactionId field."
+          example: "tx-abc123"
         id:
           type: string
           description: "Transfer identifier"
           deprecated: true
+          example: "tx-abc123"
         direction:
           type: string
           description: "Transfer direction (main_to_sub or sub_to_main)"
+          example: "main_to_sub"
         currency:
           type: string
           description: "Currency transferred"
+          example: "ETH"
         amount:
           type: string
           description: "Transfer amount"
+          example: "0.5"
         createdAt:
           type: integer
           description: "Transfer creation timestamp"
+          example: 1641081600
 
     SubAccountApiKey:
       type: object
@@ -5402,30 +6493,39 @@ components:
         subAccountId:
           type: string
           description: "Sub-account identifier"
+          example: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
         id:
           type: string
           description: "API key identifier"
+          example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
         title:
           type: string
           description: "API key title/name"
+          example: "Trading Bot Key"
         isEnabled:
           type: boolean
           description: "Whether the API key is enabled"
+          example: true
         apiKey:
           type: string
           description: "API key"
+          example: "pub-key-abc123"
         apiSecret:
           type: string
           description: "API secret"
+          example: "secret-xyz789"
         type:
           type: integer
           description: "API key type (1 - info and trading, 2 - info, trading, deposit and withdraw)"
+          example: 1
         lastActivity:
           type: integer
           description: "Last activity timestamp"
+          example: 1641081600
         restrictAccess:
           type: boolean
           description: "Whether access is restricted"
+          example: false
         accessEndpoints:
           type: array
           description: "List of allowed endpoints"
@@ -5435,32 +6535,43 @@ components:
               name:
                 type: string
                 description: "Endpoint name"
+                example: "/api/v4/main-account/balance"
               title:
                 type: string
                 description: "Endpoint title"
+                example: "Get Balance"
 
     SubAccountApiKeyList:
       type: object
       properties:
         subAccountId:
           type: string
+          example: "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
         id:
           type: string
+          example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
         title:
           type: string
+          example: "Trading Bot Key"
         isEnabled:
           type: boolean
+          example: true
         apiKey:
           type: string
+          example: "pub-key-abc123"
         apiSecret:
           type: string
           description: Empty for security (only shown during creation)
+          example: ""
         type:
           type: string
+          example: "1"
         lastActivity:
           type: integer
+          example: 1641081600
         restrictAccess:
           type: boolean
+          example: false
         accessEndpoints:
           type: array
           items:
@@ -5468,8 +6579,10 @@ components:
             properties:
               name:
                 type: string
+                example: "/api/v4/main-account/balance"
               title:
                 type: string
+                example: "Get Balance"
 
     MiningReward:
       type: object
@@ -5477,41 +6590,56 @@ components:
         miningAccountName:
           type: string
           description: "Mining account name"
+          example: "miner123"
         totalReward:
           type: string
           description: "Total reward amount"
+          example: "0.00125"
         reward:
           type: string
           description: "Reward amount (without fee)"
+          example: "0.001"
         fee:
           type: string
           description: "Fee amount"
+          example: "0.00025"
         fppsRate:
           type: string
           description: "FPPS rate"
+          example: "0.000125"
         hashRate:
           type: string
           description: "Hash rate"
+          example: "100TH/s"
         date:
           type: integer
           description: "Reward date timestamp"
+          example: 1641081600
 
     CreditLine:
       type: object
       properties:
         asset:
           type: string
+          example: "BTC"
         amount:
           type: string
+          example: "1.5"
         totalFunding:
           type: string
+          example: "0.5"
         currentLtv:
           type: string
+          example: "25"
         initialLtv:
           type: string
+          example: "60"
         marginCallLtv:
           type: string
+          example: "75"
         liquidationLtv:
           type: string
+          example: "85"
         createdAt:
-          type: integer
\ No newline at end of file
+          type: integer
+          example: 1715339355
\ No newline at end of file

From 5b5159cf943b5b84fba385f85c2dbc9e1a885915 Mon Sep 17 00:00:00 2001
From: whitebit-robot 
Date: Wed, 11 Mar 2026 10:36:11 +0100
Subject: [PATCH 53/84]  docs(api): apply SME answers to mining pool endpoints

  - Fix hash rate units from "H units"/"TH/s" to H/s across pool
    overview and all private hashrate endpoints; add H/s descriptions
    to currentHashRate and hashrate response fields
  - Add sort order (DESC/newest first) to rewards; add time-window
    constraints and default-behavior note to account and worker
    hashrate endpoints; fix worker names to remove non-existent
    pagination params
  - Document BTC address types (P2PKH, P2SH, bech32), missing-address
    validation error, 3-link max per account, and name format error
    for watcher links
  - Fix broken mining pool card links in market-data and account-wallet
    overview pages; fix indentation in http-v4.yaml data properties
  - Fix description style violations on payout-destination endpoints
    (rule 5.1.2)
---
 api-reference/account-wallet/overview.mdx | 17 +----
 api-reference/market-data/overview.mdx    | 11 ---
 openapi/private/main_api_v4.yaml          | 71 ++++++++---------
 openapi/public/http-v4.yaml               | 92 ++++++++++++-----------
 4 files changed, 85 insertions(+), 106 deletions(-)

diff --git a/api-reference/account-wallet/overview.mdx b/api-reference/account-wallet/overview.mdx
index ddbfc81..35b4a94 100644
--- a/api-reference/account-wallet/overview.mdx
+++ b/api-reference/account-wallet/overview.mdx
@@ -1,10 +1,10 @@
 ---
 title: "Account & Wallet"
 sidebarTitle: "Overview"
-description: "Endpoints for managing main balance, deposits, withdrawals, codes, crypto lending, fees, mining pool, and credit lines."
+description: "Endpoints for managing main balance, deposits, withdrawals, codes, crypto lending, fees, and credit lines."
 ---
 
-Manage the main account balance, deposits, withdrawals, transfers, WhiteBIT codes, crypto lending, fees, mining pool, and credit lines.
+Manage the main account balance, deposits, withdrawals, transfers, WhiteBIT codes, crypto lending, fees, and credit lines.
 
 For general API conventions (base URL, error format, rate limits), see the [API Reference Overview](/api-reference/overview).
 
@@ -129,19 +129,6 @@ For general API conventions (base URL, error format, rate limits), see the [API
 
 ---
 
-## Mining Pool
-
-
-  
-    Get mining rewards
-  
-  
-    Get mining account hashrate
-  
-
-
----
-
 ## Credit Line
 
 
diff --git a/api-reference/market-data/overview.mdx b/api-reference/market-data/overview.mdx
index 61a6879..4ca36f4 100644
--- a/api-reference/market-data/overview.mdx
+++ b/api-reference/market-data/overview.mdx
@@ -82,14 +82,3 @@ Endpoints for fee information and funding rates:
   
 
 
----
-
-## Mining Pool
-
-Endpoint for mining pool information:
-
-
-  
-    Get overall mining pool state and hashrate info
-  
-
diff --git a/openapi/private/main_api_v4.yaml b/openapi/private/main_api_v4.yaml
index e10dad7..624a26c 100644
--- a/openapi/private/main_api_v4.yaml
+++ b/openapi/private/main_api_v4.yaml
@@ -4944,12 +4944,12 @@ paths:
         - Mining Pool
       summary: Get Rewards
       description: |
-        The endpoint returns rewards received from mining.
+        The endpoint returns rewards received from mining. Results are sorted in descending order by date (newest first).
 
         
         Rate limit: 1000 requests/10 sec.
         
-        
+
         
         The API does not cache the response.
         
@@ -5022,12 +5022,19 @@ paths:
         - Mining Pool
       summary: Get Mining Account Hashrate
       description: |
-        The endpoint returns hashrate of mining pool account.
+        The endpoint returns the hashrate history of a mining pool account.
+
+        The maximum time window depends on the selected interval:
+        - `5m` — up to 3 days
+        - `1h` — up to 7 days
+        - `24h` — up to 30 days
+
+        When `from` is omitted, the endpoint returns the last 14 data points from the `to` timestamp.
 
         
         Rate limit: 1000 requests/10 sec.
         
-        
+
         
         The API does not cache the response.
         
@@ -5047,17 +5054,17 @@ paths:
                   example: "miner123"
                 from:
                   type: integer
-                  description: Unix timestamp of starting point
+                  description: Start Unix timestamp. When omitted, defaults to returning the last 14 data points from the `to` timestamp.
                   example: 1640995200
                 to:
                   type: integer
-                  description: Unix timestamp of final point
+                  description: End Unix timestamp. Defaults to the current time when omitted.
                   example: 1641081600
                 interval:
                   type: string
                   enum: [5m, 1h, 24h]
                   default: 1h
-                  description: Timestamp interval
+                  description: Time interval for data points.
                   example: "1h"
       responses:
         "200":
@@ -5079,8 +5086,10 @@ paths:
                           properties:
                             timestamp:
                               type: integer
+                              description: Unix timestamp of the data point
                             hashrate:
                               type: string
+                              description: Hashrate value in H/s
         "422":
           description: Request validation failed
           content:
@@ -5102,7 +5111,7 @@ paths:
         - Mining Pool
       summary: Get Payout Destination
       description: |
-        Returns the current payout destination setting for a specific mining account belonging to the authenticated user.
+        The endpoint returns the current payout destination setting for a specific mining account.
 
         
         Rate limit: 1000 requests/10 sec.
@@ -5165,7 +5174,7 @@ paths:
         - Mining Pool
       summary: Set Payout Destination
       description: |
-        Updates the payout destination for a specific mining account belonging to the authenticated user. Can be set to main balance or an external BTC address.
+        The endpoint updates the payout destination for a specific mining account. The destination can be set to the main balance or an external BTC address.
 
         
         Rate limit: 1000 requests/10 sec.
@@ -5193,7 +5202,9 @@ paths:
                 address:
                   type: string
                   maxLength: 100
-                  description: External BTC address. Required when destination is external_address. Supports all standard Bitcoin address formats.
+                  description: |
+                    External BTC address. Required when `destination` is `external_address`. Supports all standard Bitcoin address formats (P2PKH, P2SH, and bech32).
+                    Omitting this field when `destination` is `external_address` returns: `{"code":0,"errors":{"name":["The address field is required."]},"message":"Validation failed"}`.
                   example: "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh"
       responses:
         "200":
@@ -5313,7 +5324,7 @@ paths:
         - Mining Pool
       summary: Worker Names
       description: |
-        Returns a paginated list of online worker names for a specific mining account.
+        The endpoint returns all online worker names for a specific mining account in a single response.
 
         
         Rate limit: 1000 requests/10 sec.
@@ -5333,20 +5344,6 @@ paths:
                   maxLength: 255
                   description: Mining pool account name
                   example: "my_miner_01"
-                offset:
-                  type: integer
-                  minimum: 0
-                  maximum: 10000
-                  default: 0
-                  description: Pagination offset
-                  example: 0
-                limit:
-                  type: integer
-                  minimum: 1
-                  maximum: 100
-                  default: 100
-                  description: Pagination limit
-                  example: 50
       responses:
         "200":
           description: Successful response
@@ -5362,15 +5359,10 @@ paths:
                         type: array
                         items:
                           type: string
-                  limit:
-                    type: integer
-                  offset:
-                    type: integer
+                        description: List of online worker names
               example:
                 data:
                   workers: ["worker_001", "worker_002", "worker_003"]
-                limit: 50
-                offset: 0
         "400":
           description: Validation failed
           content:
@@ -5396,7 +5388,12 @@ paths:
         - Mining Pool
       summary: Worker Hashrate History
       description: |
-        Returns hashrate performance history for a specific worker on a mining account.
+        The endpoint returns hashrate performance history for a specific worker on a mining account.
+
+        The maximum time window depends on the selected interval:
+        - `5m` — up to 3 days
+        - `1h` — up to 7 days
+        - `24h` — up to 14 days
 
         
         Rate limit: 1000 requests/10 sec.
@@ -5456,7 +5453,7 @@ paths:
                               type: integer
                             hashrate:
                               type: string
-                              description: Hashrate in TH/s
+                              description: Hashrate value in H/s
               example:
                 data:
                   hashrates:
@@ -5489,7 +5486,9 @@ paths:
         - Mining Pool
       summary: Create Watcher Link
       description: |
-        Creates a new watcher link for one or more mining accounts, granting specific permissions with a configurable expiration.
+        The endpoint creates a new watcher link for one or more mining accounts, granting specific permissions with a configurable expiration.
+
+        A maximum of 3 watcher links are allowed per account.
 
         
         Rate limit: 1000 requests/10 sec.
@@ -5519,7 +5518,9 @@ paths:
                   type: string
                   maxLength: 255
                   pattern: '^[a-zA-Z0-9_]+$'
-                  description: Link name (alphanumeric and underscores only)
+                  description: |
+                    Link name. Accepts alphanumeric characters and underscores only (`^[a-zA-Z0-9_]+$`).
+                    An invalid format returns: `{"code":0,"errors":{"name":["The name format is invalid."]},"message":"Validation failed"}`.
                   example: "monitoring_link"
                 permissions:
                   type: array
diff --git a/openapi/public/http-v4.yaml b/openapi/public/http-v4.yaml
index 14cc5c4..c821cd2 100644
--- a/openapi/public/http-v4.yaml
+++ b/openapi/public/http-v4.yaml
@@ -762,7 +762,7 @@ paths:
       description: |
         The endpoint returns overall information about the current mining pool state.
 
-        Hash rate is expressed in H units.
+        Hash rate is expressed in H/s.
 
         
         Rate limit 1000 requests/10 sec.
@@ -781,52 +781,54 @@ paths:
                   data:
                     type: object
                     properties:
-                        connectionLinks:
-                          type: array
-                          items:
-                            type: string
-                          example: ["stratum+tcp://1.1.1.1:80", "stratum+tcp://1.1.1.2:80"]
-                        location:
+                      connectionLinks:
+                        type: array
+                        items:
                           type: string
-                          example: global
-                        assets:
-                          type: array
-                          items:
-                            type: string
-                          example: ["BTC"]
-                        rewardSchemes:
-                          type: array
-                          items:
-                            type: string
-                          example: ["FPPS"]
-                        workers:
-                          type: integer
-                          example: 1846
-                        currentHashRate:
+                        example: ["stratum+tcp://1.1.1.1:80", "stratum+tcp://1.1.1.2:80"]
+                      location:
+                        type: string
+                        example: global
+                      assets:
+                        type: array
+                        items:
                           type: string
-                          example: "39353570.8006319183174839"
-                        last7daysHashRate:
-                          type: array
-                          items:
-                            type: object
-                            properties:
-                              timestamp:
-                                type: integer
-                                example: 1732579200
-                              hashrate:
-                                type: string
-                                example: "184425100325925.9259259259259259"
-                        blocks:
-                          type: array
-                          items:
-                            type: object
-                            properties:
-                              blockFoundAt:
-                                type: integer
-                                example: 1715339355
-                              blockHeight:
-                                type: integer
-                                example: 18329
+                        example: ["BTC"]
+                      rewardSchemes:
+                        type: array
+                        items:
+                          type: string
+                        example: ["FPPS"]
+                      workers:
+                        type: integer
+                        example: 1846
+                      currentHashRate:
+                        type: string
+                        description: Current pool hash rate in H/s
+                        example: "39353570.8006319183174839"
+                      last7daysHashRate:
+                        type: array
+                        items:
+                          type: object
+                          properties:
+                            timestamp:
+                              type: integer
+                              example: 1732579200
+                            hashrate:
+                              type: string
+                              description: Hash rate value in H/s
+                              example: "184425100325925.9259259259259259"
+                      blocks:
+                        type: array
+                        items:
+                          type: object
+                          properties:
+                            blockFoundAt:
+                              type: integer
+                              example: 1715339355
+                            blockHeight:
+                              type: integer
+                              example: 18329
 
 components:
   schemas:

From 9178e82c5e9e6ff261db708eb873855653364282 Mon Sep 17 00:00:00 2001
From: whitebit-robot 
Date: Wed, 11 Mar 2026 12:41:44 +0100
Subject: [PATCH 54/84] fix(api): update example of rewards field in mining
 pool rewards endpoint

---
 openapi/private/main_api_v4.yaml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/openapi/private/main_api_v4.yaml b/openapi/private/main_api_v4.yaml
index 624a26c..479062e 100644
--- a/openapi/private/main_api_v4.yaml
+++ b/openapi/private/main_api_v4.yaml
@@ -6610,8 +6610,8 @@ components:
           example: "0.000125"
         hashRate:
           type: string
-          description: "Hash rate"
-          example: "100TH/s"
+          description: "Hash rate (H/s)"
+          example: "100"
         date:
           type: integer
           description: "Reward date timestamp"

From 882eba72e66d242fadda81433a7f8b390912ee73 Mon Sep 17 00:00:00 2001
From: whitebit-robot 
Date: Wed, 11 Mar 2026 14:58:18 +0100
Subject: [PATCH 55/84] chore(ai): add skills layer, governance files, and
 Claude Code skills
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

  Implements the AI System Improvement initiative (Phases A–D):

  Phase A — Governance:
  - Add ai/RULES.md: all binding rules (AI behavior, pipeline gates, commit
    protocol, validation, content rules, self-improvement policy)
  - Add ai/LESSONS.md: pattern-triggered accumulated lessons (empty scaffold)
  - Slim CLAUDE.md to 53 lines (was 23 rules inline); all rules migrated to
    ai/RULES.md; add Commands section, Skills table, Key Files table
  - Add AGENTS.md: agent-agnostic entry point for Kiro, Cursor, and others

  Phase B — Skills system:
  - Add ai/skills/ with 9 skill files (dev-ticket-pipeline, doc-review-pipeline,
    task-self-review, self-improvement, promote-learnings, generate-docs-from-spec,
    write-commit-message, create-initiative-spec, cleanup-after-pipeline)
  - Update ai/agent.md: section 3 adds ai/skills/, ai/specs/, governance files;
    section 5 replaces step-by-step pipelines with one-line skill references

  Phase C — Claude Code Skills (official format):
  - Add .claude/skills/ with 9 SKILL.md directories (official format, not
    legacy .claude/commands/); all use disable-model-invocation: true;
    write-commit-message uses dynamic git diff injection

  Phase D — Initiative spec:
  - Add ai/specs/ai-system-improvement/ and ai/specs/claude-skills-research/
    (spec-driven pipeline used throughout; all phases complete)
---
 .claude/skills/add-new-skill/SKILL.md         |  19 +++
 .../skills/cleanup-after-pipeline/SKILL.md    |  20 +++
 .../skills/create-initiative-spec/SKILL.md    |  19 +++
 .claude/skills/dev-ticket-pipeline/SKILL.md   |  16 ++
 .claude/skills/doc-review-pipeline/SKILL.md   |  19 +++
 .../skills/generate-docs-from-spec/SKILL.md   |  17 ++
 .claude/skills/promote-learnings/SKILL.md     |  15 ++
 .claude/skills/self-improvement/SKILL.md      |  15 ++
 .claude/skills/task-self-review/SKILL.md      |  14 ++
 .claude/skills/write-commit-message/SKILL.md  |  21 +++
 .mintignore                                   |   2 +
 AGENTS.md                                     |  58 +++++++
 CONTRIBUTING.md                               | 160 ++++++++++++++++++
 13 files changed, 395 insertions(+)
 create mode 100644 .claude/skills/add-new-skill/SKILL.md
 create mode 100644 .claude/skills/cleanup-after-pipeline/SKILL.md
 create mode 100644 .claude/skills/create-initiative-spec/SKILL.md
 create mode 100644 .claude/skills/dev-ticket-pipeline/SKILL.md
 create mode 100644 .claude/skills/doc-review-pipeline/SKILL.md
 create mode 100644 .claude/skills/generate-docs-from-spec/SKILL.md
 create mode 100644 .claude/skills/promote-learnings/SKILL.md
 create mode 100644 .claude/skills/self-improvement/SKILL.md
 create mode 100644 .claude/skills/task-self-review/SKILL.md
 create mode 100644 .claude/skills/write-commit-message/SKILL.md
 create mode 100644 AGENTS.md
 create mode 100644 CONTRIBUTING.md

diff --git a/.claude/skills/add-new-skill/SKILL.md b/.claude/skills/add-new-skill/SKILL.md
new file mode 100644
index 0000000..b082838
--- /dev/null
+++ b/.claude/skills/add-new-skill/SKILL.md
@@ -0,0 +1,19 @@
+---
+name: add-new-skill
+description: >
+  Creates a new skill by producing the agent-agnostic instruction file
+  (ai/skills/.md) and the Claude Code entry point
+  (.claude/skills//SKILL.md) from canonical templates.
+  Registers the skill in CLAUDE.md, AGENTS.md, and ai/agent.md.
+  Use when adding a new repetitive task to the skills system.
+disable-model-invocation: true
+argument-hint: "[skill-name]"
+---
+
+Scaffolds a complete new skill: agent-agnostic instruction file with the
+required 4-section format, Claude Code SKILL.md with correct frontmatter,
+and registration in all three navigation files.
+
+For templates, rules, and DoD checklist, read `ai/skills/add-new-skill.md`.
+
+$ARGUMENTS
diff --git a/.claude/skills/cleanup-after-pipeline/SKILL.md b/.claude/skills/cleanup-after-pipeline/SKILL.md
new file mode 100644
index 0000000..f8753e0
--- /dev/null
+++ b/.claude/skills/cleanup-after-pipeline/SKILL.md
@@ -0,0 +1,20 @@
+---
+name: cleanup-after-pipeline
+description: >
+  Removes pasted content from ai/inputs/ files and deletes output artifacts
+  from ai/outputs/review/ after a pipeline run completes. Prevents stale
+  inputs from contaminating the next pipeline run.
+  Use after completing any dev-ticket or doc-review pipeline.
+disable-model-invocation: true
+argument-hint: "[dev-ticket|doc-review] [page-slug?]"
+---
+
+Cleans up pipeline inputs and outputs after a completed run. For dev-ticket:
+clears ai/inputs/issue_description.md and ai/inputs/sme_answers.md. For
+doc-review: also deletes ai/outputs/review// and clears
+ai/inputs/review_target.md.
+
+For full cleanup steps and confirmation requirements, read
+`ai/skills/cleanup-after-pipeline.md`.
+
+$ARGUMENTS
diff --git a/.claude/skills/create-initiative-spec/SKILL.md b/.claude/skills/create-initiative-spec/SKILL.md
new file mode 100644
index 0000000..c429394
--- /dev/null
+++ b/.claude/skills/create-initiative-spec/SKILL.md
@@ -0,0 +1,19 @@
+---
+name: create-initiative-spec
+description: >
+  Creates a structured initiative spec directory under ai/specs// with
+  RULES.md, requirements.md, design.md, tasks.md, progress.md, and lessons.md.
+  Use only for multi-session work meeting the DD-6 threshold: 3+ phases,
+  8+ files, multiple doc domains, or multiple contributors.
+disable-model-invocation: true
+argument-hint: "[initiative-name]"
+---
+
+Creates a complete initiative spec following the docs portal spec format.
+Only use when work meets the DD-6 threshold (see ai/RULES.md). For smaller
+tasks, run the relevant pipeline skill directly.
+
+For the spec structure, file templates, and DoD checklist, read
+`ai/skills/create-initiative-spec.md`.
+
+$ARGUMENTS
diff --git a/.claude/skills/dev-ticket-pipeline/SKILL.md b/.claude/skills/dev-ticket-pipeline/SKILL.md
new file mode 100644
index 0000000..7b66987
--- /dev/null
+++ b/.claude/skills/dev-ticket-pipeline/SKILL.md
@@ -0,0 +1,16 @@
+---
+name: dev-ticket-pipeline
+description: >
+  Runs the 4-phase documentation update pipeline for a developer ticket.
+  Analyzes the ticket, generates clarification questions (Phase 2 gate),
+  builds an implementation plan, then executes all documentation changes.
+  Use when a developer ticket requires updates to the WhiteBIT portal docs.
+disable-model-invocation: true
+---
+
+Orchestrates the complete documentation update workflow for a developer ticket:
+ticket analysis → clarification questions → implementation plan → task execution →
+task completion review → commit message. Stops at each pipeline gate for confirmation.
+
+For full step-by-step instructions, gate rules, and DoD checklist, read
+`ai/skills/dev-ticket-pipeline.md`.
diff --git a/.claude/skills/doc-review-pipeline/SKILL.md b/.claude/skills/doc-review-pipeline/SKILL.md
new file mode 100644
index 0000000..d4f914e
--- /dev/null
+++ b/.claude/skills/doc-review-pipeline/SKILL.md
@@ -0,0 +1,19 @@
+---
+name: doc-review-pipeline
+description: >
+  Runs the full documentation review pipeline for a portal page: style review,
+  findings challenge, implementation plan, task execution, and commit message.
+  Stops after challenge step for human confirmation before implementing fixes.
+  Use when reviewing a documentation page for style guide compliance.
+disable-model-invocation: true
+argument-hint: "[page-path]"
+---
+
+Orchestrates the complete doc review workflow: review → challenge → implementation
+plan → task execution → task completion review → commit message → cleanup.
+Stops at each pipeline gate for confirmation.
+
+For full step-by-step instructions, gate rules, and DoD checklist, read
+`ai/skills/doc-review-pipeline.md`.
+
+$ARGUMENTS
diff --git a/.claude/skills/generate-docs-from-spec/SKILL.md b/.claude/skills/generate-docs-from-spec/SKILL.md
new file mode 100644
index 0000000..9bce87f
--- /dev/null
+++ b/.claude/skills/generate-docs-from-spec/SKILL.md
@@ -0,0 +1,17 @@
+---
+name: generate-docs-from-spec
+description: >
+  Generates a new MDX documentation page from an OpenAPI or AsyncAPI spec file.
+  Reads the spec, applies the api-endpoints or websocket style guide, and creates
+  the complete page in the correct portal directory.
+  Use when creating a new API reference page from a spec file.
+disable-model-invocation: true
+argument-hint: "[spec-file-path]"
+---
+
+Creates a new MDX page from an OpenAPI or AsyncAPI operation, following portal
+conventions for file placement, navigation registration, and style guide compliance.
+
+For full instructions and DoD checklist, read `ai/skills/generate-docs-from-spec.md`.
+
+$ARGUMENTS
diff --git a/.claude/skills/promote-learnings/SKILL.md b/.claude/skills/promote-learnings/SKILL.md
new file mode 100644
index 0000000..40164e3
--- /dev/null
+++ b/.claude/skills/promote-learnings/SKILL.md
@@ -0,0 +1,15 @@
+---
+name: promote-learnings
+description: >
+  Evaluates insights from the current pipeline or phase against the global
+  ai/LESSONS.md and ai/RULES.md to determine what should be promoted globally.
+  Runs as the final step of self-improvement. Never skip.
+disable-model-invocation: true
+---
+
+Promotes locally captured lessons to the global knowledge base when they meet
+the promotion threshold: universal governance rules go to ai/RULES.md; reusable
+patterns go to ai/LESSONS.md; workflow gaps update the relevant skill file.
+
+For the promotion decision tree and output format, read
+`ai/skills/promote-learnings.md`.
diff --git a/.claude/skills/self-improvement/SKILL.md b/.claude/skills/self-improvement/SKILL.md
new file mode 100644
index 0000000..f674e5a
--- /dev/null
+++ b/.claude/skills/self-improvement/SKILL.md
@@ -0,0 +1,15 @@
+---
+name: self-improvement
+description: >
+  Evaluates the completed pipeline run for lessons, patterns, and workflow gaps.
+  Decides whether to write to ai/LESSONS.md (pattern-triggered) or the initiative
+  spec lessons.md (always, if spec exists). Then calls promote-learnings.
+  Run automatically after every completed pipeline. Never skip.
+disable-model-invocation: true
+---
+
+Captures lessons from the current pipeline run. Always runs after any completed
+pipeline. Writes to ai/LESSONS.md only when a pattern recurred ≥2 times or a
+structural gap was found. Always writes to initiative lessons.md if a spec exists.
+
+For the decision tree and output format, read `ai/skills/self-improvement.md`.
diff --git a/.claude/skills/task-self-review/SKILL.md b/.claude/skills/task-self-review/SKILL.md
new file mode 100644
index 0000000..973f506
--- /dev/null
+++ b/.claude/skills/task-self-review/SKILL.md
@@ -0,0 +1,14 @@
+---
+name: task-self-review
+description: >
+  Performs a quick quality check on a just-completed documentation task before
+  marking it done. Verifies DoD compliance, checks for duplication, validates
+  style guide adherence, and confirms no files outside scope were modified.
+  Run automatically after completing any documentation task.
+disable-model-invocation: true
+---
+
+Lightweight, focused quality check on the most recently completed task.
+Faster than task_completion_review — covers DoD checklist and scope discipline only.
+
+For the review checklist and output format, read `ai/skills/task-self-review.md`.
diff --git a/.claude/skills/write-commit-message/SKILL.md b/.claude/skills/write-commit-message/SKILL.md
new file mode 100644
index 0000000..080af02
--- /dev/null
+++ b/.claude/skills/write-commit-message/SKILL.md
@@ -0,0 +1,21 @@
+---
+name: write-commit-message
+description: >
+  Generates a conventional commit message by analyzing staged git changes and
+  recent commit history to match the project's commit style. Presents the message
+  for user approval — never commits automatically.
+  Use when staging changes for commit or when asked to generate a commit message.
+disable-model-invocation: true
+---
+
+Generates a conventional commit message following the `docs:`, `fix:`, `feat:`,
+or `chore:` format with scope. Presents the message to the user for approval.
+Never performs `git commit` — that is the user's responsibility.
+
+For full instructions and format rules, read `ai/skills/write-commit-message.md`.
+
+## Current staged changes
+!`git diff --staged`
+
+## Recent commits (style reference)
+!`git log --oneline -10`
diff --git a/.mintignore b/.mintignore
index 6cc8e7c..dc0a592 100644
--- a/.mintignore
+++ b/.mintignore
@@ -1,4 +1,6 @@
 ai/
+.claude
+.github
 Dockerfile
 docker-compose.yml
 .dockerignore
diff --git a/AGENTS.md b/AGENTS.md
new file mode 100644
index 0000000..19da04b
--- /dev/null
+++ b/AGENTS.md
@@ -0,0 +1,58 @@
+# WhiteBIT Documentation Portal — AI Agent Reference
+
+> Entry point for non-Claude AI agents (Kiro, Cursor, and others).
+> For Claude Code, see `CLAUDE.md`. For binding rules, read `ai/RULES.md`.
+
+## Project
+
+Mintlify documentation portal for the WhiteBIT cryptocurrency exchange. Covers REST API
+(v1/v2/v4), WebSocket API, OAuth, platform guides, user guides, FAQ, changelog, and
+glossary. Read `ai/agent.md` for the full portal structure, file conventions, and content
+map.
+
+## First — Read the Rules
+
+Load `ai/RULES.md` before starting any task. It contains:
+- §1 AI Behavior — critical thinking, clarification requirements, discussion protocol
+- §2 Pipeline Governance — pipeline gates, commit protocol, validation
+- §3 Content Rules — style guides, fabrication prohibition, navigation
+- §4 Self-Improvement — when to run, when to write to LESSONS.md
+
+## Skills
+
+Load the relevant skill file and follow its steps and DoD checklist.
+Automatic skills run after every pipeline without being explicitly asked.
+
+| Skill | File | When |
+|-------|------|------|
+| Dev ticket pipeline | `ai/skills/dev-ticket-pipeline.md` | On demand — processing a dev ticket |
+| Doc review pipeline | `ai/skills/doc-review-pipeline.md` | On demand — reviewing a doc page |
+| Generate docs from spec | `ai/skills/generate-docs-from-spec.md` | On demand — new MDX from spec |
+| Write commit message | `ai/skills/write-commit-message.md` | On demand — before committing |
+| Create initiative spec | `ai/skills/create-initiative-spec.md` | On demand — multi-phase work |
+| Cleanup after pipeline | `ai/skills/cleanup-after-pipeline.md` | On demand — after any pipeline |
+| Add new skill | `ai/skills/add-new-skill.md` | On demand — creating a new skill |
+| Task self-review | `ai/skills/task-self-review.md` | **Automatic** — after any task completion |
+| Self-improvement | `ai/skills/self-improvement.md` | **Automatic** — after any pipeline run |
+| Promote learnings | `ai/skills/promote-learnings.md` | **Automatic** — final step of self-improvement |
+
+## Key Files
+
+| File | Purpose |
+|------|---------|
+| `ai/RULES.md` | All binding rules for AI work on this portal |
+| `ai/LESSONS.md` | Accumulated lessons (pattern-triggered entries) |
+| `ai/agent.md` | Portal structure, file conventions, content map |
+| `ai/prompts/` | Pipeline prompt files (inputs/outputs for AI tools) |
+| `ai/skills/` | Skill files — invocable task workflows with DoD checklists |
+| `ai/style-guides/` | Writing conventions (use README.md decision tree to pick one) |
+| `docs.json` | Navigation configuration — update when adding pages |
+
+## Behavioral Expectations
+
+These rules apply regardless of which AI agent is in use. Full rules are in `ai/RULES.md`.
+
+- Do not blindly agree. Flag errors and bad assumptions with evidence (§1.1).
+- Ask clarifying questions before starting ambiguous tasks — batch all questions at once (§1.2).
+- Never run `git commit` autonomously. Generate the message; the human commits (§2.2).
+- After any pipeline: run self-improvement, then promote-learnings (§4.1).
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..d9d02d7
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,160 @@
+# Contributing to WhiteBIT API Documentation
+
+This guide covers everything needed to contribute to the WhiteBIT docs portal — branching strategy, commit format, pull request process, and review checklists by role.
+
+---
+
+## Team
+
+| Role | Responsibilities |
+|------|-----------------|
+| **DevRel** | Portal ownership, content governance, final approval for all PRs, sole authority to merge `stage → main` |
+| **Tech Writer** | Documentation authoring, style compliance, PR review for content quality |
+| **Backend Engineer** | API accuracy, OpenAPI/AsyncAPI spec changes, SME answers for documentation tickets |
+
+---
+
+## Branching Strategy
+
+```
+main
+ └── stage  ← base branch for all work
+      └── docs/your-branch
+```
+
+**Rules:**
+
+- **All branches are cut from `stage`.** Never branch from `main` directly.
+- **All pull requests target `stage`.** When a PR is merged, changes are immediately available in the preview environment: [https://whitebit-stage.mintlify.app](https://whitebit-stage.mintlify.app).
+- **`stage → main` promotions:** Any Dev can open a PR from `stage` into `main`. Only DevRel can merge it. This controls what goes to production.
+
+### Branch naming
+
+```
+docs/_brief-description
+```
+
+Examples:
+```
+docs/DV-21_add-mining-pool-endpoints
+docs/CEX-2739_sub-account-transfer-params
+docs/DR-64_extend-rpi-documentation
+```
+
+---
+
+## Commit Messages
+
+Follow [Conventional Commits](https://www.conventionalcommits.org/). Use the `ai/prompts/commit_message.md` prompt to generate the message from your staged diff.
+
+**Format:**
+
+```
+(): 
+
+[optional body]
+```
+
+**Types:** `docs`, `fix`, `feat`, `chore`
+
+**Scopes:** `api`, `websocket`, `guide`, `faq`, `changelog`, `style`, `config`
+
+**Examples:**
+
+```
+docs(api): add mining pool endpoints to market data
+fix(websocket): correct depth channel subscription example
+chore(config): update docs.json navigation for sub-accounts
+```
+
+---
+
+## Pull Request Process
+
+### Opening a PR
+
+1. Cut a branch from `stage` using the naming convention above.
+2. Make your changes. Validate before pushing (see [Validation](#validation)).
+3. Open a PR targeting `stage`.
+4. Fill in the PR description: what changed and why.
+5. Request review from the appropriate reviewer (see [Review checklists](#review-checklists) below).
+
+### Merging to `stage`
+
+- At least one approval required before merging.
+- DevRel or Tech Writer can approve and merge feature PRs into `stage`.
+- Merged changes appear in preview at [https://whitebit-stage.mintlify.app](https://whitebit-stage.mintlify.app).
+
+### Promoting `stage → main`
+
+- Any Dev can open the PR from `stage` into `main`.
+- Only DevRel can merge it.
+- DevRel runs a final content and accuracy review before merging.
+
+---
+
+## Validation
+
+Always validate your changes before opening a PR:
+
+```bash
+# OpenAPI specs
+npx @redocly/cli lint openapi/**/*.yaml
+
+# AsyncAPI specs
+find asyncapi -name "*.yaml" -exec asyncapi validate {} \;
+
+# Local preview
+mint dev
+```
+
+---
+
+## Review Checklists
+
+### DevRel
+
+- [ ] API accuracy — parameters, types, constraints, and examples match the actual API behavior
+- [ ] No undocumented breaking changes
+- [ ] Commit messages follow conventional commits format
+- [ ] Appropriate scope and type for the changes
+- [ ] For `stage → main`: all content is production-ready
+
+### Tech Writer
+
+- [ ] Style guide compliance — check `ai/style-guides/` for the relevant guide
+- [ ] No pronouns in any documentation content (base rule 3.2)
+- [ ] Consistent terminology with the glossary
+- [ ] Examples are present and correct
+- [ ] Navigation updated in `docs.json` if new pages were added
+
+### Backend Engineer
+
+- [ ] OpenAPI/AsyncAPI spec changes are valid (`npx @redocly/cli lint` and `asyncapi validate` pass)
+- [ ] Parameter names, types, and constraints match the actual implementation
+- [ ] Response schemas reflect real API responses
+- [ ] SME answers provided in `ai/inputs/sme_answers.md` if a documentation ticket is being processed
+
+---
+
+## Documentation Workflow
+
+The docs portal uses an AI-assisted pipeline for processing dev tickets and reviewing pages. See `ai/prompts/README.md` for the full workflow. Key entry points:
+
+| Task | Start here |
+|------|-----------|
+| Process a dev ticket | `ai/prompts/ticket_analysis.md` |
+| Review an existing page | `ai/prompts/doc_review.md` |
+| Generate docs from a spec | `ai/prompts/openapi_to_docs.md` |
+| Write a commit message | `ai/prompts/commit_message.md` |
+
+---
+
+## Getting Help
+
+| Question type | Contact |
+|--------------|---------|
+| Style and content | Tech Writer team lead |
+| API accuracy | Backend Engineering team |
+| Process and workflow | DevRel team lead |
+| Portal setup | Check `README.md` |

From eabbeee5ff5b712237cda2bb276a66aae8617229 Mon Sep 17 00:00:00 2001
From: whitebit-robot 
Date: Thu, 12 Mar 2026 13:22:56 +0100
Subject: [PATCH 56/84] fix(api): add missing mining pool rewards fields

---
 openapi/private/main_api_v4.yaml | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/openapi/private/main_api_v4.yaml b/openapi/private/main_api_v4.yaml
index 479062e..6c881b9 100644
--- a/openapi/private/main_api_v4.yaml
+++ b/openapi/private/main_api_v4.yaml
@@ -6592,6 +6592,16 @@ components:
           type: string
           description: "Mining account name"
           example: "miner123"
+        payoutDestination:
+          type: string
+          enum: [main_balance, external_address]
+          description: "Payout destination"
+          example: "main_balance"
+        payoutTransactionHash:
+          type: string
+          nullable: true
+          description: "Payout transaction hash. null in case payout destination is main_balance, blockchain transaction hash in case payout destination is external_address"
+          example: "0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098"
         totalReward:
           type: string
           description: "Total reward amount"
@@ -6600,6 +6610,10 @@ components:
           type: string
           description: "Reward amount (without fee)"
           example: "0.001"
+        rewardCurrency:
+          type: string
+          description: "Reward currency"
+          example: "BTC"
         fee:
           type: string
           description: "Fee amount"

From 203d7a2636c64acd60a1b3732b91fa9592f1fc15 Mon Sep 17 00:00:00 2001
From: whitebit-robot 
Date: Thu, 12 Mar 2026 13:52:07 +0100
Subject: [PATCH 57/84] fix(api): add missing limit, offset fields to mining
 accounts list response

---
 openapi/private/main_api_v4.yaml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/openapi/private/main_api_v4.yaml b/openapi/private/main_api_v4.yaml
index 6c881b9..c1274b6 100644
--- a/openapi/private/main_api_v4.yaml
+++ b/openapi/private/main_api_v4.yaml
@@ -5802,6 +5802,11 @@ paths:
                         createdAt:
                           type: integer
                           description: Account creation timestamp (Unix time)
+                                      limit:
+                  limit:  
+                    type: integer
+                  offset:
+                    type: integer
               example:
                 data:
                   - name: "my_miner_01"

From ebd3a6ae6641638b103e1e2e6b7f6445573b1af9 Mon Sep 17 00:00:00 2001
From: whitebit-robot 
Date: Thu, 12 Mar 2026 14:16:54 +0100
Subject: [PATCH 58/84] fix(api): typo

---
 openapi/private/main_api_v4.yaml | 1 -
 1 file changed, 1 deletion(-)

diff --git a/openapi/private/main_api_v4.yaml b/openapi/private/main_api_v4.yaml
index c1274b6..2a0d0cf 100644
--- a/openapi/private/main_api_v4.yaml
+++ b/openapi/private/main_api_v4.yaml
@@ -5802,7 +5802,6 @@ paths:
                         createdAt:
                           type: integer
                           description: Account creation timestamp (Unix time)
-                                      limit:
                   limit:  
                     type: integer
                   offset:

From 788ca788ab1e1c3a32f141b6b79b3411f8bf2766 Mon Sep 17 00:00:00 2001
From: whitebit-robot 
Date: Thu, 12 Mar 2026 14:32:01 +0100
Subject: [PATCH 59/84] api(docs): change payoutDestination example in mining
 rewards response

---
 openapi/private/main_api_v4.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/openapi/private/main_api_v4.yaml b/openapi/private/main_api_v4.yaml
index 2a0d0cf..f49e3fe 100644
--- a/openapi/private/main_api_v4.yaml
+++ b/openapi/private/main_api_v4.yaml
@@ -6600,7 +6600,7 @@ components:
           type: string
           enum: [main_balance, external_address]
           description: "Payout destination"
-          example: "main_balance"
+          example: "external_address"
         payoutTransactionHash:
           type: string
           nullable: true

From 2da127ee5965808b6eba9237ce0882dcf01de827 Mon Sep 17 00:00:00 2001
From: whitebit-robot 
Date: Wed, 18 Mar 2026 12:12:57 +0100
Subject: [PATCH 60/84] added missing-schemas or validation

---
 openapi/private/http-trade-v4.yaml | 594 +++++++++++++----------------
 openapi/private/main_api_v4.yaml   | 173 ++++-----
 openapi/public/http-v4.yaml        |  71 +++-
 3 files changed, 392 insertions(+), 446 deletions(-)

diff --git a/openapi/private/http-trade-v4.yaml b/openapi/private/http-trade-v4.yaml
index 9872736..c59cbd5 100644
--- a/openapi/private/http-trade-v4.yaml
+++ b/openapi/private/http-trade-v4.yaml
@@ -226,14 +226,14 @@ paths:
         
           - RPI orders are post-only by design and cannot be used with the IOC flag. The API returns error code `37` when both `rpi=true` and `ioc=true` are used.
         
-
+        
         
         
           - `30` - default validation error code
           - `31` - market validation failed
           - `32` - amount validation failed
           - `33` - price validation failed
-          - `36` - clientOrderId validation failed
+          - `36` - client_order_id validation failed
           - `37` - `ioc=true` cannot be used with `postOnly=true` or `rpi=true`
         
       tags:
@@ -271,7 +271,7 @@ paths:
                   type: string
                   description: "Price in [money](/glossary#money) currency. Example: '9800'"
                   example: "40000"
-                clientOrderId:
+                client_order_id:
                   type: string
                   description: "Identifier should be unique and contain letters, dashes, numbers, dots or underscores."
                   example: "order1987111"
@@ -322,7 +322,7 @@ paths:
               price: "40000"
               postOnly: false
               ioc: false
-              clientOrderId: order1987111
+              client_order_id: order1987111
               stopLoss: "50000"
               takeProfit: "30000"
               positionSide: LONG
@@ -337,11 +337,11 @@ paths:
               schema:
                 type: object
                 properties:
-                  orderId:
+                  order_id:
                     type: integer
                     description: Unique order identifier
                     example: 4180284841
-                  clientOrderId:
+                  client_order_id:
                     type: string
                     description: Custom client order identifier. Empty string if not specified
                     example: "order1987111"
@@ -362,11 +362,11 @@ paths:
                     type: number
                     description: Timestamp of order creation in Unix format
                     example: 1595792396.165973
-                  dealMoney:
+                  deal_money:
                     type: string
                     description: Amount in money currency that is finished
                     example: "0"
-                  dealStock:
+                  deal_stock:
                     type: string
                     description: Amount in stock currency that is finished
                     example: "0"
@@ -378,7 +378,7 @@ paths:
                     type: string
                     description: Remaining amount that must be finished
                     example: "0.001"
-                  dealFee:
+                  deal_fee:
                     type: string
                     description: Fee in money that is paid when order is finished
                     example: "0"
@@ -430,17 +430,17 @@ paths:
                     description: Retail Price Improvement flag
                     example: true
               example:
-                orderId: 4180284841
-                clientOrderId: "order1987111"
+                order_id: 4180284841
+                client_order_id: "order1987111"
                 market: "BTC_USDT"
                 side: "buy"
                 type: "limit"
                 timestamp: 1595792396.165973
-                dealMoney: "0"
-                dealStock: "0"
+                deal_money: "0"
+                deal_stock: "0"
                 amount: "0.01"
                 left: "0.001"
-                dealFee: "0"
+                deal_fee: "0"
                 price: "40000"
                 postOnly: false
                 ioc: false
@@ -504,7 +504,7 @@ paths:
                         type: string
                         description: "Price in [money](/glossary#money) currency."
                         example: "40000"
-                      clientOrderId:
+                      client_order_id:
                         type: string
                         description: "Identifier must be unique and contain letters, numbers, dashes, dots, or underscores."
                         example: ""
@@ -571,7 +571,7 @@ paths:
                   market: BTC_PERP
                   postOnly: false
                   ioc: false
-                  clientOrderId: ""
+                  client_order_id: ""
                   positionSide: LONG
                   rpi: true
                 - side: sell
@@ -580,7 +580,7 @@ paths:
                   market: BTC_USDT
                   postOnly: false
                   ioc: false
-                  clientOrderId: ""
+                  client_order_id: ""
                   positionSide: LONG
                   rpi: true
                 - side: sell
@@ -589,7 +589,7 @@ paths:
                   market: ETH_BTC
                   postOnly: false
                   ioc: false
-                  clientOrderId: ""
+                  client_order_id: ""
                   positionSide: LONG
                   rpi: true
               stopOnFail: true
@@ -611,11 +611,11 @@ paths:
                       nullable: true
                       description: Order data when successful, null when failed
                       properties:
-                        orderId:
+                        order_id:
                           type: integer
                           description: Unique order identifier
                           example: 4326248250
-                        clientOrderId:
+                        client_order_id:
                           type: string
                           description: Custom client order identifier. Empty string if not specified
                           example: ""
@@ -636,11 +636,11 @@ paths:
                           type: number
                           description: Timestamp of order creation in Unix format
                           example: 1684916268.825564
-                        dealMoney:
+                        deal_money:
                           type: string
                           description: Amount in money currency that is finished
                           example: "641.988"
-                        dealStock:
+                        deal_stock:
                           type: string
                           description: Amount in stock currency that is finished
                           example: "0.02"
@@ -652,7 +652,7 @@ paths:
                           type: string
                           description: Remaining amount that must be finished
                           example: "0"
-                        dealFee:
+                        deal_fee:
                           type: string
                           description: Fee in money that is paid when order is finished
                           example: "1.283976"
@@ -710,17 +710,17 @@ paths:
                             amount: ["Given amount is less than min amount 0.001."]
               example:
                 - result:
-                    orderId: 4326248250
-                    clientOrderId: ""
+                    order_id: 4326248250
+                    client_order_id: ""
                     market: "BTC_USDT"
                     side: "buy"
                     type: "limit"
                     timestamp: 1684916268.825564
-                    dealMoney: "641.988"
-                    dealStock: "0.02"
+                    deal_money: "641.988"
+                    deal_stock: "0.02"
                     amount: "0.02"
                     left: "0"
-                    dealFee: "1.283976"
+                    deal_fee: "1.283976"
                     ioc: false
                     postOnly: false
                     price: "40000"
@@ -736,17 +736,17 @@ paths:
                     errors:
                       amount: ["Given amount is less than min amount 0.001."]
                 - result:
-                    orderId: 4326248250
-                    clientOrderId: ""
+                    order_id: 4326248250
+                    client_order_id: ""
                     market: "BTC_USDT"
                     side: "sell"
                     type: "limit"
                     timestamp: 1684916268.825564
-                    dealMoney: "641.988"
-                    dealStock: "0.02"
+                    deal_money: "641.988"
+                    deal_stock: "0.02"
                     amount: "0.02"
                     left: "0"
-                    dealFee: "1.283976"
+                    deal_fee: "1.283976"
                     ioc: false
                     postOnly: false
                     price: "41000"
@@ -807,7 +807,7 @@ paths:
                 amount:
                   type: string
                   example: "0.01"
-                clientOrderId:
+                client_order_id:
                   type: string
                   example: "order1987111"
                 stopLoss:
@@ -830,7 +830,7 @@ paths:
               market: BTC_USDT
               side: buy
               amount: "0.01"
-              clientOrderId: order1987111
+              client_order_id: order1987111
               request: "{{request}}"
               nonce: "{{nonce}}"
       responses:
@@ -841,11 +841,11 @@ paths:
               schema:
                 type: object
                 properties:
-                  orderId:
+                  order_id:
                     type: integer
                     description: Unique order identifier
                     example: 4180284841
-                  clientOrderId:
+                  client_order_id:
                     type: string
                     description: Custom client order identifier. Empty string if not specified
                     example: "order1987111"
@@ -866,11 +866,11 @@ paths:
                     type: number
                     description: Timestamp of order creation in Unix format
                     example: 1595792396.165973
-                  dealMoney:
+                  deal_money:
                     type: string
                     description: Amount in money currency that is finished
                     example: "0"
-                  dealStock:
+                  deal_stock:
                     type: string
                     description: Amount in stock currency that is finished
                     example: "0"
@@ -882,7 +882,7 @@ paths:
                     type: string
                     description: Remaining amount that must be finished
                     example: "0.001"
-                  dealFee:
+                  deal_fee:
                     type: string
                     description: Fee in money that is paid when order is finished
                     example: "0"
@@ -918,17 +918,17 @@ paths:
                     enum: [LONG, SHORT, BOTH]
                     example: "LONG"
               example:
-                orderId: 4180284841
-                clientOrderId: "order1987111"
+                order_id: 4180284841
+                client_order_id: "order1987111"
                 market: "BTC_USDT"
                 side: "sell"
                 type: "market"
                 timestamp: 1595792396.165973
-                dealMoney: "0"
-                dealStock: "0"
+                deal_money: "0"
+                deal_stock: "0"
                 amount: "0.001"
                 left: "0.001"
-                dealFee: "0"
+                deal_fee: "0"
                 status: "FILLED"
                 stp: "no"
                 oto:
@@ -996,7 +996,7 @@ paths:
                 takeProfit:
                   type: string
                   example: "50000"
-                clientOrderId:
+                client_order_id:
                   type: string
                   example: "order1987111"
                 positionSide:
@@ -1017,7 +1017,7 @@ paths:
               activation_price: "40000"
               stopLoss: "30000"
               takeProfit: "50000"
-              clientOrderId: order1987111
+              client_order_id: order1987111
               positionSide: LONG
               request: "{{request}}"
               nonce: "{{nonce}}"
@@ -1029,11 +1029,11 @@ paths:
               schema:
                 type: object
                 properties:
-                  orderId:
+                  order_id:
                     type: integer
                     description: Unique order identifier
                     example: 4180284841
-                  clientOrderId:
+                  client_order_id:
                     type: string
                     description: Custom client order identifier. Empty string if not specified
                     example: "order1987111"
@@ -1054,11 +1054,11 @@ paths:
                     type: number
                     description: Timestamp of order creation in Unix format
                     example: 1595792396.165973
-                  dealMoney:
+                  deal_money:
                     type: string
                     description: Amount in money currency that is finished
                     example: "0"
-                  dealStock:
+                  deal_stock:
                     type: string
                     description: Amount in stock currency that is finished
                     example: "0"
@@ -1070,7 +1070,7 @@ paths:
                     type: string
                     description: Remaining amount that must be finished
                     example: "0.001"
-                  dealFee:
+                  deal_fee:
                     type: string
                     description: Fee in money that is paid when order is finished
                     example: "0"
@@ -1114,17 +1114,17 @@ paths:
                     enum: [LONG, SHORT, BOTH]
                     example: "LONG"
               example:
-                orderId: 4180284841
-                clientOrderId: "order1987111"
+                order_id: 4180284841
+                client_order_id: "order1987111"
                 market: "BTC_USDT"
                 side: "buy"
                 type: "stop limit"
                 timestamp: 1595792396.165973
-                dealMoney: "0"
-                dealStock: "0"
+                deal_money: "0"
+                deal_stock: "0"
                 amount: "0.001"
                 left: "0.001"
-                dealFee: "0"
+                deal_fee: "0"
                 price: "40000"
                 activation_price: "40000"
                 status: "FILLED"
@@ -1190,7 +1190,7 @@ paths:
                 activation_price:
                   type: string
                   example: "40000"
-                clientOrderId:
+                client_order_id:
                   type: string
                   example: "order1987111"
                 stopLoss:
@@ -1214,7 +1214,7 @@ paths:
               side: buy
               amount: "0.01"
               activation_price: "40000"
-              clientOrderId: order1987111
+              client_order_id: order1987111
               request: "{{request}}"
               nonce: "{{nonce}}"
       responses:
@@ -1225,11 +1225,11 @@ paths:
               schema:
                 type: object
                 properties:
-                  orderId:
+                  order_id:
                     type: integer
                     description: Unique order identifier
                     example: 4180284841
-                  clientOrderId:
+                  client_order_id:
                     type: string
                     description: Custom client order identifier. Empty string if not specified
                     example: "order1987111"
@@ -1250,11 +1250,11 @@ paths:
                     type: number
                     description: Timestamp of order creation in Unix format
                     example: 1595792396.165973
-                  dealMoney:
+                  deal_money:
                     type: string
                     description: Amount in money currency that is finished
                     example: "0"
-                  dealStock:
+                  deal_stock:
                     type: string
                     description: Amount in stock currency that is finished
                     example: "0"
@@ -1266,7 +1266,7 @@ paths:
                     type: string
                     description: Remaining amount that must be finished
                     example: "0.001"
-                  dealFee:
+                  deal_fee:
                     type: string
                     description: Fee in money that is paid when order is finished
                     example: "0"
@@ -1306,17 +1306,17 @@ paths:
                     enum: [LONG, SHORT, BOTH]
                     example: "LONG"
               example:
-                orderId: 4180284841
-                clientOrderId: "order1987111"
+                order_id: 4180284841
+                client_order_id: "order1987111"
                 market: "BTC_USDT"
                 side: "sell"
                 type: "stop market"
                 timestamp: 1595792396.165973
-                dealMoney: "0"
-                dealStock: "0"
+                deal_money: "0"
+                deal_stock: "0"
                 amount: "0.001"
                 left: "0.001"
-                dealFee: "0"
+                deal_fee: "0"
                 activation_price: "40000"
                 status: "FILLED"
                 stp: "no"
@@ -2212,7 +2212,7 @@ paths:
                             stop_loss:
                               type: object
                               properties:
-                                orderId:
+                                order_id:
                                   type: integer
                                   example: 117703764514
                                 positionSide:
@@ -2222,7 +2222,7 @@ paths:
                             take_profit:
                               type: object
                               properties:
-                                orderId:
+                                order_id:
                                   type: integer
                                   example: 117703764515
                                 positionSide:
@@ -2248,10 +2248,10 @@ paths:
                             conditionalOrder:
                               type: object
                               properties:
-                                orderId:
+                                order_id:
                                   type: integer
                                   example: 3686033640
-                                clientOrderId:
+                                client_order_id:
                                   type: string
                                   example: "customId11"
                                 market:
@@ -2269,19 +2269,19 @@ paths:
                   - id: 117703764513
                     type: "oco"
                     stop_loss:
-                      orderId: 117703764514
-                      clientOrderId: ""
+                      order_id: 117703764514
+                      client_order_id: ""
                       market: "BTC_USDT"
                       side: "buy"
                       type: "stop limit"
                       timestamp: 1594605801.49815
-                      dealMoney: "0"
-                      dealStock: "0"
+                      deal_money: "0"
+                      deal_stock: "0"
                       amount: "2.241379"
                       takerFee: "0.001"
                       makerFee: "0.001"
                       left: "2.241379"
-                      dealFee: "0"
+                      deal_fee: "0"
                       post_only: false
                       mtime: 1662478154.941582
                       price: "19928.79"
@@ -2292,19 +2292,19 @@ paths:
                       stp: "no"
                       positionSide: "LONG"
                     take_profit:
-                      orderId: 117703764515
-                      clientOrderId: ""
+                      order_id: 117703764515
+                      client_order_id: ""
                       market: "BTC_USDT"
                       side: "buy"
                       type: "limit"
                       timestamp: 1662478154.941582
-                      dealMoney: "0"
-                      dealStock: "0"
+                      deal_money: "0"
+                      deal_stock: "0"
                       amount: "0.635709"
                       takerFee: "0.001"
                       makerFee: "0.001"
                       left: "0.635709"
-                      dealFee: "0"
+                      deal_fee: "0"
                       post_only: false
                       mtime: 1662478154.941582
                       price: "9928.79"
@@ -2316,19 +2316,19 @@ paths:
                     stopLossPrice: "30000"
                     takeProfitPrice: "50000"
                     conditionalOrder:
-                      orderId: 3686033640
-                      clientOrderId: "customId11"
+                      order_id: 3686033640
+                      client_order_id: "customId11"
                       market: "BTC_USDT"
                       side: "buy"
                       type: "limit"
                       timestamp: 1594605801.49815
-                      dealMoney: "0"
-                      dealStock: "0"
+                      deal_money: "0"
+                      deal_stock: "0"
                       amount: "2.241379"
                       takerFee: "0.001"
                       makerFee: "0.001"
                       left: "2.241379"
-                      dealFee: "0"
+                      deal_fee: "0"
                       price: "40000"
                       status: "FILLED"
                       stp: "no"
@@ -2409,10 +2409,10 @@ paths:
                       type: object
                       description: Stop loss order details
                       properties:
-                        orderId:
+                        order_id:
                           type: integer
                           example: 117703764514
-                        clientOrderId:
+                        client_order_id:
                           type: string
                           example: ""
                         market:
@@ -2428,10 +2428,10 @@ paths:
                         timestamp:
                           type: number
                           example: 1594605801.49815
-                        dealMoney:
+                        deal_money:
                           type: string
                           example: "0"
-                        dealStock:
+                        deal_stock:
                           type: string
                           example: "0"
                         amount:
@@ -2446,7 +2446,7 @@ paths:
                         left:
                           type: string
                           example: "2.241379"
-                        dealFee:
+                        deal_fee:
                           type: string
                           example: "0"
                         post_only:
@@ -2478,10 +2478,10 @@ paths:
                       type: object
                       description: Take profit order details
                       properties:
-                        orderId:
+                        order_id:
                           type: integer
                           example: 117703764515
-                        clientOrderId:
+                        client_order_id:
                           type: string
                           example: ""
                         market:
@@ -2497,10 +2497,10 @@ paths:
                         timestamp:
                           type: number
                           example: 1662478154.941582
-                        dealMoney:
+                        deal_money:
                           type: string
                           example: "0"
-                        dealStock:
+                        deal_stock:
                           type: string
                           example: "0"
                         amount:
@@ -2515,7 +2515,7 @@ paths:
                         left:
                           type: string
                           example: "0.635709"
-                        dealFee:
+                        deal_fee:
                           type: string
                           example: "0"
                         post_only:
@@ -2536,19 +2536,19 @@ paths:
               example:
                 - id: 117703764513
                   stop_loss:
-                    orderId: 117703764514
-                    clientOrderId: ""
+                    order_id: 117703764514
+                    client_order_id: ""
                     market: "BTC_USDT"
                     side: "buy"
                     type: "stop limit"
                     timestamp: 1594605801.49815
-                    dealMoney: "0"
-                    dealStock: "0"
+                    deal_money: "0"
+                    deal_stock: "0"
                     amount: "2.241379"
                     takerFee: "0.001"
                     makerFee: "0.001"
                     left: "2.241379"
-                    dealFee: "0"
+                    deal_fee: "0"
                     post_only: false
                     mtime: 1662478154.941582
                     price: "19928.79"
@@ -2558,19 +2558,19 @@ paths:
                     status: "FILLED"
                     stp: "no"
                   take_profit:
-                    orderId: 117703764515
-                    clientOrderId: ""
+                    order_id: 117703764515
+                    client_order_id: ""
                     market: "BTC_USDT"
                     side: "buy"
                     type: "limit"
                     timestamp: 1662478154.941582
-                    dealMoney: "0"
-                    dealStock: "0"
+                    deal_money: "0"
+                    deal_stock: "0"
                     amount: "0.635709"
                     takerFee: "0.001"
                     makerFee: "0.001"
                     left: "0.635709"
-                    dealFee: "0"
+                    deal_fee: "0"
                     post_only: false
                     mtime: 1662478154.941582
                     price: "9928.79"
@@ -2640,7 +2640,7 @@ paths:
                 stop_limit_price:
                   type: string
                   example: "42000"
-                clientOrderId:
+                client_order_id:
                   type: string
                   example: "order1987111"
                 request:
@@ -2656,7 +2656,7 @@ paths:
               price: "40000"
               activation_price: "41000"
               stop_limit_price: "42000"
-              clientOrderId: order1987111
+              client_order_id: order1987111
               request: "{{request}}"
               nonce: "{{nonce}}"
       responses:
@@ -2675,11 +2675,11 @@ paths:
                     type: object
                     description: Stop loss order details
                     properties:
-                      orderId:
+                      order_id:
                         type: integer
                         description: Order identifier
                         example: 117703764514
-                      clientOrderId:
+                      client_order_id:
                         type: string
                         description: Custom order identifier. Empty string if not specified
                         example: ""
@@ -2700,11 +2700,11 @@ paths:
                         type: number
                         description: Timestamp of order creation
                         example: 1594605801.49815
-                      dealMoney:
+                      deal_money:
                         type: string
                         description: Executed amount in money
                         example: "0"
-                      dealStock:
+                      deal_stock:
                         type: string
                         description: Executed amount in stock
                         example: "0"
@@ -2724,7 +2724,7 @@ paths:
                         type: string
                         description: Unexecuted amount in stock
                         example: "2.241379"
-                      dealFee:
+                      deal_fee:
                         type: string
                         description: Executed fee by deal
                         example: "0"
@@ -2771,11 +2771,11 @@ paths:
                     type: object
                     description: Take profit order details
                     properties:
-                      orderId:
+                      order_id:
                         type: integer
                         description: Order identifier
                         example: 117703764515
-                      clientOrderId:
+                      client_order_id:
                         type: string
                         description: Custom order identifier. Empty string if not specified
                         example: ""
@@ -2796,11 +2796,11 @@ paths:
                         type: number
                         description: Timestamp of order creation
                         example: 1662478154.941582
-                      dealMoney:
+                      deal_money:
                         type: string
                         description: Executed amount in money
                         example: "0"
-                      dealStock:
+                      deal_stock:
                         type: string
                         description: Executed amount in stock
                         example: "0"
@@ -2820,7 +2820,7 @@ paths:
                         type: string
                         description: Unexecuted amount in stock
                         example: "0.635709"
-                      dealFee:
+                      deal_fee:
                         type: string
                         description: Executed fee by deal
                         example: "0"
@@ -2853,19 +2853,19 @@ paths:
               example:
                 id: 117703764513
                 stop_loss:
-                  orderId: 117703764514
-                  clientOrderId: ""
+                  order_id: 117703764514
+                  client_order_id: ""
                   market: "BTC_USDT"
                   side: "buy"
                   type: "stop limit"
                   timestamp: 1594605801.49815
-                  dealMoney: "0"
-                  dealStock: "0"
+                  deal_money: "0"
+                  deal_stock: "0"
                   amount: "2.241379"
                   takerFee: "0.001"
                   makerFee: "0.001"
                   left: "2.241379"
-                  dealFee: "0"
+                  deal_fee: "0"
                   post_only: false
                   mtime: 1662478154.941582
                   price: "19928.79"
@@ -2876,19 +2876,19 @@ paths:
                   stp: "no"
                   positionSide: "LONG"
                 take_profit:
-                  orderId: 117703764515
-                  clientOrderId: ""
+                  order_id: 117703764515
+                  client_order_id: ""
                   market: "BTC_USDT"
                   side: "buy"
                   type: "limit"
                   timestamp: 1662478154.941582
-                  dealMoney: "0"
-                  dealStock: "0"
+                  deal_money: "0"
+                  deal_stock: "0"
                   amount: "0.635709"
                   takerFee: "0.001"
                   makerFee: "0.001"
                   left: "0.635709"
-                  dealFee: "0"
+                  deal_fee: "0"
                   post_only: false
                   mtime: 1662478154.941582
                   price: "9928.79"
@@ -2993,14 +2993,14 @@ paths:
               type: object
               required:
                 - market
-                - orderId
+                - order_id
                 - request
                 - nonce
               properties:
                 market:
                   type: string
                   example: "BTC_USDT"
-                orderId:
+                order_id:
                   type: integer
                   example: 117703764514
                 request:
@@ -3011,7 +3011,7 @@ paths:
                   example: "{{nonce}}"
             example:
               market: BTC_USDT
-              orderId: 117703764514
+              order_id: 117703764514
               request: "{{request}}"
               nonce: "{{nonce}}"
       responses:
@@ -3030,11 +3030,11 @@ paths:
                     type: object
                     description: Cancelled stop loss order details
                     properties:
-                      orderId:
+                      order_id:
                         type: integer
                         description: Order identifier
                         example: 117703764514
-                      clientOrderId:
+                      client_order_id:
                         type: string
                         description: Custom order identifier. Empty string if not specified
                         example: ""
@@ -3055,11 +3055,11 @@ paths:
                         type: number
                         description: Timestamp of order creation
                         example: 1594605801.49815
-                      dealMoney:
+                      deal_money:
                         type: string
                         description: Executed amount in money
                         example: "0"
-                      dealStock:
+                      deal_stock:
                         type: string
                         description: Executed amount in stock
                         example: "0"
@@ -3079,7 +3079,7 @@ paths:
                         type: string
                         description: Unexecuted amount in stock
                         example: "2.241379"
-                      dealFee:
+                      deal_fee:
                         type: string
                         description: Executed fee by deal
                         example: "0"
@@ -3120,11 +3120,11 @@ paths:
                     type: object
                     description: Cancelled take profit order details
                     properties:
-                      orderId:
+                      order_id:
                         type: integer
                         description: Order identifier
                         example: 117703764515
-                      clientOrderId:
+                      client_order_id:
                         type: string
                         description: Custom order identifier. Empty string if not specified
                         example: ""
@@ -3145,11 +3145,11 @@ paths:
                         type: number
                         description: Timestamp of order creation
                         example: 1662478154.941582
-                      dealMoney:
+                      deal_money:
                         type: string
                         description: Executed amount in money
                         example: "0"
-                      dealStock:
+                      deal_stock:
                         type: string
                         description: Executed amount in stock
                         example: "0"
@@ -3161,7 +3161,7 @@ paths:
                         type: string
                         description: Unexecuted amount in stock
                         example: "0.635709"
-                      dealFee:
+                      deal_fee:
                         type: string
                         description: Executed fee by deal
                         example: "0"
@@ -3188,19 +3188,19 @@ paths:
               example:
                 id: 117703764513
                 stop_loss:
-                  orderId: 117703764514
-                  clientOrderId: ""
+                  order_id: 117703764514
+                  client_order_id: ""
                   market: "BTC_USDT"
                   side: "buy"
                   type: "stop limit"
                   timestamp: 1594605801.49815
-                  dealMoney: "0"
-                  dealStock: "0"
+                  deal_money: "0"
+                  deal_stock: "0"
                   amount: "2.241379"
                   takerFee: "0.001"
                   makerFee: "0.001"
                   left: "2.241379"
-                  dealFee: "0"
+                  deal_fee: "0"
                   post_only: false
                   mtime: 1662478154.941582
                   price: "19928.79"
@@ -3210,17 +3210,17 @@ paths:
                   status: "CANCELED"
                   stp: "no"
                 take_profit:
-                  orderId: 117703764515
-                  clientOrderId: ""
+                  order_id: 117703764515
+                  client_order_id: ""
                   market: "BTC_USDT"
                   side: "buy"
                   type: "limit"
                   timestamp: 1662478154.941582
-                  dealMoney: "0"
-                  dealStock: "0"
+                  deal_money: "0"
+                  deal_stock: "0"
                   amount: "0.635709"
                   left: "0.635709"
-                  dealFee: "0"
+                  deal_fee: "0"
                   post_only: false
                   mtime: 1662478154.941582
                   price: "9928.79"
@@ -3725,71 +3725,6 @@ paths:
               schema:
                 $ref: '#/components/schemas/ErrorResponse'
 
-    get:
-      summary: Query All Market Fees
-      operationId: getAllMarketFees
-      description: |
-        Returns maker and taker fees for all markets, including assigned custom fees.
-
-        The `maker` and `taker` fields represent default spot trading fees.
-
-        The `futures_maker` and `futures_taker` fields represent effective futures fees. The effective futures fee equals the lower value between the assigned custom fee and the default market fee.
-
-        The `custom_fee` object contains market-specific custom spot fees.
-      tags:
-        - Market Fee
-      security:
-        - ApiKeyAuth: []
-      parameters: []
-      responses:
-        '200':
-          description: Successful response
-          content:
-            application/json:
-              schema:
-                type: object
-                x-fern-type-name: GetAllMarketFeesResponse
-                properties:
-                  error:
-                    type: string
-                    nullable: true
-                    example: null
-                  taker:
-                    type: string
-                    description: Default taker fee percentage
-                    example: "0.1"
-                  maker:
-                    type: string
-                    description: Default maker fee percentage
-                    example: "0.1"
-                  futures_taker:
-                    type: string
-                    description: "Futures taker fee rate (default or custom if assigned)"
-                    example: "0.0002"
-                  futures_maker:
-                    type: string
-                    description: "Futures maker fee rate (default or custom if assigned)"
-                    example: "0.0001"
-                  custom_fee:
-                    type: object
-                    description: Custom fees for specific markets
-                    additionalProperties:
-                      type: array
-                      items:
-                        type: string
-                      minItems: 2
-                      maxItems: 2
-                      description: "[maker fee, taker fee]"
-                    example:
-                      BTC_USDT: ["0.1", "0.2"]
-                      ETH_USDT: ["0.1", "0.2"]
-        '422':
-          description: Validation failed
-          content:
-            application/json:
-              schema:
-                $ref: '#/components/schemas/ErrorResponse'
-
   /api/v4/trade-account/balance:
     post:
       summary: Trading Balance
@@ -3912,7 +3847,7 @@ paths:
           - `31` - market validation failed
           - `32` - amount validation failed
           - `33` - price validation failed
-          - `36` - clientOrderId validation failed
+          - `36` - client_order_id validation failed
           - `37` - `ioc=true` cannot be used with `postOnly=true` or `rpi=true`
         
         
@@ -3998,7 +3933,7 @@ paths:
           "code": 36,
           "message": "Validation failed",
           "errors": {
-            "clientOrderId": ["ClientOrderId field should be a string."]
+            "client_order_id": ["ClientOrderId field should be a string."]
           }
         }
         ```
@@ -4008,7 +3943,7 @@ paths:
           "code": 36,
           "message": "Validation failed",
           "errors": {
-            "clientOrderId": [
+            "client_order_id": [
               "ClientOrderId field should contain only latin letters, numbers and dashes."
             ]
           }
@@ -4020,7 +3955,7 @@ paths:
           "code": 36,
           "message": "Validation failed",
           "errors": {
-            "clientOrderId": [
+            "client_order_id": [
               "This client order id is already used by the current account."
             ]
           }
@@ -4136,14 +4071,14 @@ paths:
           - RPI orders do not appear in public order book feeds (`depth`, `bookTicker`). RPI orders are visible only in private active orders and in the exchange UI order book (web/mobile).
           - RPI orders are post-only by design and cannot be used with the IOC flag. The API returns error code `37` when both `rpi=true` and `ioc=true` are used.
         
-
+        
         
         
           - `30` - default validation error code
           - `31` - market validation failed
           - `32` - amount validation failed
           - `33` - price validation failed
-          - `36` - clientOrderId validation failed
+          - `36` - client_order_id validation failed
           - `37` - `ioc=true` cannot be used with `postOnly=true` or `rpi=true`
         
         
@@ -4243,7 +4178,7 @@ paths:
                   market: BTC_USDT
                   postOnly: false
                   ioc: false
-                  clientOrderId: ""
+                  client_order_id: ""
                   rpi: true
                 - side: sell
                   amount: "0.0001"
@@ -4251,7 +4186,7 @@ paths:
                   market: BTC_USDT
                   postOnly: false
                   ioc: false
-                  clientOrderId: ""
+                  client_order_id: ""
                   rpi: true
                 - side: sell
                   amount: "0.02"
@@ -4259,7 +4194,7 @@ paths:
                   market: BTC_USDT
                   postOnly: false
                   ioc: false
-                  clientOrderId: ""
+                  client_order_id: ""
                   rpi: true
       responses:
         '200':
@@ -4294,7 +4229,7 @@ paths:
         - `30` - default validation error code
         - `31` - market validation failed
         - `32` - amount validation failed
-        - `36` - clientOrderId validation failed
+        - `36` - client_order_id validation failed
         
         
         
@@ -4378,7 +4313,7 @@ paths:
           "code": 36,
           "message": "Validation failed",
           "errors": {
-            "clientOrderId": ["ClientOrderId field should be a string."]
+            "client_order_id": ["ClientOrderId field should be a string."]
           }
         }
         ```
@@ -4388,7 +4323,7 @@ paths:
           "code": 36,
           "message": "Validation failed",
           "errors": {
-            "clientOrderId": [
+            "client_order_id": [
               "ClientOrderId field should contain only latin letters, numbers and dashes."
             ]
           }
@@ -4442,7 +4377,7 @@ paths:
         - `30` - default validation error code
         - `31` - market validation failed
         - `32` - amount validation failed
-        - `36` - clientOrderId validation failed
+        - `36` - client_order_id validation failed
         
         
         
@@ -4526,7 +4461,7 @@ paths:
           "code": 36,
           "message": "Validation failed",
           "errors": {
-            "clientOrderId": ["ClientOrderId field should be a string."]
+            "client_order_id": ["ClientOrderId field should be a string."]
           }
         }
         ```
@@ -4579,7 +4514,7 @@ paths:
         - `31` - market validation failed
         - `32` - amount validation failed
         - `33` - price validation failed
-        - `36` - clientOrderId validation failed
+        - `36` - client_order_id validation failed
         
         
         
@@ -4685,7 +4620,7 @@ paths:
           "code": 36,
           "message": "Validation failed",
           "errors": {
-            "clientOrderId": ["ClientOrderId field should be a string."]
+            "client_order_id": ["ClientOrderId field should be a string."]
           }
         }
         ```
@@ -4695,7 +4630,7 @@ paths:
           "code": 36,
           "message": "Validation failed",
           "errors": {
-            "clientOrderId": [
+            "client_order_id": [
               "ClientOrderId field should contain only latin letters, numbers and dashes."
             ]
           }
@@ -4749,7 +4684,7 @@ paths:
         - `30` - default validation error code
         - `31` - market validation failed
         - `32` - amount validation failed
-        - `36` - clientOrderId validation failed
+        - `36` - client_order_id validation failed
         
         
         
@@ -4834,7 +4769,7 @@ paths:
           "code": 36,
           "message": "Validation failed",
           "errors": {
-            "clientOrderId": ["ClientOrderId field should be a string."]
+            "client_order_id": ["ClientOrderId field should be a string."]
           }
         }
         ```
@@ -4844,7 +4779,7 @@ paths:
           "code": 36,
           "message": "Validation failed",
           "errors": {
-            "clientOrderId": [
+            "client_order_id": [
               "ClientOrderId field should contain only latin letters, numbers and dashes."
             ]
           }
@@ -4856,7 +4791,7 @@ paths:
           "code": 36,
           "message": "Validation failed",
           "errors": {
-            "clientOrderId": [
+            "client_order_id": [
               "This client order id is already used by the current account."
             ]
           }
@@ -4911,8 +4846,8 @@ paths:
         
         
         
-        - Modification by clientOrderId takes priority over orderId.
-        - The request supports working only with orderId or only with clientOrderId.
+        - Modification by client_order_id takes priority over order_id.
+        - The request supports working only with order_id or only with client_order_id.
         - Do not pass both values at the same time.
         
         
@@ -4928,7 +4863,7 @@ paths:
           "message": "Validation failed",
           "errors": {
             "market": ["Market field is required."],
-            "orderId": ["OrderId field is required."]
+            "order_id": ["OrderId field is required."]
           }
         }
         ```
@@ -4958,7 +4893,7 @@ paths:
           "code": 30,
           "message": "Validation failed",
           "errors": {
-            "orderId": ["OrderId field should be an integer."]
+            "order_id": ["OrderId field should be an integer."]
           }
         }
         ```
@@ -4981,7 +4916,7 @@ paths:
           "code": 2,
           "message": "Inner validation failed",
           "errors": {
-            "orderId": ["Unexecuted order was not found."]
+            "order_id": ["Unexecuted order was not found."]
           }
         }
         ```
@@ -5005,13 +4940,13 @@ paths:
                   type: string
                   description: "Available [market](/glossary#market). Example: BTC_USDT"
                   example: BTC_USDT
-                orderId:
+                order_id:
                   type: integer
-                  description: "Order Id. Example: 4180284841. Required if clientOrderId is not set."
+                  description: "Order Id. Example: 4180284841. Required if client_order_id is not set."
                   example: 123456
-                clientOrderId:
+                client_order_id:
                   type: string
-                  description: "Custom client order id. Example: 'customId11'. Required if orderId is not set."
+                  description: "Custom client order id. Example: 'customId11'. Required if order_id is not set."
                   example: "customId11"
                 request:
                   type: string
@@ -5155,7 +5090,7 @@ paths:
         
         
         
-        Search across all markets is available only if clientOrderId and orderId are not provided.
+        Search across all markets is available only if client_order_id and order_id are not provided.
         
         
         
@@ -5195,13 +5130,13 @@ paths:
                   type: string
                   description: "Available [market](/glossary#market). Example: BTC_USDT"
                   example: BTC_USDT
-                orderId:
+                order_id:
                   type: integer
-                  description: "Available orderId. Example: 3134995325"
+                  description: "Available order_id. Example: 3134995325"
                   example: 3134995325
-                clientOrderId:
+                client_order_id:
                   type: string
-                  description: "Available clientOrderId. Example: customId11"
+                  description: "Available client_order_id. Example: customId11"
                   example: "customId11"
                 offset:
                   type: integer
@@ -5296,7 +5231,7 @@ paths:
                   type: string
                   description: "Requested [market](/glossary#market). Example: BTC_USDT"
                   example: "BTC_USDT"
-                clientOrderId:
+                client_order_id:
                   type: string
                   description: "Filter by custom order identifier"
                   example: "customId11"
@@ -5330,55 +5265,52 @@ paths:
           content:
             application/json:
               schema:
-                type: object
-                additionalProperties:
-                  type: array
-                  items:
-                    type: object
-                    properties:
-                      id:
-                        type: integer
-                        description: "Deal ID"
-                      clientOrderId:
-                        type: string
-                        description: "Custom order ID (empty if not specified)"
-                      time:
-                        type: number
-                        description: "Timestamp of executed deal"
-                      side:
-                        type: string
-                        enum: [buy, sell]
-                      role:
-                        type: integer
-                        description: "1 - maker, 2 - taker"
-                      amount:
-                        type: string
-                        description: "Amount in stock currency"
-                      price:
-                        type: string
-                      deal:
-                        type: string
-                        description: "Amount in money currency"
-                      fee:
-                        type: string
-                        description: "Paid fee"
-                      orderId:
-                        type: integer
-                      feeAsset:
-                        type: string
+                type: array
+                items:
+                  type: object
+                  properties:
+                    id:
+                      type: integer
+                      description: "Deal ID"
+                    client_order_id:
+                      type: string
+                      description: "Custom order ID (empty if not specified)"
+                    time:
+                      type: number
+                      description: "Timestamp of executed deal"
+                    side:
+                      type: string
+                      enum: [buy, sell]
+                    role:
+                      type: integer
+                      description: "1 - maker, 2 - taker"
+                    amount:
+                      type: string
+                      description: "Amount in stock currency"
+                    price:
+                      type: string
+                    deal:
+                      type: string
+                      description: "Amount in money currency"
+                    fee:
+                      type: string
+                      description: "Paid fee"
+                    order_id:
+                      type: integer
+                    feeAsset:
+                      type: string
               example:
-                BTC_USDT:
-                  - id: 8846967538
-                    clientOrderId: "customId11"
-                    time: 1739310711.387599
-                    side: "buy"
-                    role: 2
-                    amount: "2.717"
-                    price: "3.3419"
-                    deal: "9.0799423"
-                    fee: "0.002717"
-                    orderId: 1164603916051
-                    feeAsset: "SUI"
+                - id: 8846967538
+                  client_order_id: "customId11"
+                  time: 1739310711.387599
+                  side: "buy"
+                  role: 2
+                  amount: "2.717"
+                  price: "3.3419"
+                  deal: "9.0799423"
+                  fee: "0.002717"
+                  order_id: 1164603916051
+                  feeAsset: "SUI"
         '400':
           description: Inner validation failed
           content:
@@ -5415,11 +5347,11 @@ paths:
             schema:
               type: object
               required:
-                - orderId
+                - order_id
                 - request
                 - nonce
               properties:
-                orderId:
+                order_id:
                   type: integer
                   example: 3134995325
                 offset:
@@ -5474,7 +5406,7 @@ paths:
                           type: integer
                           description: Completed order identifier
                           example: 3134995325
-                        clientOrderId:
+                        client_order_id:
                           type: string
                           description: Custom order identifier. Empty string if not specified
                           example: "customId11"
@@ -5511,7 +5443,7 @@ paths:
                     amount: "598"
                     id: 149156519
                     dealOrderId: 3134995325
-                    clientOrderId: "customId11"
+                    client_order_id: "customId11"
                     role: 2
                     deal: "0.00419198"
                     feeAsset: "USDT"
@@ -5600,7 +5532,7 @@ paths:
                         type: integer
                         description: Order identifier
                         example: 4986126152
-                      clientOrderId:
+                      client_order_id:
                         type: string
                         description: Custom order identifier. Empty string if not specified
                         example: "customId11"
@@ -5625,15 +5557,15 @@ paths:
                         type: string
                         description: Maker fee ratio. If the number less than 0.0001 - rounded to zero
                         example: "0.001"
-                      dealFee:
+                      deal_fee:
                         type: string
                         description: Paid fee when order is finished
                         example: "0.041258268"
-                      dealStock:
+                      deal_stock:
                         type: string
                         description: Amount in stock currency that finished
                         example: "0.0009"
-                      dealMoney:
+                      deal_money:
                         type: string
                         description: Amount in money currency that finished
                         example: "41.258268"
@@ -5667,15 +5599,15 @@ paths:
                     price: "40000"
                     type: "limit"
                     id: 4986126152
-                    clientOrderId: "customId11"
+                    client_order_id: "customId11"
                     side: "sell"
                     ctime: 1597486960.311311
                     takerFee: "0.001"
                     ftime: 1597486960.311332
                     makerFee: "0.001"
-                    dealFee: "0.041258268"
-                    dealStock: "0.0009"
-                    dealMoney: "41.258268"
+                    deal_fee: "0.041258268"
+                    deal_stock: "0.0009"
+                    deal_money: "41.258268"
                     postOnly: false
                     ioc: false
                     status: "CANCELED"
@@ -5714,8 +5646,8 @@ paths:
         
         
         - Use total parameter instead of amount for modify buy stop market order.
-        - Modification by clientOrderId takes priority.
-        - The request supports working only with orderId or only with clientOrderId.
+        - Modification by client_order_id takes priority.
+        - The request supports working only with order_id or only with client_order_id.
         - Do not pass both values at the same time.
         
         
@@ -5741,7 +5673,7 @@ paths:
           "code": 2,
           "message": "Inner validation failed",
           "errors": {
-            "orderId": ["Unexecuted order was not found."]
+            "order_id": ["Unexecuted order was not found."]
           }
         }
         ```
@@ -5771,13 +5703,13 @@ paths:
                 - request
                 - nonce
               properties:
-                orderId:
+                order_id:
                   type: integer
-                  description: "Active order id. Required if clientOrderId is not set."
+                  description: "Active order id. Required if client_order_id is not set."
                   example: 4180284841
-                clientOrderId:
+                client_order_id:
                   type: string
-                  description: "Identifier should be unique and contain letters, dashes, numbers, dots or underscores. Required if orderId is not set."
+                  description: "Identifier should be unique and contain letters, dashes, numbers, dots or underscores. Required if order_id is not set."
                   example: "order1987111"
                 market:
                   type: string
@@ -6104,7 +6036,7 @@ components:
           type: string
           description: "Price in money currency. Example: '9800' or 9800"
           example: "9800"
-        clientOrderId:
+        client_order_id:
           type: string
           description: "Identifier should be unique and contain letters, dashes, numbers, dots or underscores. The identifier must be unique."
           example: "order1987111"
@@ -6175,7 +6107,7 @@ components:
           type: string
           description: "Amount of [money](/glossary#money) currency to buy or amount in [stock](/glossary#stock) currency to sell. Example: '5 USDT' for buy (min total) and '0.001 BTC' for sell (min amount)."
           example: "100"
-        clientOrderId:
+        client_order_id:
           type: string
           description: "Identifier should be unique and contain letters, dashes, numbers, dots or underscores. The identifier must be unique."
           example: "order1987111"
@@ -6223,7 +6155,7 @@ components:
           type: string
           description: "Activation price in [money](/glossary#money) currency. Example: '10000' or 10000"
           example: "10000"
-        clientOrderId:
+        client_order_id:
           type: string
           description: "Identifier should be unique and contain letters, dashes, numbers, dots or underscores. The identifier must be unique."
           example: "order1987111"
@@ -6270,7 +6202,7 @@ components:
           type: string
           description: "Activation price in [money](/glossary#money) currency. Example: '10000' or 10000"
           example: "10000"
-        clientOrderId:
+        client_order_id:
           type: string
           description: "Identifier should be unique and contain letters, dashes, numbers, dots or underscores. The identifier must be unique."
           example: "order1987111"
@@ -6313,7 +6245,7 @@ components:
             IOC does not support `rpi=true` because RPI uses post-only behavior by design.
             The API returns error code `37` when an order item sets both `ioc=true` and `rpi=true`.
           example: false
-        clientOrderId:
+        client_order_id:
           type: string
           example: ""
         rpi:
@@ -6328,11 +6260,11 @@ components:
     OrderResponse:
       type: object
       properties:
-        orderId:
+        order_id:
           type: integer
           description: "Order ID"
           example: 4180284841
-        clientOrderId:
+        client_order_id:
           type: string
           description: "Custom client order ID; empty string if not specified"
           example: "order1987111"
@@ -6352,11 +6284,11 @@ components:
           type: number
           description: "Timestamp of order creation"
           example: 1595792396.165973
-        dealMoney:
+        deal_money:
           type: string
           description: "If order finished - amount in money currency that is finished"
           example: "0"
-        dealStock:
+        deal_stock:
           type: string
           description: "If order finished - amount in stock currency that is finished"
           example: "0"
@@ -6368,7 +6300,7 @@ components:
           type: string
           description: "If order not finished - rest of the amount that must be finished"
           example: "0.001"
-        dealFee:
+        deal_fee:
           type: string
           description: "Fee in money currency when order is filled"
           example: "0"
diff --git a/openapi/private/main_api_v4.yaml b/openapi/private/main_api_v4.yaml
index f49e3fe..69eaedd 100644
--- a/openapi/private/main_api_v4.yaml
+++ b/openapi/private/main_api_v4.yaml
@@ -409,7 +409,7 @@ paths:
                   type: string
                   description: Deposit amount
                   example: "100"
-                uniqueId:
+                unique_id:
                   type: string
                   description: Unique transaction identifier on client's side
                   example: "qw22"
@@ -508,7 +508,7 @@ paths:
                   ticker: "UAH"
                   provider: "VISAMASTER"
                   amount: "100"
-                  uniqueId: "{{generateID}}"
+                  unique_id: "{{generateID}}"
                   request: "{{request}}"
                   nonce: "{{nonce}}"
               withCustomer:
@@ -517,7 +517,7 @@ paths:
                   ticker: "UAH"
                   provider: "VISAMASTER"
                   amount: "100"
-                  uniqueId: "{{generateID}}"
+                  unique_id: "{{generateID}}"
                   customer:
                     firstName: "John"
                     lastName: "Doe"
@@ -827,7 +827,7 @@ paths:
                 - request
                 - nonce
               properties:
-                transactionId:
+                transaction_id:
                   type: string
                   format: uuid
                   description: |
@@ -849,7 +849,7 @@ paths:
                     A unique identifier for the request. Use a monotonically increasing value such as a Unix timestamp in milliseconds.
                   example: "{{nonce}}"
             example:
-              transactionId: "54bffeb7-7a8f-43f8-bcd8-f14ec10fee85"
+              transaction_id: "54bffeb7-7a8f-43f8-bcd8-f14ec10fee85"
               address: "0x1234567890abcdef1234567890abcdef12345678"
               request: "{{request}}"
               nonce: "{{nonce}}"
@@ -933,7 +933,7 @@ paths:
 
                     ⚠️ Required if currency is memoable.
                   example: "48565488244493"
-                uniqueId:
+                unique_id:
                   type: string
                   description: |
                     Unique transaction identifier.
@@ -1066,7 +1066,7 @@ paths:
                   ticker: "ETH"
                   amount: "0.9"
                   address: "0x0964A6B8F794A4B8d61b62652dB27ddC9844FB4c"
-                  uniqueId: "24529041"
+                  unique_id: "24529041"
                   request: "{{request}}"
                   nonce: "{{nonce}}"
               multiNetwork:
@@ -1075,7 +1075,7 @@ paths:
                   ticker: "USDT"
                   amount: "0.9"
                   address: "0x0964A6B8F794A4B8d61b62652dB27ddC9844FB4c"
-                  uniqueId: "24529042"
+                  unique_id: "24529042"
                   network: "ERC20"
                   request: "{{request}}"
                   nonce: "{{nonce}}"
@@ -1085,7 +1085,7 @@ paths:
                   ticker: "UAH"
                   amount: "100"
                   provider: "VISAMASTER"
-                  uniqueId: "24529043"
+                  unique_id: "24529043"
                   request: "{{request}}"
                   nonce: "{{nonce}}"
               fiatPartial:
@@ -1096,7 +1096,7 @@ paths:
                   address: "t6XIpyirkiLP+I++XHWfSeGrn5p38g=="
                   provider: "VISAMASTER_PAYCORE"
                   partialEnable: true
-                  uniqueId: "24529045"
+                  unique_id: "24529045"
                   request: "{{request}}"
                   nonce: "{{nonce}}"
               fiatIban:
@@ -1110,7 +1110,7 @@ paths:
                     lastName: "Lastname"
                     tin: 1000000000
                   provider: "UAH_IBAN"
-                  uniqueId: "24529045"
+                  unique_id: "24529045"
                   request: "{{request}}"
                   nonce: "{{nonce}}"
               fiatVisamaster:
@@ -1125,7 +1125,7 @@ paths:
                     phone: "1234567891"
                     email: "john_doe@email.com"
                   provider: "USD_VISAMASTER"
-                  uniqueId: "24529045"
+                  unique_id: "24529045"
                   request: "{{request}}"
                   nonce: "{{nonce}}"
               travelRuleIndividual:
@@ -1134,7 +1134,7 @@ paths:
                   ticker: "BTC"
                   amount: "0.5"
                   address: "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh"
-                  uniqueId: "24529046"
+                  unique_id: "24529046"
                   travelRule:
                     type: "individual"
                     vasp: "Binance"
@@ -1148,7 +1148,7 @@ paths:
                   ticker: "BTC"
                   amount: "1.2"
                   address: "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh"
-                  uniqueId: "24529047"
+                  unique_id: "24529047"
                   travelRule:
                     type: "entity"
                     vasp: "Kraken"
@@ -1194,14 +1194,14 @@ paths:
                       address: ["The address field is required."]
                       amount: ["The amount field is required."]
                       ticker: ["The ticker field is required."]
-                      uniqueId: ["The unique id field is required."]
+                      unique_id: ["The unique id field is required."]
                 duplicateUniqueId:
                   summary: Duplicate uniqueId
                   value:
                     code: 0
                     message: "Validation failed"
                     errors:
-                      uniqueId: ["The unique id has already been taken."]
+                      unique_id: ["The unique id has already been taken."]
                 unconfirmedUser:
                   summary: Unconfirmed user (without KYC)
                   value:
@@ -1315,7 +1315,7 @@ paths:
               ticker: ETH
               amount: "0.9"
               address: "0x0964A6B8F794A4B8d61b62652dB27ddC9844FB4c"
-              uniqueId: "24529041"
+              unique_id: "24529041"
               request: "{{request}}"
               nonce: "{{nonce}}"
       responses:
@@ -1356,14 +1356,14 @@ paths:
                       address: ["The address field is required."]
                       amount: ["The amount field is required."]
                       ticker: ["The ticker field is required."]
-                      uniqueId: ["The unique id field is required."]
+                      unique_id: ["The unique id field is required."]
                 duplicateUniqueId:
                   summary: Duplicate uniqueId
                   value:
                     code: 0
                     message: "Validation failed"
                     errors:
-                      uniqueId: ["The unique id has already been taken."]
+                      unique_id: ["The unique id has already been taken."]
                 unconfirmedUser:
                   summary: Unconfirmed user (without KYC)
                   value:
@@ -1656,7 +1656,7 @@ paths:
                   maxItems: 20
                   description: Can be used for filtering transactions by specific array of addresses.
                   example: ["3ApEASLcrQtZpg1TsssFgYF5V5YQJAKvuE"]
-                uniqueId:
+                unique_id:
                   type: string
                   description: Can be used for filtering transactions by specific unique id
                   example: "24529041"
@@ -1723,7 +1723,7 @@ paths:
                 offset: 0
                 records:
                   - address: "3ApEASLcrQtZpg1TsssFgYF5V5YQJAKvuE"
-                    uniqueId: null
+                    unique_id: null
                     createdAt: 1593437922
                     currency: "Bitcoin"
                     ticker: "BTC"
@@ -1735,7 +1735,7 @@ paths:
                     status: 15
                     network: null
                     transactionHash: "a275a514013e4e0f927fd0d1bed215e7f6f2c4c6ce762836fe135ec22529d886"
-                    transactionId: "5e112b38-9652-11ed-a1eb-0242ac120002"
+                    transaction_id: "5e112b38-9652-11ed-a1eb-0242ac120002"
                     details:
                       partial:
                         requestAmount: "50000"
@@ -3390,7 +3390,7 @@ paths:
                     investmentId: "inv_7e2d9c3b-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
                     currency: "USDT"
                     amount: "15.75"
-                    transactionId: "tx_9f3e0d4c-2b5c-4d3e-8f6g-7a8b9c0d1e2f"
+                    transaction_id: "tx_9f3e0d4c-2b5c-4d3e-8f6g-7a8b9c0d1e2f"
                     actionType: 1
                 limit: 50
                 offset: 0
@@ -3511,7 +3511,7 @@ paths:
                     investmentId: "inv_7e2d9c3b-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
                     currency: "USDT"
                     amount: "15.75"
-                    transactionId: "tx_9f3e0d4c-2b5c-4d3e-8f6g-7a8b9c0d1e2f"
+                    transaction_id: "tx_9f3e0d4c-2b5c-4d3e-8f6g-7a8b9c0d1e2f"
                     actionType: 4
                 limit: 50
                 offset: 0
@@ -3597,12 +3597,12 @@ paths:
                   data:
                     type: object
                     properties:
-                      transactionId:
+                      transaction_id:
                         type: string
                         description: Transaction ID for the investment
               example:
                 data:
-                  transactionId: "tx_9f3e0d4c-2b5c-4d3e-8f6g-7a8b9c0d1e2f"
+                  transaction_id: "tx_9f3e0d4c-2b5c-4d3e-8f6g-7a8b9c0d1e2f"
         "400":
           description: Validation failed
           content:
@@ -3695,12 +3695,12 @@ paths:
                   data:
                     type: object
                     properties:
-                      transactionId:
+                      transaction_id:
                         type: string
                         description: Transaction ID for the withdrawal
               example:
                 data:
-                  transactionId: "tx_9f3e0d4c-2b5c-4d3e-8f6g-7a8b9c0d1e2f"
+                  transaction_id: "tx_9f3e0d4c-2b5c-4d3e-8f6g-7a8b9c0d1e2f"
         "400":
           description: Validation failed
           content:
@@ -3784,12 +3784,12 @@ paths:
                   data:
                     type: object
                     properties:
-                      transactionId:
+                      transaction_id:
                         type: string
                         description: Transaction ID for the closure
               example:
                 data:
-                  transactionId: "tx_9f3e0d4c-2b5c-4d3e-8f6g-7a8b9c0d1e2f"
+                  transaction_id: "tx_9f3e0d4c-2b5c-4d3e-8f6g-7a8b9c0d1e2f"
         "400":
           description: Validation failed
           content:
@@ -4268,7 +4268,7 @@ paths:
               schema:
                 type: object
                 properties:
-                  transactionId:
+                  transaction_id:
                     type: string
                     description: External identifier of the transaction. Correlate transfer history responses using the transactionId value.
         "400":
@@ -4944,12 +4944,12 @@ paths:
         - Mining Pool
       summary: Get Rewards
       description: |
-        The endpoint returns rewards received from mining. Results are sorted in descending order by date (newest first).
+        The endpoint returns rewards received from mining.
 
         
         Rate limit: 1000 requests/10 sec.
         
-
+        
         
         The API does not cache the response.
         
@@ -5022,19 +5022,12 @@ paths:
         - Mining Pool
       summary: Get Mining Account Hashrate
       description: |
-        The endpoint returns the hashrate history of a mining pool account.
-
-        The maximum time window depends on the selected interval:
-        - `5m` — up to 3 days
-        - `1h` — up to 7 days
-        - `24h` — up to 30 days
-
-        When `from` is omitted, the endpoint returns the last 14 data points from the `to` timestamp.
+        The endpoint returns hashrate of mining pool account.
 
         
         Rate limit: 1000 requests/10 sec.
         
-
+        
         
         The API does not cache the response.
         
@@ -5054,17 +5047,17 @@ paths:
                   example: "miner123"
                 from:
                   type: integer
-                  description: Start Unix timestamp. When omitted, defaults to returning the last 14 data points from the `to` timestamp.
+                  description: Unix timestamp of starting point
                   example: 1640995200
                 to:
                   type: integer
-                  description: End Unix timestamp. Defaults to the current time when omitted.
+                  description: Unix timestamp of final point
                   example: 1641081600
                 interval:
                   type: string
                   enum: [5m, 1h, 24h]
                   default: 1h
-                  description: Time interval for data points.
+                  description: Timestamp interval
                   example: "1h"
       responses:
         "200":
@@ -5086,10 +5079,8 @@ paths:
                           properties:
                             timestamp:
                               type: integer
-                              description: Unix timestamp of the data point
                             hashrate:
                               type: string
-                              description: Hashrate value in H/s
         "422":
           description: Request validation failed
           content:
@@ -5111,7 +5102,7 @@ paths:
         - Mining Pool
       summary: Get Payout Destination
       description: |
-        The endpoint returns the current payout destination setting for a specific mining account.
+        Returns the current payout destination setting for a specific mining account belonging to the authenticated user.
 
         
         Rate limit: 1000 requests/10 sec.
@@ -5174,7 +5165,7 @@ paths:
         - Mining Pool
       summary: Set Payout Destination
       description: |
-        The endpoint updates the payout destination for a specific mining account. The destination can be set to the main balance or an external BTC address.
+        Updates the payout destination for a specific mining account belonging to the authenticated user. Can be set to main balance or an external BTC address.
 
         
         Rate limit: 1000 requests/10 sec.
@@ -5202,9 +5193,7 @@ paths:
                 address:
                   type: string
                   maxLength: 100
-                  description: |
-                    External BTC address. Required when `destination` is `external_address`. Supports all standard Bitcoin address formats (P2PKH, P2SH, and bech32).
-                    Omitting this field when `destination` is `external_address` returns: `{"code":0,"errors":{"name":["The address field is required."]},"message":"Validation failed"}`.
+                  description: External BTC address. Required when destination is external_address. Supports all standard Bitcoin address formats.
                   example: "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh"
       responses:
         "200":
@@ -5324,7 +5313,7 @@ paths:
         - Mining Pool
       summary: Worker Names
       description: |
-        The endpoint returns all online worker names for a specific mining account in a single response.
+        Returns a paginated list of online worker names for a specific mining account.
 
         
         Rate limit: 1000 requests/10 sec.
@@ -5344,6 +5333,20 @@ paths:
                   maxLength: 255
                   description: Mining pool account name
                   example: "my_miner_01"
+                offset:
+                  type: integer
+                  minimum: 0
+                  maximum: 10000
+                  default: 0
+                  description: Pagination offset
+                  example: 0
+                limit:
+                  type: integer
+                  minimum: 1
+                  maximum: 100
+                  default: 100
+                  description: Pagination limit
+                  example: 50
       responses:
         "200":
           description: Successful response
@@ -5359,10 +5362,15 @@ paths:
                         type: array
                         items:
                           type: string
-                        description: List of online worker names
+                  limit:
+                    type: integer
+                  offset:
+                    type: integer
               example:
                 data:
                   workers: ["worker_001", "worker_002", "worker_003"]
+                limit: 50
+                offset: 0
         "400":
           description: Validation failed
           content:
@@ -5388,12 +5396,7 @@ paths:
         - Mining Pool
       summary: Worker Hashrate History
       description: |
-        The endpoint returns hashrate performance history for a specific worker on a mining account.
-
-        The maximum time window depends on the selected interval:
-        - `5m` — up to 3 days
-        - `1h` — up to 7 days
-        - `24h` — up to 14 days
+        Returns hashrate performance history for a specific worker on a mining account.
 
         
         Rate limit: 1000 requests/10 sec.
@@ -5453,7 +5456,7 @@ paths:
                               type: integer
                             hashrate:
                               type: string
-                              description: Hashrate value in H/s
+                              description: Hashrate in TH/s
               example:
                 data:
                   hashrates:
@@ -5486,9 +5489,7 @@ paths:
         - Mining Pool
       summary: Create Watcher Link
       description: |
-        The endpoint creates a new watcher link for one or more mining accounts, granting specific permissions with a configurable expiration.
-
-        A maximum of 3 watcher links are allowed per account.
+        Creates a new watcher link for one or more mining accounts, granting specific permissions with a configurable expiration.
 
         
         Rate limit: 1000 requests/10 sec.
@@ -5518,9 +5519,7 @@ paths:
                   type: string
                   maxLength: 255
                   pattern: '^[a-zA-Z0-9_]+$'
-                  description: |
-                    Link name. Accepts alphanumeric characters and underscores only (`^[a-zA-Z0-9_]+$`).
-                    An invalid format returns: `{"code":0,"errors":{"name":["The name format is invalid."]},"message":"Validation failed"}`.
+                  description: Link name (alphanumeric and underscores only)
                   example: "monitoring_link"
                 permissions:
                   type: array
@@ -5802,10 +5801,6 @@ paths:
                         createdAt:
                           type: integer
                           description: Account creation timestamp (Unix time)
-                  limit:  
-                    type: integer
-                  offset:
-                    type: integer
               example:
                 data:
                   - name: "my_miner_01"
@@ -5974,7 +5969,7 @@ components:
           type: string
           description: "Required if currency is memoable. See [memo](/glossary#memodestination-tag) for details."
           example: "48565488244493"
-        uniqueId:
+        unique_id:
           type: string
           description: "Unique transaction identifier. ⚠️ Generate a new unique ID for each withdrawal request."
           example: "24529041"
@@ -6012,7 +6007,7 @@ components:
           type: string
           description: Deposit/Withdraw address
           example: "3ApEASLcrQtZpg1TsssFgYF5V5YQJAKvuE"
-        uniqueId:
+        unique_id:
           type: string
           nullable: true
           description: Unique Id of deposit/withdraw
@@ -6062,7 +6057,7 @@ components:
           type: string
           description: Deposit/Withdraw transaction hash
           example: "3b49d7b8cf7a4d3c1234567890abcdef"
-        transactionId:
+        transaction_id:
           type: string
           description: Transaction ID
           example: "tx-id-1234"
@@ -6326,7 +6321,7 @@ components:
           type: string
           description: "Transaction amount"
           example: "100"
-        transactionId:
+        transaction_id:
           type: string
           description: "Transaction identifier"
           example: "tx_123456"
@@ -6347,13 +6342,13 @@ components:
           description: "Currency name"
           example: "Ethereum"
         can_deposit:
-          type: string
+          type: boolean
           description: "Deposit status (currency availability)"
-          example: "1"
+          example: true
         can_withdraw:
-          type: string
+          type: boolean
           description: "Withdrawal status (currency availability)"
-          example: "1"
+          example: true
         deposit:
           type: object
           description: "Deposit fees and limits"
@@ -6466,7 +6461,7 @@ components:
     SubAccountTransfer:
       type: object
       properties:
-        transactionId:
+        transaction_id:
           type: string
           description: "Transaction identifier. Same value as id. Correlate with the transfer endpoint response using the transactionId field."
           example: "tx-abc123"
@@ -6596,16 +6591,6 @@ components:
           type: string
           description: "Mining account name"
           example: "miner123"
-        payoutDestination:
-          type: string
-          enum: [main_balance, external_address]
-          description: "Payout destination"
-          example: "external_address"
-        payoutTransactionHash:
-          type: string
-          nullable: true
-          description: "Payout transaction hash. null in case payout destination is main_balance, blockchain transaction hash in case payout destination is external_address"
-          example: "0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098"
         totalReward:
           type: string
           description: "Total reward amount"
@@ -6614,10 +6599,6 @@ components:
           type: string
           description: "Reward amount (without fee)"
           example: "0.001"
-        rewardCurrency:
-          type: string
-          description: "Reward currency"
-          example: "BTC"
         fee:
           type: string
           description: "Fee amount"
@@ -6628,8 +6609,8 @@ components:
           example: "0.000125"
         hashRate:
           type: string
-          description: "Hash rate (H/s)"
-          example: "100"
+          description: "Hash rate"
+          example: "100TH/s"
         date:
           type: integer
           description: "Reward date timestamp"
diff --git a/openapi/public/http-v4.yaml b/openapi/public/http-v4.yaml
index c821cd2..5ed05cd 100644
--- a/openapi/public/http-v4.yaml
+++ b/openapi/public/http-v4.yaml
@@ -34,11 +34,14 @@ paths:
             application/json:
               schema:
                 type: object
+                required:
+                  - status
                 properties:
                   status:
-                    type: integer
-                    description: "1 - system operational, 0 - system maintenance"
-                    example: 1
+                    type: string
+                    description: "system operational or system maintenance"
+                    enum: ["system operational", "system maintenance"]
+                    example: "system operational"
 
   /api/v4/public/markets:
     get:
@@ -66,6 +69,19 @@ paths:
                 type: array
                 items:
                   type: object
+                  required:
+                    - name
+                    - stock
+                    - money
+                    - stockPrec
+                    - moneyPrec
+                    - feePrec
+                    - makerFee
+                    - takerFee
+                    - minAmount
+                    - minTotal
+                    - tradesEnabled
+                    - type
                   properties:
                     name:
                       type: string
@@ -177,7 +193,7 @@ paths:
                       type: string
                       description: Volume in base currency
                       example: "4723.286463"
-                    isFrozen:
+                    is_frozen:
                       type: boolean
                       description: Indicates whether trading is disabled
                       example: false
@@ -192,7 +208,7 @@ paths:
                   last_price: "9164.09"
                   quote_volume: "43341942.90416876"
                   base_volume: "4723.286463"
-                  isFrozen: false
+                  is_frozen: false
                   change: "0.57"
         'default':
           description: Error response
@@ -437,6 +453,13 @@ paths:
                 type: array
                 items:
                   type: object
+                  required:
+                    - tradeID
+                    - price
+                    - quote_volume
+                    - base_volume
+                    - trade_timestamp
+                    - type
                   properties:
                     tradeID:
                       type: integer
@@ -599,11 +622,17 @@ paths:
           content:
             application/json:
               schema:
-                type: array
-                items:
-                  type: string
-                  description: Market pair name
-                example: ["ADA_USDT", "BCH_USDT", "BTC_USDT", "DOGE_USDT"]
+                type: object
+                properties:
+                  message:
+                    type: string
+                    nullable: true
+                    example: null
+                  result:
+                    type: array
+                    items:
+                      type: string
+                    example: ["ADA_USDT", "BCH_USDT", "BTC_USDT", "DOGE_USDT"]
 
   /api/v4/public/futures:
     get:
@@ -734,6 +763,12 @@ paths:
                 type: array
                 items:
                   type: object
+                  required:
+                    - fundingTime
+                    - fundingRate
+                    - market
+                    - settlementPrice
+                    - rateCalculatedTime
                   properties:
                     fundingTime:
                       type: string
@@ -762,7 +797,7 @@ paths:
       description: |
         The endpoint returns overall information about the current mining pool state.
 
-        Hash rate is expressed in H/s.
+        Hash rate is expressed in H units.
 
         
         Rate limit 1000 requests/10 sec.
@@ -781,7 +816,7 @@ paths:
                   data:
                     type: object
                     properties:
-                      connectionLinks:
+                      connection_links:
                         type: array
                         items:
                           type: string
@@ -794,7 +829,7 @@ paths:
                         items:
                           type: string
                         example: ["BTC"]
-                      rewardSchemes:
+                      reward_schemes:
                         type: array
                         items:
                           type: string
@@ -802,11 +837,10 @@ paths:
                       workers:
                         type: integer
                         example: 1846
-                      currentHashRate:
+                      current_hash_rate:
                         type: string
-                        description: Current pool hash rate in H/s
                         example: "39353570.8006319183174839"
-                      last7daysHashRate:
+                      last7days_hash_rate:
                         type: array
                         items:
                           type: object
@@ -816,17 +850,16 @@ paths:
                               example: 1732579200
                             hashrate:
                               type: string
-                              description: Hash rate value in H/s
                               example: "184425100325925.9259259259259259"
                       blocks:
                         type: array
                         items:
                           type: object
                           properties:
-                            blockFoundAt:
+                            block_found_at:
                               type: integer
                               example: 1715339355
-                            blockHeight:
+                            block_height:
                               type: integer
                               example: 18329
 

From df2aaf36a9a647ff5a7f6ae8f657c2c164d3f95c Mon Sep 17 00:00:00 2001
From: whitebit-robot 
Date: Fri, 20 Mar 2026 18:02:55 +0100
Subject: [PATCH 61/84] docs(api): add kline, fix positions endpoint, remove
 cancel OCO/OTO pages, add nav links
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

- Add GET /api/v1/public/kline (Market Data) — new MDX page and nav entry
- Fix collateral open positions endpoint path: /positions → /positions/open
  in openapi/private/http-trade-v4.yaml and open-positions.mdx
- Remove cancel-oco-order and cancel-oto-order pages, nav entries, and
  legacy redirects — endpoints no longer documented
- Add \"We are hiring\" and GitHub (type: github) links to navbar
- Add github social to footer socials
---
 .../collateral-trading/cancel-oco-order.mdx   |  4 ---
 .../collateral-trading/cancel-oto-order.mdx   |  4 ---
 .../collateral-trading/open-positions.mdx     |  2 +-
 api-reference/collateral-trading/overview.mdx |  8 +-----
 api-reference/market-data/kline.mdx           |  4 +++
 docs.json                                     | 26 +++++++++----------
 openapi/private/http-trade-v4.yaml            |  2 +-
 7 files changed, 20 insertions(+), 30 deletions(-)
 delete mode 100644 api-reference/collateral-trading/cancel-oco-order.mdx
 delete mode 100644 api-reference/collateral-trading/cancel-oto-order.mdx
 create mode 100644 api-reference/market-data/kline.mdx

diff --git a/api-reference/collateral-trading/cancel-oco-order.mdx b/api-reference/collateral-trading/cancel-oco-order.mdx
deleted file mode 100644
index 6559d70..0000000
--- a/api-reference/collateral-trading/cancel-oco-order.mdx
+++ /dev/null
@@ -1,4 +0,0 @@
----
-title: "Cancel OCO order"
-openapi: "/openapi/private/http-trade-v4.yaml POST /api/v4/order/oco-cancel"
----
diff --git a/api-reference/collateral-trading/cancel-oto-order.mdx b/api-reference/collateral-trading/cancel-oto-order.mdx
deleted file mode 100644
index 5cbcd06..0000000
--- a/api-reference/collateral-trading/cancel-oto-order.mdx
+++ /dev/null
@@ -1,4 +0,0 @@
----
-title: "Cancel OTO order"
-openapi: "/openapi/private/http-trade-v4.yaml POST /api/v4/order/oto-cancel"
----
diff --git a/api-reference/collateral-trading/open-positions.mdx b/api-reference/collateral-trading/open-positions.mdx
index 4a00003..a67804e 100644
--- a/api-reference/collateral-trading/open-positions.mdx
+++ b/api-reference/collateral-trading/open-positions.mdx
@@ -1,4 +1,4 @@
 ---
 title: "Open Positions"
-openapi: "/openapi/private/http-trade-v4.yaml POST /api/v4/collateral-account/positions"
+openapi: "/openapi/private/http-trade-v4.yaml POST /api/v4/collateral-account/positions/open"
 ---
diff --git a/api-reference/collateral-trading/overview.mdx b/api-reference/collateral-trading/overview.mdx
index 2ddf699..12cd98b 100644
--- a/api-reference/collateral-trading/overview.mdx
+++ b/api-reference/collateral-trading/overview.mdx
@@ -4,7 +4,7 @@ sidebarTitle: "Overview"
 description: "Overview of collateral (margin) trading endpoints for managing positions, leverage, and collateral orders."
 ---
 
-Collateral trading enables leveraged trading using margin. Manage the collateral account balance, place various order types (limit, market, stop-limit, OCO, OTO), query open orders, and manage positions.
+Collateral trading enables leveraged trading using margin. Manage the collateral account balance, place various order types (limit, market, stop-limit, OCO), query open orders, and manage positions.
 
 For general API conventions (base URL, error format, rate limits), see the [API Reference Overview](/api-reference/overview).
 
@@ -56,15 +56,9 @@ For general API conventions (base URL, error format, rate limits), see the [API
   
     Create OCO (One-Cancels-Other) order
   
-  
-    Cancel an OCO order
-  
   
     Cancel a conditional order
   
-  
-    Cancel an OTO (One-Triggers-Other) order
-  
 
 
 ---
diff --git a/api-reference/market-data/kline.mdx b/api-reference/market-data/kline.mdx
new file mode 100644
index 0000000..4d21c2d
--- /dev/null
+++ b/api-reference/market-data/kline.mdx
@@ -0,0 +1,4 @@
+---
+title: "Kline"
+openapi: "/openapi/public/http-v1.yaml GET /api/v1/public/kline"
+---
diff --git a/docs.json b/docs.json
index e38e111..c4dbc21 100644
--- a/docs.json
+++ b/docs.json
@@ -131,7 +131,8 @@
                 "pages": [
                   "api-reference/market-data/orderbook",
                   "api-reference/market-data/depth",
-                  "api-reference/market-data/recent-trades"
+                  "api-reference/market-data/recent-trades",
+                  "api-reference/market-data/kline"
                 ]
               },
               {
@@ -213,9 +214,7 @@
                   "api-reference/collateral-trading/collateral-stop-limit-order",
                   "api-reference/collateral-trading/collateral-trigger-market-order",
                   "api-reference/collateral-trading/create-collateral-oco-order",
-                  "api-reference/collateral-trading/cancel-oco-order",
-                  "api-reference/collateral-trading/cancel-conditional-order",
-                  "api-reference/collateral-trading/cancel-oto-order"
+                  "api-reference/collateral-trading/cancel-conditional-order"
                 ]
               },
               {
@@ -441,6 +440,14 @@
       {
         "label": "Sign Up",
         "href": "https://whitebit.com/auth"
+      },
+      {
+        "label": "We are hiring",
+        "href": "https://whitebit.com/m/careers?utm_source=whitebit-docs"
+      },
+      {
+        "type": "github",
+        "href": "https://github.com/whitebit-exchange"
       }
     ],
     "primary": {
@@ -470,7 +477,8 @@
       "telegram": "https://t.me/+gAjmDlP09nFjMDYy",
       "instagram": "https://www.instagram.com/whitebit",
       "discord": "https://discord.com/invite/DuNSzgf6bU",
-      "youtube": "https://www.youtube.com/channel/UCPtyKYMGGJKXAHOLKqGJyAQ"
+      "youtube": "https://www.youtube.com/channel/UCPtyKYMGGJKXAHOLKqGJyAQ",
+      "github": "https://github.com/whitebit-exchange"
     }
   },
   "redirects": [
@@ -682,18 +690,10 @@
       "source": "/private/http-trade-v4/cancel-conditional-order",
       "destination": "/api-reference/collateral-trading/cancel-conditional-order"
     },
-    {
-      "source": "/private/http-trade-v4/cancel-oco-order",
-      "destination": "/api-reference/collateral-trading/cancel-oco-order"
-    },
     {
       "source": "/private/http-trade-v4/cancel-order",
       "destination": "/api-reference/spot-trading/cancel-order"
     },
-    {
-      "source": "/private/http-trade-v4/cancel-oto-order",
-      "destination": "/api-reference/collateral-trading/cancel-oto-order"
-    },
     {
       "source": "/private/http-trade-v4/change-collateral-account-leverage",
       "destination": "/api-reference/collateral-trading/change-collateral-account-leverage"
diff --git a/openapi/private/http-trade-v4.yaml b/openapi/private/http-trade-v4.yaml
index c59cbd5..bed691a 100644
--- a/openapi/private/http-trade-v4.yaml
+++ b/openapi/private/http-trade-v4.yaml
@@ -1417,7 +1417,7 @@ paths:
         '503':
           description: Service temporarily unavailable
 
-  /api/v4/collateral-account/positions:
+  /api/v4/collateral-account/positions/open:
     post:
       summary: Open Positions
       operationId: getOpenPositions

From 12dac172a4047c96b2185cdd910028c5b9c2a5cc Mon Sep 17 00:00:00 2001
From: whitebit-robot 
Date: Fri, 20 Mar 2026 18:04:44 +0100
Subject: [PATCH 62/84] Fix transaction id field name

---
 openapi/private/main_api_v4.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/openapi/private/main_api_v4.yaml b/openapi/private/main_api_v4.yaml
index 69eaedd..2bcae5b 100644
--- a/openapi/private/main_api_v4.yaml
+++ b/openapi/private/main_api_v4.yaml
@@ -6463,7 +6463,7 @@ components:
       properties:
         transaction_id:
           type: string
-          description: "Transaction identifier. Same value as id. Correlate with the transfer endpoint response using the transactionId field."
+          description: "Transaction identifier. Same value as id. Correlate with the transfer endpoint response using the transaction_id field."
           example: "tx-abc123"
         id:
           type: string

From d499d74d6d61a869dbbace25e4f9d8974e26e7f6 Mon Sep 17 00:00:00 2001
From: whitebit-robot 
Date: Fri, 20 Mar 2026 18:05:27 +0100
Subject: [PATCH 63/84] Fix unique id field name

---
 openapi/private/main_api_v4.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/openapi/private/main_api_v4.yaml b/openapi/private/main_api_v4.yaml
index 2bcae5b..bdd7738 100644
--- a/openapi/private/main_api_v4.yaml
+++ b/openapi/private/main_api_v4.yaml
@@ -393,7 +393,7 @@ paths:
                 - ticker
                 - provider
                 - amount
-                - uniqueId
+                - unique_id
                 - request
                 - nonce
               properties:

From e7a4dcef562d5f6eaaa6bd34a870bcd73e282ac6 Mon Sep 17 00:00:00 2001
From: whitebit-robot 
Date: Fri, 20 Mar 2026 18:05:45 +0100
Subject: [PATCH 64/84] Fix unique id field name

---
 openapi/private/main_api_v4.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/openapi/private/main_api_v4.yaml b/openapi/private/main_api_v4.yaml
index bdd7738..d5e473b 100644
--- a/openapi/private/main_api_v4.yaml
+++ b/openapi/private/main_api_v4.yaml
@@ -5949,7 +5949,7 @@ components:
         - ticker
         - amount
         - address
-        - uniqueId
+        - unique_id
         - request
         - nonce
       properties:

From 01560c8204b0c61e4725ae825fcf76418825fade Mon Sep 17 00:00:00 2001
From: whitebit-robot 
Date: Fri, 20 Mar 2026 18:06:10 +0100
Subject: [PATCH 65/84] Fix transaction id field name

---
 openapi/private/main_api_v4.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/openapi/private/main_api_v4.yaml b/openapi/private/main_api_v4.yaml
index d5e473b..00eae42 100644
--- a/openapi/private/main_api_v4.yaml
+++ b/openapi/private/main_api_v4.yaml
@@ -4270,7 +4270,7 @@ paths:
                 properties:
                   transaction_id:
                     type: string
-                    description: External identifier of the transaction. Correlate transfer history responses using the transactionId value.
+                    description: External identifier of the transaction. Correlate transfer history responses using the `transaction_id` value.
         "400":
           description: Request validation failed
           content:

From 98ef5bc67c53cd0978f63d010a3b7d2bf55c6eda Mon Sep 17 00:00:00 2001
From: whitebit-robot 
Date: Fri, 20 Mar 2026 18:06:29 +0100
Subject: [PATCH 66/84] Fix transaction id field name

---
 openapi/private/main_api_v4.yaml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/openapi/private/main_api_v4.yaml b/openapi/private/main_api_v4.yaml
index 00eae42..41e9842 100644
--- a/openapi/private/main_api_v4.yaml
+++ b/openapi/private/main_api_v4.yaml
@@ -779,7 +779,7 @@ paths:
 
         The system processes refunds only for deposits with status `canceled`.
 
-        Obtain `transactionId` from the `deposit.canceled` webhook (`uniqueId`) or from the deposit/withdraw history in the WhiteBIT interface after support confirms refund availability.
+        Obtain `transaction_id` from the `deposit.canceled` webhook (`uniqueId`) or from the deposit/withdraw history in the WhiteBIT interface after support confirms refund availability.
 
         The refund address must support the same network and asset as the original deposit. The refund address must not be a WhiteBIT address. The refund address can differ from the original deposit sender address.
 
@@ -796,7 +796,7 @@ paths:
           "code": 0,
           "message": "Validation failed",
           "errors": {
-            "transactionId": ["The transaction id field is required."],
+            "transaction_id": ["The transaction id field is required."],
             "address": ["The address field is required."]
           }
         }
@@ -822,7 +822,7 @@ paths:
             schema:
               type: object
               required:
-                - transactionId
+                - transaction_id
                 - address
                 - request
                 - nonce

From fe2ef85d5d9dcac8ee44082d3f47a8afc58a8388 Mon Sep 17 00:00:00 2001
From: whitebit-robot 
Date: Fri, 20 Mar 2026 18:06:45 +0100
Subject: [PATCH 67/84] Fix unique id field name

---
 openapi/private/main_api_v4.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/openapi/private/main_api_v4.yaml b/openapi/private/main_api_v4.yaml
index 41e9842..74a637e 100644
--- a/openapi/private/main_api_v4.yaml
+++ b/openapi/private/main_api_v4.yaml
@@ -906,7 +906,7 @@ paths:
                 - ticker
                 - amount
                 - address
-                - uniqueId
+                - unique_id
                 - request
                 - nonce
               properties:

From dd6f32066cc63ee51582a63157c7acf9cb7f6f99 Mon Sep 17 00:00:00 2001
From: whitebit-robot 
Date: Sun, 22 Mar 2026 12:49:12 +0100
Subject: [PATCH 68/84] ocs(ai-hub): add AI Hub section with MCP server, CLI,
 and FAQ pages
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

- Add guides/mcp-server.mdx — full setup guide for the whitebit-mcp
  trading server (115 tools); covers Claude Code, Cursor, Claude Desktop,
  Codex, and OpenClaw client configuration
- Add guides/cli.mdx — CLI reference with commands, authentication,
  examples, and coming-soon install notice (source only for now)
- Add guides/ai-faq.mdx — FAQ covering API key safety, supported clients,
  trading vs docs MCP disambiguation, automation, and safe account practices
- Revamp guides/use-with-ai.mdx — full hub page with 4-card grid,
  feature breakdown by category, and supported AI clients table
- Rename guides/ai-ide-setup.mdx → "Docs search via MCP"; add icon
- Rename guides/ai-context-menu.mdx → "Docs page AI menu"; add icon
- Update docs.json — rename group to "AI Hub", add 3 new pages to nav
---
 docs.json                  |   5 +-
 guides/ai-context-menu.mdx |  13 +-
 guides/ai-faq.mdx          | 104 ++++++++++++++++
 guides/ai-ide-setup.mdx    |  11 +-
 guides/cli.mdx             | 223 +++++++++++++++++++++++++++++++++++
 guides/mcp-server.mdx      | 235 +++++++++++++++++++++++++++++++++++++
 guides/use-with-ai.mdx     |  94 ++++++++++++---
 7 files changed, 661 insertions(+), 24 deletions(-)
 create mode 100644 guides/ai-faq.mdx
 create mode 100644 guides/cli.mdx
 create mode 100644 guides/mcp-server.mdx

diff --git a/docs.json b/docs.json
index c4dbc21..d1a82b7 100644
--- a/docs.json
+++ b/docs.json
@@ -72,10 +72,13 @@
             ]
           },
           {
-            "group": "AI Tools",
+            "group": "AI Hub",
             "icon": "sparkles",
             "pages": [
               "guides/use-with-ai",
+              "guides/mcp-server",
+              "guides/cli",
+              "guides/ai-faq",
               "guides/ai-context-menu",
               "guides/ai-ide-setup"
             ]
diff --git a/guides/ai-context-menu.mdx b/guides/ai-context-menu.mdx
index 3f02c92..706b672 100644
--- a/guides/ai-context-menu.mdx
+++ b/guides/ai-context-menu.mdx
@@ -1,7 +1,8 @@
 ---
-title: "Contextual AI menu"
-sidebarTitle: "Contextual AI menu"
+title: "Docs page AI menu"
+sidebarTitle: "Docs page AI menu"
 description: "All options in the Copy page dropdown on every WhiteBIT documentation page — copy for AI, open in AI chat tools, and one-click IDE connections."
+icon: "comment"
 ---
 
 Access AI-optimized content and AI tool integrations via the **Copy page** dropdown on any WhiteBIT documentation page.
@@ -47,7 +48,7 @@ The contextual menu includes one-click options to connect a development environm
 | Connect to Cursor | Opens Cursor with the WhiteBIT MCP server pre-configured |
 | Connect to VS Code | Opens VS Code with the WhiteBIT MCP server pre-configured |
 
-For manual configuration steps in Cursor, VS Code, and Claude Desktop, see the [IDE and AI client setup](/guides/ai-ide-setup) guide.
+For manual configuration steps in Cursor, VS Code, and Claude Desktop, see the [Docs search via MCP](/guides/ai-ide-setup) guide.
 
 ## Full documentation context
 
@@ -85,7 +86,7 @@ The following URLs provide the complete WhiteBIT documentation in AI-optimized f
 1. Navigate to any WhiteBIT documentation page.
 2. Select the **Copy page** dropdown next to the document title.
 3. Select **Connect to Cursor** or **Connect to VS Code**.
-4. For manual configuration or Claude Desktop setup, see [IDE and AI client setup via MCP](/guides/ai-ide-setup).
+4. For manual configuration or Claude Desktop setup, see [Docs search via MCP via MCP](/guides/ai-ide-setup).
 
 ## Best practices
 
@@ -99,11 +100,11 @@ Include relevant details when asking AI questions:
 **Combine approaches**
 
 - Use the contextual menu for quick, page-specific questions and one-off tasks.
-- Use the [IDE and AI client setup](/guides/ai-ide-setup) for ongoing development with full documentation search.
+- Use the [Docs search via MCP](/guides/ai-ide-setup) for ongoing development with full documentation search.
 - Both approaches work together for optimal AI assistance.
 
 ## What's next
 
-- [IDE and AI client setup via MCP](/guides/ai-ide-setup) — Manual configuration for Cursor, VS Code, and Claude Desktop
+- [Docs search via MCP via MCP](/guides/ai-ide-setup) — Manual configuration for Cursor, VS Code, and Claude Desktop
 - [API Reference Overview](/api-reference/overview) — Base URL, quickstart examples, and endpoint groups
 - [WebSocket Overview](/websocket/overview) — Connection details, quickstart, and channel index
diff --git a/guides/ai-faq.mdx b/guides/ai-faq.mdx
new file mode 100644
index 0000000..5ca49e7
--- /dev/null
+++ b/guides/ai-faq.mdx
@@ -0,0 +1,104 @@
+---
+title: "AI tools FAQ"
+sidebarTitle: "FAQ"
+description: "Common questions about the WhiteBIT MCP server and CLI — API key safety, supported clients, account setup, and automation."
+icon: "circle-question"
+---
+
+Answers to common questions about the WhiteBIT MCP server and CLI.
+
+## MCP server and CLI capabilities
+
+The MCP server provides 115 tools covering market data, spot trading, collateral trading, wallet operations, lending, sub-accounts, mining pool, and currency conversion. All tools are available to any connected AI client using natural language.
+
+The CLI provides 110+ commands covering the same API surface, designed for terminal use, scripting, and CI/CD pipelines.
+
+See [MCP server](/guides/mcp-server) and [CLI](/guides/cli) for the full tool and command listings.
+
+## Supported AI clients
+
+The MCP server works with any client that supports the Model Context Protocol. Supported clients include:
+
+- **Claude Code** — global or project-scoped registration via `claude mcp add`
+- **Cursor** — configuration via `~/.cursor/mcp.json`
+- **Claude Desktop** — configuration via the application config file
+- **Codex** — configuration via `~/.codex/config.toml`
+- **OpenClaw** — configuration via the agent config file
+
+See [MCP server — Connect an AI client](/guides/mcp-server#connect-an-ai-client) for setup instructions for each client.
+
+## API key security
+
+API keys are passed as parameters in each tool call and are used only to sign outgoing WhiteBIT API requests. The MCP server does not store, log, or cache credentials. All processing happens locally — no data is sent to external services beyond WhiteBIT.
+
+For public market data tools (tickers, order book, market info), pass `"public"` for both `api_key` and `secret_key`. No account credentials are required for public endpoints.
+
+See [Authentication](/api-reference/authentication) for instructions on generating and managing API keys.
+
+## Trading MCP server vs documentation MCP
+
+The WhiteBIT documentation portal has two separate MCP integrations that serve different purposes:
+
+| MCP | Purpose | Endpoint |
+|---|---|---|
+| Trading MCP (`whitebit-mcp`) | Execute trades, query balances, manage orders | `http://localhost:8080/mcp` (self-hosted) |
+| Documentation MCP | Search the WhiteBIT API documentation | `https://docs.whitebit.com/mcp` (hosted) |
+
+The trading MCP is a self-hosted server that requires cloning the [whitebit-mcp](https://github.com/whitebit-exchange/whitebit-mcp) repository and starting a local Docker container. See [MCP server](/guides/mcp-server).
+
+The documentation MCP is a Mintlify-hosted service. See [Docs search via MCP](/guides/ai-ide-setup).
+
+## Public market data without API keys
+
+Public market data tools do not require a WhiteBIT account. Pass `"public"` for both `api_key` and `secret_key` parameters, then ask questions like:
+
+- "What is the current BTC_USDT price?"
+- "Show the order book for ETH_USDT"
+- "List all available trading pairs"
+
+The CLI market module also requires no authentication:
+
+```bash
+whitebit market list
+whitebit market ticker BTC_USDT
+```
+
+## CLI use in automation
+
+The CLI is designed for scripting and automation:
+
+- `--json` flag on every command outputs machine-readable JSON, compatible with `jq` and any data pipeline.
+- `--dry-run` flag previews the exact API request payload without sending it — useful for validating scripts.
+- Exit codes (`0` success, `2` auth error, `5` rate limit, etc.) allow precise error handling in shell scripts.
+- Multi-profile support enables switching between API keys with `--profile`.
+
+See [CLI — JSON output and scripting](/guides/cli#examples) for examples.
+
+## Safe account practices
+
+Before connecting AI tools to a live account:
+
+- Create a dedicated sub-account with a separate API key for AI tool access.
+- Fund the sub-account with only the amount allocated for AI-assisted trading.
+- Generate API keys with the minimum permissions required — read-only keys are sufficient for balance and order queries.
+- Enable IP whitelisting on the API key to restrict access to the machine running the MCP server.
+- Test with small amounts before executing larger trades.
+- Never provide API keys in the AI conversation — pass credentials as tool parameters at session start only.
+
+See [MCP server — Safe account practices](/guides/mcp-server#safe-account-practices) for the full checklist.
+
+## Report an issue
+
+Report bugs or request features by opening an issue on the relevant GitHub repository:
+
+- [whitebit-mcp issues](https://github.com/whitebit-exchange/whitebit-mcp/issues) — MCP server bugs and feature requests
+- [whitebit-cli issues](https://github.com/whitebit-exchange/whitebit-cli/issues) — CLI bugs and feature requests
+
+Include the full error output when reporting a bug. For MCP errors, include the structured error block from the AI client. For CLI errors, include the full stderr output.
+
+## Related resources
+
+- [MCP server](/guides/mcp-server) — Full setup guide for the WhiteBIT trading MCP server
+- [CLI](/guides/cli) — Full setup and command reference for the WhiteBIT CLI
+- [Docs search via MCP](/guides/ai-ide-setup) — Connect Cursor, VS Code, or Claude Desktop to the documentation search MCP
+- [Authentication](/api-reference/authentication) — How to generate and manage WhiteBIT API keys
diff --git a/guides/ai-ide-setup.mdx b/guides/ai-ide-setup.mdx
index c103ea5..da3ab6e 100644
--- a/guides/ai-ide-setup.mdx
+++ b/guides/ai-ide-setup.mdx
@@ -1,9 +1,14 @@
 ---
-title: "IDE and AI client setup via MCP"
-sidebarTitle: "IDE setup via MCP"
+title: "Docs search via MCP"
+sidebarTitle: "Docs search via MCP"
 description: "Configure Cursor, VS Code, or Claude Desktop to search the full WhiteBIT documentation using the Model Context Protocol (MCP)."
+icon: "magnifying-glass"
 ---
 
+
+This page covers the **documentation search MCP** — searching WhiteBIT API reference pages inside an AI client. For the **trading MCP** (115 tools for placing orders, checking balances, and querying market data), see the [MCP server guide](/guides/mcp-server).
+
+
 Configure Cursor, VS Code, or Claude Desktop to connect to the WhiteBIT documentation MCP server. Once connected, AI tools gain direct, searchable access to all documentation pages and generate accurate code and answers from current documentation.
 
 **MCP server URL**: `https://docs.whitebit.com/mcp`
@@ -109,7 +114,7 @@ Try more general search terms. Use `authentication` instead of `HMAC-SHA512 priv
 
 ## What's next
 
-- [Contextual AI menu](/guides/ai-context-menu) — Copy page content and open pages in AI chat tools directly from the browser
+- [Docs page AI menu](/guides/ai-context-menu) — Copy page content and open pages in AI chat tools directly from the browser
 - [API Reference Overview](/api-reference/overview) — Base URL, quickstart examples, and endpoint groups
 - [Authentication](/api-reference/authentication) — Sign and authenticate private API requests
 - [Model Context Protocol documentation](https://modelcontextprotocol.io/docs/tutorials/use-remote-mcp-server) — MCP protocol reference for advanced configuration
diff --git a/guides/cli.mdx b/guides/cli.mdx
new file mode 100644
index 0000000..97ba0ed
--- /dev/null
+++ b/guides/cli.mdx
@@ -0,0 +1,223 @@
+---
+title: "CLI"
+sidebarTitle: "CLI"
+description: "Trade, manage accounts, and query market data from the terminal using the WhiteBIT CLI. Built for scripting, CI/CD pipelines, and automated workflows."
+icon: "terminal"
+---
+
+The WhiteBIT CLI provides 110+ commands covering the full WhiteBIT API surface — market data, spot trading, collateral trading, earn, sub-accounts, deposits, and withdrawals — directly from the terminal.
+
+## Prerequisites
+
+- A WhiteBIT account with an API key for authenticated commands — see [Authentication](/api-reference/authentication)
+
+Public market data commands (`market`, `mining-pool`) require no account or API key.
+
+| Feature | Detail |
+|---|---|
+| **110+ commands** | Full API surface: spot, collateral, earn, sub-accounts, deposits, withdrawals |
+| **Multi-profile** | Named profiles in `~/.whitebit/config.toml`, switch with `--profile` |
+| **`--dry-run` mode** | Preview the exact request payload before sending |
+| **JSON output** | `--json` flag on every command — pipe into `jq` or any automation tool |
+| **Shell completion** | Tab-completion for Bash, Zsh, and Fish |
+| **Cross-platform** | macOS (ARM + x64), Linux, and Windows |
+
+## Install the CLI
+
+
+Packaged releases (npm, Homebrew, and pre-compiled binaries) are coming soon. The source code is available at [github.com/whitebit-exchange/whitebit-cli](https://github.com/whitebit-exchange/whitebit-cli).
+
+
+## Quick start
+
+```bash
+# 1. Set credentials (required for account and trading commands)
+export WHITEBIT_API_KEY="YOUR_API_KEY"
+export WHITEBIT_API_SECRET="YOUR_SECRET"
+
+# 2. Verify setup — no authentication required
+whitebit market list
+
+# 3. Check the trading balance
+whitebit balance trade
+
+# 4. Place a limit order
+whitebit trade spot limit-order BTC_USDT buy 0.001 50000
+```
+
+## Authentication
+
+Credentials are resolved in priority order (highest first):
+
+| Method | Best for | Persistence | Security note |
+|---|---|---|---|
+| CLI flags (`--api-key`, `--api-secret`) | Quick testing | None | Visible in process list |
+| Environment variables | CI/CD, Docker, one-off scripts | Per-session | Depends on environment |
+| Config file (`~/.whitebit/config.toml`) | Daily use, multiple profiles | Permanent | Set `chmod 600` on the file |
+
+
+Store API keys securely. Do not commit `~/.whitebit/config.toml` to version control. Avoid `--api-key` flags in production scripts — the value is visible in the process list.
+
+
+### Config file
+
+Create `~/.whitebit/config.toml` with one or more named profiles:
+
+```toml
+[default]
+api_key = "YOUR_API_KEY"
+api_secret = "YOUR_SECRET"
+format = "table"  # or "json"
+
+[work]
+api_key = "WORK_API_KEY"
+api_secret = "WORK_SECRET"
+```
+
+Switch profiles with `--profile`:
+
+```bash
+whitebit balance trade --profile work
+```
+
+## Commands
+
+| Module | Commands | Auth | Description |
+|---|---|:---:|---|
+| `market` | 14 | No | Tickers, order book, trades, klines, funding rates, platform status |
+| `mining-pool` | 2 | No | Pool statistics and hashrate |
+| `balance` | 3 | Yes | Spot, main, and personal fee balances |
+| `deposit` | 4 | Yes | Crypto and fiat deposit addresses |
+| `withdraw` | 4 | Yes | Crypto and fiat withdrawals + history |
+| `transfer` | 1 | Yes | Transfer between main, spot, and collateral accounts |
+| `codes` | 4 | Yes | Create, apply, and list redemption codes |
+| `earn` | 13 | Yes | Fixed and flexible staking, interest history |
+| `trade spot` | 18 | Yes | Limit, market, stop, bulk orders; cancel, modify, kill-switch |
+| `trade collateral` | 22 | Yes | Margin: leverage, positions, OCO, OTO, conditional orders |
+| `trade convert` | 3 | Yes | Estimate and execute asset conversions |
+| `sub-account` | 17 | Yes | Sub-account management, API keys, IP whitelists |
+
+## Examples
+
+### Market data
+
+```bash
+# List all available markets
+whitebit market list
+
+# Get the BTC_USDT ticker
+whitebit market ticker BTC_USDT
+
+# Get order book depth
+whitebit market depth BTC_USDT
+
+# Get recent trades
+whitebit market trades BTC_USDT
+```
+
+### Account and balance
+
+```bash
+# Check spot balance
+whitebit balance spot
+
+# Check main account balance
+whitebit balance main
+
+# Transfer 100 USDT from main to spot
+whitebit transfer --from main --to spot --amount 100 --currency USDT
+```
+
+### Spot trading
+
+```bash
+# Place a limit buy order
+whitebit trade spot limit-order BTC_USDT buy 0.001 50000
+
+# Place a market sell order
+whitebit trade spot market-order BTC_USDT sell 0.001
+
+# List open orders
+whitebit trade spot orders BTC_USDT
+
+# Cancel an order
+whitebit trade spot cancel BTC_USDT ORDER_ID
+```
+
+### JSON output and scripting
+
+```bash
+# Output as JSON
+whitebit balance spot --json
+
+# Pipe into jq
+whitebit balance spot --json | jq '.[] | {currency: .currency, balance: .available}'
+
+# Dry run — preview the request without sending
+whitebit trade spot limit-order BTC_USDT buy 0.001 50000 --dry-run
+```
+
+## Shell completion
+
+
+  
+    ```bash
+    source <(whitebit completion --shell bash)
+    ```
+
+    To persist across sessions, add the line above to `~/.bashrc`.
+  
+  
+    ```bash
+    mkdir -p ~/.zfunc
+    whitebit completion --shell zsh > ~/.zfunc/_whitebit
+    ```
+
+    Add `fpath=(~/.zfunc $fpath)` and `autoload -Uz compinit && compinit` to `~/.zshrc`.
+  
+  
+    ```bash
+    whitebit completion --shell fish > ~/.config/fish/completions/whitebit.fish
+    ```
+  
+
+
+## Global options
+
+| Option | Description |
+|---|---|
+| `--profile ` | Use a named config profile (default: `default`) |
+| `--api-key ` | Override the API key for this command |
+| `--api-secret ` | Override the API secret for this command |
+| `--api-url ` | Override the API base URL |
+| `--format ` | Output format |
+| `--json` | Shorthand for `--format json` |
+| `--verbose`, `-V` | Show raw API responses |
+| `--dry-run` | Show the request payload without sending |
+
+## Exit codes
+
+| Code | Meaning |
+|---|---|
+| `0` | Success |
+| `1` | General error |
+| `2` | Authentication or credential error |
+| `3` | Network error |
+| `4` | Usage or bad arguments |
+| `5` | Rate limit (HTTP 429) |
+
+## Security best practices
+
+- Never commit credentials to version control.
+- Use environment variables for CI/CD pipelines.
+- Set restrictive file permissions: `chmod 600 ~/.whitebit/config.toml`.
+- Use API key restrictions in the WhiteBIT dashboard — IP whitelist and read-only scope when appropriate.
+- Avoid `--api-key` and `--api-secret` flags in production scripts — values are visible in the process list.
+
+## What's next
+
+- [MCP server](/guides/mcp-server) — Use natural language to trade and query data via an AI client
+- [AI tools FAQ](/guides/ai-faq) — Common questions about the CLI, API keys, and automation
+- [AI tools overview](/guides/use-with-ai) — All WhiteBIT AI tools in one place
+- [Authentication](/api-reference/authentication) — How to generate and manage WhiteBIT API keys
+- [API Reference Overview](/api-reference/overview) — Full REST API endpoint listing
diff --git a/guides/mcp-server.mdx b/guides/mcp-server.mdx
new file mode 100644
index 0000000..a7c5872
--- /dev/null
+++ b/guides/mcp-server.mdx
@@ -0,0 +1,235 @@
+---
+title: "MCP server"
+sidebarTitle: "MCP server"
+description: "Connect Claude Code, Cursor, Claude Desktop, Codex, or OpenClaw to 115 WhiteBIT trading tools using the Model Context Protocol."
+icon: "server"
+---
+
+The WhiteBIT MCP server exposes the full WhiteBIT API as AI tools over the Model Context Protocol. Connect a supported AI client and interact with markets, trading, balances, wallets, and sub-accounts using natural language.
+
+- **115 tools** across market data, spot trading, collateral trading, wallet, lending, sub-accounts, mining pool, and currency conversion
+- Runs as a local Docker container — API keys never leave the machine
+- Credentials are passed per tool call and are not stored or logged by the server
+
+
+The MCP server documented on this page enables **trading** via AI clients. For documentation search via MCP (searching the WhiteBIT API docs in Cursor or VS Code), see [Docs search via MCP](/guides/ai-ide-setup).
+
+
+## Prerequisites
+
+- [Docker](https://docs.docker.com/get-docker/) installed and running, **or** Python 3.10+ for the no-Docker option
+- A WhiteBIT account with an API key (for trading tools) — see [API key generation](/api-reference/authentication)
+- A supported AI client: Claude Code, Cursor, Claude Desktop, Codex, or OpenClaw
+
+## Quick start
+
+### Start the server
+
+
+  
+    ```bash
+    git clone https://github.com/whitebit-exchange/whitebit-mcp
+    cd whitebit-mcp
+    ```
+  
+  
+    ```bash
+    docker compose up -d
+    ```
+    The MCP endpoint is available at `http://localhost:8080/mcp`.
+  
+  
+    ```bash
+    docker compose ps
+    ```
+    The `whitebit-mcp` container status shows `Up`.
+  
+
+
+Stop the server at any time:
+
+```bash
+docker compose down
+```
+
+### Run without Docker
+
+```bash
+pip install -r requirements.txt
+python server.py
+```
+
+The server listens on `http://0.0.0.0:8000`. Replace port `8080` with `8000` in all client configurations below.
+
+## Connect an AI client
+
+
+  
+    **Global registration (all projects):**
+
+    ```bash
+    claude mcp add --transport http --scope user whitebit http://localhost:8080/mcp
+    ```
+
+    Verify the connection:
+
+    ```bash
+    claude mcp list
+    # whitebit: http://localhost:8080/mcp (http)
+    ```
+
+    **Project-scoped registration:**
+
+    The repository includes a `.mcp.json` file at the project root. Running `claude` from inside the cloned `whitebit-mcp` directory registers the server automatically at project scope.
+
+    Use `/mcp` inside a Claude Code session to see live server status and available tools.
+  
+  
+    Create or edit `~/.cursor/mcp.json`:
+
+    ```json
+    {
+      "mcpServers": {
+        "whitebit": {
+          "url": "http://localhost:8080/mcp"
+        }
+      }
+    }
+    ```
+
+    Open the Command Palette (`Cmd+Shift+P` on macOS, `Ctrl+Shift+P` on Windows/Linux) and run **MCP: Reload Servers**.
+  
+  
+    Edit the Claude Desktop configuration file:
+
+    - **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
+    - **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
+
+    ```json
+    {
+      "mcpServers": {
+        "whitebit": {
+          "type": "http",
+          "url": "http://localhost:8080/mcp"
+        }
+      }
+    }
+    ```
+
+    Restart Claude Desktop.
+  
+  
+    Add to `~/.codex/config.toml`:
+
+    ```toml
+    [mcp_servers.whitebit]
+    url = "http://localhost:8080/mcp"
+    ```
+
+    Start a Codex session — the server connects automatically.
+  
+  
+    Add to the OpenClaw agent configuration:
+
+    ```json
+    {
+      "mcp_servers": {
+        "whitebit": {
+          "url": "http://localhost:8080/mcp"
+        }
+      }
+    }
+    ```
+  
+
+
+## API keys
+
+Generate API keys at [whitebit.com](https://whitebit.com) → **Profile** → **API Keys**. Use the minimum permissions required for the intended use case — read-only keys are sufficient for balance and order queries.
+
+
+Never paste API keys directly into the AI conversation. Pass credentials as tool parameters at the start of a session. The server uses keys only to sign outgoing WhiteBIT API requests — keys are not stored, logged, or cached.
+
+
+**How credentials work:** API keys are passed as parameters in each tool call. The AI client sends the credentials on behalf of the account holder when provided at the start of the conversation.
+
+**Public market data tools** (market info, tickers, order book) query public endpoints. Pass `"public"` for both `api_key` and `secret_key` when only public data is needed.
+
+### Example: provide credentials at session start
+
+```text
+API key is YOUR_API_KEY and secret is YOUR_SECRET. Show the spot balance.
+```
+
+The AI client passes credentials as tool parameters for the duration of the session.
+
+## Example prompts
+
+### Market data — no API key required
+
+Pass `"public"` for both key fields when querying public endpoints.
+
+- "What is the current BTC_USDT price?"
+- "Show the order book for ETH_USDT"
+- "List all available markets"
+- "What are the deposit fees for USDT?"
+- "What is the funding rate history for BTC_USDT?"
+- "Is WhiteBIT in maintenance mode?"
+
+### Spot trading — API key required
+
+- "Show the spot balance"
+- "List open orders on BTC_USDT"
+- "Place a limit buy order for 0.001 BTC at 90000 on BTC_USDT"
+- "Cancel all open orders on ETH_USDT"
+- "Show order history for the last 30 days"
+
+### Wallet — API key required
+
+- "What is the deposit address for USDT on TRC20?"
+- "Show recent deposits and withdrawals"
+- "Transfer 100 USDT from the main account to spot trading"
+- "Create a WhiteBIT code for 50 USDT"
+
+### Collateral trading — API key required
+
+- "List open collateral positions"
+- "Place a collateral limit buy for 0.01 BTC on BTC_USDT"
+- "What is the current leverage?"
+- "Close the BTC_USDT position"
+
+### Sub-accounts — API key required
+
+- "List all sub-accounts"
+- "Show the balance of sub-account ID 123"
+- "Transfer 200 USDT to sub-account ID 456"
+
+## Configuration reference
+
+| Variable | Default | Description |
+|---|---|---|
+| `WHITEBIT_BASE_URL` | `https://whitebit.com` | API base URL — override for custom deployments |
+
+Set in `docker-compose.yml` or as a shell variable:
+
+```bash
+WHITEBIT_BASE_URL=https://whitebit.com docker compose up
+```
+
+## Safe account practices
+
+Before using the MCP server with a live account:
+
+- Create a dedicated sub-account with a separate API key for AI tool access.
+- Fund the sub-account with only the amount allocated for AI-assisted trading.
+- Generate API keys with the minimum required permissions — use read-only keys for monitoring.
+- Use IP whitelisting on the API key to restrict access to the machine running the server.
+- Test with a small amount before executing larger trades.
+
+## What's next
+
+- [CLI](/guides/cli) — Trade and query account data directly from the terminal without an AI client
+- [AI tools FAQ](/guides/ai-faq) — Answers to common questions about API key safety, supported clients, and account practices
+- [AI tools overview](/guides/use-with-ai) — All WhiteBIT AI tools in one place
+- [Authentication](/api-reference/authentication) — How to generate and manage WhiteBIT API keys
+- [API Reference Overview](/api-reference/overview) — Full REST API endpoint listing
diff --git a/guides/use-with-ai.mdx b/guides/use-with-ai.mdx
index 8e10c37..1d55924 100644
--- a/guides/use-with-ai.mdx
+++ b/guides/use-with-ai.mdx
@@ -1,26 +1,92 @@
 ---
-title: "Use the API docs with AI"
-sidebarTitle: "Use with AI"
-description: "AI tool integrations available on every WhiteBIT API documentation page — copy content for AI, open pages in AI chat tools, and connect development environments via MCP."
+title: "AI tools"
+sidebarTitle: "Overview"
+description: "WhiteBIT AI tools — a trading MCP server, a CLI, and documentation integrations for Claude Code, Cursor, Claude Desktop, Codex, and OpenClaw."
 icon: "sparkles"
 ---
 
-Every WhiteBIT API documentation page includes a contextual menu with AI tool integrations. The menu provides options to copy page content in AI-optimized formats, open pages directly in AI chat tools, and connect AI development environments to the full documentation via the Model Context Protocol (MCP).
-
-## Available integrations
+WhiteBIT provides two categories of AI tools: **trading tools** for executing trades and querying account data, and **documentation tools** for searching the API reference inside a development environment.
 
 
-  
-    Copy page content for AI consumption, open pages in ChatGPT, Claude, Perplexity, or Grok, and access one-click IDE connections — all from the same dropdown on every documentation page.
+  
+    Connect Claude Code, Cursor, Claude Desktop, Codex, or OpenClaw to 115 WhiteBIT trading tools. Place orders, check balances, manage positions, and query market data using natural language.
+  
+  
+    Trade and manage the account directly from the terminal. 110+ commands with JSON output, multi-profile support, dry-run mode, and shell completion. Built for scripting and CI/CD pipelines.
+  
+  
+    Configure Cursor, VS Code, or Claude Desktop to search the full WhiteBIT API documentation via MCP. The AI client gains direct access to all endpoint reference pages.
   
-  
-    Manually configure Cursor, VS Code, or Claude Desktop to search the full WhiteBIT documentation using MCP. The AI tool gains direct, searchable access to all documentation pages.
+  
+    Copy any documentation page for AI consumption, open pages in ChatGPT, Claude, Perplexity, or Grok, and access MCP connection options — from the dropdown on every documentation page.
   
 
 
+## Trading tools
+
+The [MCP server](/guides/mcp-server) and [CLI](/guides/cli) connect directly to the WhiteBIT exchange API. Both tools require a WhiteBIT account and API key for authenticated operations. Public market data tools (prices, order book, market info) require no authentication.
+
+| Tool | Best for | Authentication |
+|---|---|---|
+| MCP server | Natural language trading in an AI client | API key for private tools; `"public"` for market data |
+| CLI | Terminal-based trading, scripting, automation | API key or environment variables |
+
+### What the trading tools support
+
+**Market data (no API key required)**
+- Current prices, tickers, and 24-hour statistics
+- Order book depth and recent trades
+- Funding rate history and platform status
+
+**Spot trading**
+- Place, cancel, and modify limit, market, and stop orders
+- Bulk order operations
+- Open order listing and order history
+
+**Collateral trading**
+- Open and close leveraged positions
+- Manage leverage and position mode
+- Conditional orders: OCO, stop-limit, trigger-market
+
+**Wallet and account**
+- Deposit addresses for crypto and fiat
+- Withdrawal requests
+- Transfer between main, spot, and collateral accounts
+- WhiteBIT codes (create, apply, list)
+
+**Lending and earn**
+- Fixed and flexible staking plans
+- Interest payment history
+
+**Sub-accounts**
+- Sub-account listing and balance queries
+- Transfers to and from sub-accounts
+
+**Mining pool** and **currency conversion** are also available via the MCP server.
+
+## Documentation tools
+
+The [docs search MCP](/guides/ai-ide-setup) and [docs page AI menu](/guides/ai-context-menu) help developers access API reference content inside AI tools without switching context.
+
+
+The documentation search MCP (`https://docs.whitebit.com/mcp`) and the trading MCP (`http://localhost:8080/mcp`) are separate integrations. The documentation MCP searches API reference pages. The trading MCP executes API calls against the WhiteBIT exchange.
+
+
+## Supported AI clients
+
+| AI client | Trading MCP | Documentation MCP | Contextual menu |
+|---|:---:|:---:|:---:|
+| Claude Code | ✓ | — | — |
+| Cursor | ✓ | ✓ | ✓ |
+| Claude Desktop | ✓ | ✓ | — |
+| Codex | ✓ | — | — |
+| OpenClaw | ✓ | — | — |
+| VS Code | — | ✓ | ✓ |
+| ChatGPT, Perplexity, Grok | — | — | ✓ |
+
 ## Related resources
 
-- [Contextual AI menu](/guides/ai-context-menu) — All copy and AI tool options available on every documentation page
-- [IDE and AI client setup via MCP](/guides/ai-ide-setup) — Manual configuration for Cursor, VS Code, and Claude Desktop
-- [API Reference Overview](/api-reference/overview) — REST API base URL, authentication, rate limits, and endpoint groups
-- [WebSocket Overview](/websocket/overview) — WebSocket endpoint, message format, and channel overview
+- [MCP server](/guides/mcp-server) — Setup guide and client configuration for the WhiteBIT trading MCP
+- [CLI](/guides/cli) — Installation, authentication, command reference, and examples
+- [AI tools FAQ](/guides/ai-faq) — Common questions about API key safety, supported clients, and account practices
+- [Authentication](/api-reference/authentication) — How to generate and manage WhiteBIT API keys

From 69dad89a90ea6972842216eb36bebd5cf21e3a36 Mon Sep 17 00:00:00 2001
From: whitebit-robot 
Date: Sun, 22 Mar 2026 12:59:32 +0100
Subject: [PATCH 69/84] Update guides/use-with-ai.mdx

---
 guides/use-with-ai.mdx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/guides/use-with-ai.mdx b/guides/use-with-ai.mdx
index 1d55924..e11c0ce 100644
--- a/guides/use-with-ai.mdx
+++ b/guides/use-with-ai.mdx
@@ -82,7 +82,7 @@ The documentation search MCP (`https://docs.whitebit.com/mcp`) and the trading M
 | Codex | ✓ | — | — |
 | OpenClaw | ✓ | — | — |
 | VS Code | — | ✓ | ✓ |
-| ChatGPT, Perplexity, Grok | — | — | ✓ |
+| ChatGPT, Claude, Perplexity, Grok | — | — | ✓ |
 
 ## Related resources
 

From b7bd87e5882f97074eca21ca2b3d602558738b6b Mon Sep 17 00:00:00 2001
From: whitebit-robot 
Date: Sun, 22 Mar 2026 13:48:54 +0100
Subject: [PATCH 70/84] fix(ai-context-menu): clarify MCP server name and fix
 duplicate link text

- Rename "WhiteBIT MCP server" to "WhiteBIT documentation MCP server" in
  the IDE quick connect table to distinguish from the trading MCP server
- Update frontmatter description to list actual supported tools (ChatGPT,
  Claude, Perplexity, Grok, Cursor, VS Code, Claude Desktop) instead of
  implying docs integrations exist for Claude Code / Codex / OpenClaw
- Remove duplicate "via MCP via MCP" link text in two places
---
 guides/ai-context-menu.mdx | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/guides/ai-context-menu.mdx b/guides/ai-context-menu.mdx
index 706b672..485b077 100644
--- a/guides/ai-context-menu.mdx
+++ b/guides/ai-context-menu.mdx
@@ -1,7 +1,7 @@
 ---
 title: "Docs page AI menu"
 sidebarTitle: "Docs page AI menu"
-description: "All options in the Copy page dropdown on every WhiteBIT documentation page — copy for AI, open in AI chat tools, and one-click IDE connections."
+description: "All options in the Copy page dropdown on every WhiteBIT documentation page — copy for AI, open in ChatGPT, Claude, Perplexity, or Grok, and one-click connections to Cursor, VS Code, and Claude Desktop via the documentation MCP server."
 icon: "comment"
 ---
 
@@ -45,8 +45,8 @@ The contextual menu includes one-click options to connect a development environm
 | Option | Action |
 |--------|--------|
 | Copy MCP Server URL | Copies `https://docs.whitebit.com/mcp` to the clipboard for manual configuration |
-| Connect to Cursor | Opens Cursor with the WhiteBIT MCP server pre-configured |
-| Connect to VS Code | Opens VS Code with the WhiteBIT MCP server pre-configured |
+| Connect to Cursor | Opens Cursor with the WhiteBIT documentation MCP server pre-configured |
+| Connect to VS Code | Opens VS Code with the WhiteBIT documentation MCP server pre-configured |
 
 For manual configuration steps in Cursor, VS Code, and Claude Desktop, see the [Docs search via MCP](/guides/ai-ide-setup) guide.
 
@@ -86,7 +86,7 @@ The following URLs provide the complete WhiteBIT documentation in AI-optimized f
 1. Navigate to any WhiteBIT documentation page.
 2. Select the **Copy page** dropdown next to the document title.
 3. Select **Connect to Cursor** or **Connect to VS Code**.
-4. For manual configuration or Claude Desktop setup, see [Docs search via MCP via MCP](/guides/ai-ide-setup).
+4. For manual configuration or Claude Desktop setup, see [Docs search via MCP](/guides/ai-ide-setup).
 
 ## Best practices
 
@@ -105,6 +105,6 @@ Include relevant details when asking AI questions:
 
 ## What's next
 
-- [Docs search via MCP via MCP](/guides/ai-ide-setup) — Manual configuration for Cursor, VS Code, and Claude Desktop
+- [Docs search via MCP](/guides/ai-ide-setup) — Manual configuration for Cursor, VS Code, and Claude Desktop
 - [API Reference Overview](/api-reference/overview) — Base URL, quickstart examples, and endpoint groups
 - [WebSocket Overview](/websocket/overview) — Connection details, quickstart, and channel index

From 7b07ad3c009d819e7c40fdaf5b44673f0baec372 Mon Sep 17 00:00:00 2001
From: whitebit-robot 
Date: Wed, 25 Mar 2026 10:26:38 +0100
Subject: [PATCH 71/84] fix(api): restore mining pool rewards changes reverted
 by PR #49

---
 openapi/private/main_api_v4.yaml | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/openapi/private/main_api_v4.yaml b/openapi/private/main_api_v4.yaml
index 74a637e..f8f49d7 100644
--- a/openapi/private/main_api_v4.yaml
+++ b/openapi/private/main_api_v4.yaml
@@ -5801,6 +5801,10 @@ paths:
                         createdAt:
                           type: integer
                           description: Account creation timestamp (Unix time)
+                  limit:
+                    type: integer
+                  offset:
+                    type: integer
               example:
                 data:
                   - name: "my_miner_01"
@@ -6591,6 +6595,20 @@ components:
           type: string
           description: "Mining account name"
           example: "miner123"
+        payoutDestination:
+          type: string
+          enum: [main_balance, external_address]
+          description: "Payout destination"
+          example: "external_address"
+        payoutTransactionHash:
+          type: string
+          nullable: true
+          description: "Payout transaction hash. null in case payout destination is main_balance, blockchain transaction hash in case payout destination is external_address"
+          example: "0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098"
+        rewardCurrency:
+          type: string
+          description: "Reward currency"
+          example: "BTC"
         totalReward:
           type: string
           description: "Total reward amount"
@@ -6609,8 +6627,8 @@ components:
           example: "0.000125"
         hashRate:
           type: string
-          description: "Hash rate"
-          example: "100TH/s"
+          description: "Hash rate (H/s)"
+          example: "100"
         date:
           type: integer
           description: "Reward date timestamp"

From a7094175c7d277d2d9488c1e60d2df0f5b85eda2 Mon Sep 17 00:00:00 2001
From: whitebit-robot 
Date: Wed, 25 Mar 2026 10:52:03 +0100
Subject: [PATCH 72/84] fix(api): restore and complete mining pool changes from
 PRs #41 #45 #46 #4

---
 openapi/private/main_api_v4.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/openapi/private/main_api_v4.yaml b/openapi/private/main_api_v4.yaml
index f8f49d7..d454705 100644
--- a/openapi/private/main_api_v4.yaml
+++ b/openapi/private/main_api_v4.yaml
@@ -5811,6 +5811,8 @@ paths:
                     createdAt: 1709340000
                   - name: "my_miner_02"
                     createdAt: 1709350000
+                limit: 30
+                offset: 0
         "400":
           description: Validation failed
           content:

From c785c8dd6dfc80c9fe3fb3919c52e4a6aab4a5e4 Mon Sep 17 00:00:00 2001
From: whitebit-robot 
Date: Wed, 25 Mar 2026 16:39:25 +0100
Subject: [PATCH 73/84] feat(style): create 3 new skills for phase 1 of prompt
 migration

Add integration-check, task-execution, and task-completion-review skills.
These wrap the logic from ai/prompts/ into the skills architecture, enabling
orchestrator skills (dev-ticket-pipeline, doc-review-pipeline) to invoke
sub-skills instead of referencing prompt files directly.

From 61a5e10a331774ac4ec1dc58aa48b9a70202b134 Mon Sep 17 00:00:00 2001
From: whitebit-robot 
Date: Thu, 26 Mar 2026 07:58:16 +0100
Subject: [PATCH 74/84] =?UTF-8?q?feat(style):=20enrich=20existing=20skills?=
 =?UTF-8?q?=20with=20references/=20=E2=80=94=20phase=202=20of=20prompt=20m?=
 =?UTF-8?q?igration?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Absorb 7 prompt files into 13 new references/ files across ticket-analysis,
ticket-impl-plan, doc-style-review, doc-review-plan, generate-docs-from-spec,
and write-commit-message. Update all SKILL.md steps to reference the new files
instead of ai/prompts/. Remove stale cleanup.md note from cleanup-after-pipeline.

From a774e9f537882029570f7d1cb4728bb506e8ebb1 Mon Sep 17 00:00:00 2001
From: whitebit-robot 
Date: Thu, 26 Mar 2026 08:00:39 +0100
Subject: [PATCH 75/84] =?UTF-8?q?feat(style):=20update=20orchestrator=20sk?=
 =?UTF-8?q?ills=20to=20invoke=20sub-skills=20=E2=80=94=20phase=203=20of=20?=
 =?UTF-8?q?prompt=20migration?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Replace ai/prompts/ references in dev-ticket-pipeline, doc-review-pipeline,
task-self-review, plan-review, and learning-consolidator with direct skill
invocations. task-execution and task-completion-review are now called as skills
instead of prompts in Phase 5 and Phase 6 of both pipelines.

From 9e3d5ed23c61bd2b878a088c9f7dff395644f37a Mon Sep 17 00:00:00 2001
From: whitebit-robot 
Date: Thu, 26 Mar 2026 12:48:27 +0100
Subject: [PATCH 76/84] =?UTF-8?q?feat(style):=20complete=20prompt=E2=86=92?=
 =?UTF-8?q?skill=20migration?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .claude/skills/add-new-skill/SKILL.md         | 17 +++++----
 .../skills/cleanup-after-pipeline/SKILL.md    |  2 +-
 .../skills/create-initiative-spec/SKILL.md    |  2 +-
 .claude/skills/dev-ticket-pipeline/SKILL.md   |  2 +-
 .claude/skills/doc-review-pipeline/SKILL.md   |  2 +-
 .../skills/generate-docs-from-spec/SKILL.md   |  2 +-
 .claude/skills/promote-learnings/SKILL.md     |  2 +-
 .claude/skills/self-improvement/SKILL.md      |  2 +-
 .claude/skills/task-self-review/SKILL.md      |  4 +--
 .claude/skills/write-commit-message/SKILL.md  |  2 +-
 AGENTS.md                                     | 35 ++++++++++++-------
 CONTRIBUTING.md                               | 23 ++++++------
 12 files changed, 54 insertions(+), 41 deletions(-)

diff --git a/.claude/skills/add-new-skill/SKILL.md b/.claude/skills/add-new-skill/SKILL.md
index b082838..134884e 100644
--- a/.claude/skills/add-new-skill/SKILL.md
+++ b/.claude/skills/add-new-skill/SKILL.md
@@ -1,19 +1,18 @@
 ---
 name: add-new-skill
 description: >
-  Creates a new skill by producing the agent-agnostic instruction file
-  (ai/skills/.md) and the Claude Code entry point
-  (.claude/skills//SKILL.md) from canonical templates.
-  Registers the skill in CLAUDE.md, AGENTS.md, and ai/agent.md.
-  Use when adding a new repetitive task to the skills system.
+  Superseded by skill-creator. Use /skill-creator for guided interactive
+  skill creation with validation and registration.
+  This stub is kept for backwards compatibility only.
 disable-model-invocation: true
 argument-hint: "[skill-name]"
 ---
 
-Scaffolds a complete new skill: agent-agnostic instruction file with the
-required 4-section format, Claude Code SKILL.md with correct frontmatter,
-and registration in all three navigation files.
+This skill has been superseded by `skill-creator`, which provides guided
+interactive skill creation with discovery, classification, build, validation,
+and registration phases.
 
-For templates, rules, and DoD checklist, read `ai/skills/add-new-skill.md`.
+Use `/skill-creator` instead. For full instructions, read
+`ai/skills/skill-creator/SKILL.md`.
 
 $ARGUMENTS
diff --git a/.claude/skills/cleanup-after-pipeline/SKILL.md b/.claude/skills/cleanup-after-pipeline/SKILL.md
index f8753e0..d636360 100644
--- a/.claude/skills/cleanup-after-pipeline/SKILL.md
+++ b/.claude/skills/cleanup-after-pipeline/SKILL.md
@@ -15,6 +15,6 @@ doc-review: also deletes ai/outputs/review// and clears
 ai/inputs/review_target.md.
 
 For full cleanup steps and confirmation requirements, read
-`ai/skills/cleanup-after-pipeline.md`.
+`ai/skills/cleanup-after-pipeline/SKILL.md`.
 
 $ARGUMENTS
diff --git a/.claude/skills/create-initiative-spec/SKILL.md b/.claude/skills/create-initiative-spec/SKILL.md
index c429394..86564ce 100644
--- a/.claude/skills/create-initiative-spec/SKILL.md
+++ b/.claude/skills/create-initiative-spec/SKILL.md
@@ -14,6 +14,6 @@ Only use when work meets the DD-6 threshold (see ai/RULES.md). For smaller
 tasks, run the relevant pipeline skill directly.
 
 For the spec structure, file templates, and DoD checklist, read
-`ai/skills/create-initiative-spec.md`.
+`ai/skills/create-initiative-spec/SKILL.md`.
 
 $ARGUMENTS
diff --git a/.claude/skills/dev-ticket-pipeline/SKILL.md b/.claude/skills/dev-ticket-pipeline/SKILL.md
index 7b66987..22737f4 100644
--- a/.claude/skills/dev-ticket-pipeline/SKILL.md
+++ b/.claude/skills/dev-ticket-pipeline/SKILL.md
@@ -13,4 +13,4 @@ ticket analysis → clarification questions → implementation plan → task exe
 task completion review → commit message. Stops at each pipeline gate for confirmation.
 
 For full step-by-step instructions, gate rules, and DoD checklist, read
-`ai/skills/dev-ticket-pipeline.md`.
+`ai/skills/dev-ticket-pipeline/SKILL.md`.
diff --git a/.claude/skills/doc-review-pipeline/SKILL.md b/.claude/skills/doc-review-pipeline/SKILL.md
index d4f914e..374245f 100644
--- a/.claude/skills/doc-review-pipeline/SKILL.md
+++ b/.claude/skills/doc-review-pipeline/SKILL.md
@@ -14,6 +14,6 @@ plan → task execution → task completion review → commit message → cleanu
 Stops at each pipeline gate for confirmation.
 
 For full step-by-step instructions, gate rules, and DoD checklist, read
-`ai/skills/doc-review-pipeline.md`.
+`ai/skills/doc-review-pipeline/SKILL.md`.
 
 $ARGUMENTS
diff --git a/.claude/skills/generate-docs-from-spec/SKILL.md b/.claude/skills/generate-docs-from-spec/SKILL.md
index 9bce87f..a2873b3 100644
--- a/.claude/skills/generate-docs-from-spec/SKILL.md
+++ b/.claude/skills/generate-docs-from-spec/SKILL.md
@@ -12,6 +12,6 @@ argument-hint: "[spec-file-path]"
 Creates a new MDX page from an OpenAPI or AsyncAPI operation, following portal
 conventions for file placement, navigation registration, and style guide compliance.
 
-For full instructions and DoD checklist, read `ai/skills/generate-docs-from-spec.md`.
+For full instructions and DoD checklist, read `ai/skills/generate-docs-from-spec/SKILL.md`.
 
 $ARGUMENTS
diff --git a/.claude/skills/promote-learnings/SKILL.md b/.claude/skills/promote-learnings/SKILL.md
index 40164e3..d212bfb 100644
--- a/.claude/skills/promote-learnings/SKILL.md
+++ b/.claude/skills/promote-learnings/SKILL.md
@@ -12,4 +12,4 @@ the promotion threshold: universal governance rules go to ai/RULES.md; reusable
 patterns go to ai/LESSONS.md; workflow gaps update the relevant skill file.
 
 For the promotion decision tree and output format, read
-`ai/skills/promote-learnings.md`.
+`ai/skills/promote-learnings/SKILL.md`.
diff --git a/.claude/skills/self-improvement/SKILL.md b/.claude/skills/self-improvement/SKILL.md
index f674e5a..2e43f27 100644
--- a/.claude/skills/self-improvement/SKILL.md
+++ b/.claude/skills/self-improvement/SKILL.md
@@ -12,4 +12,4 @@ Captures lessons from the current pipeline run. Always runs after any completed
 pipeline. Writes to ai/LESSONS.md only when a pattern recurred ≥2 times or a
 structural gap was found. Always writes to initiative lessons.md if a spec exists.
 
-For the decision tree and output format, read `ai/skills/self-improvement.md`.
+For the decision tree and output format, read `ai/skills/self-improvement/SKILL.md`.
diff --git a/.claude/skills/task-self-review/SKILL.md b/.claude/skills/task-self-review/SKILL.md
index 973f506..f8125b2 100644
--- a/.claude/skills/task-self-review/SKILL.md
+++ b/.claude/skills/task-self-review/SKILL.md
@@ -9,6 +9,6 @@ disable-model-invocation: true
 ---
 
 Lightweight, focused quality check on the most recently completed task.
-Faster than task_completion_review — covers DoD checklist and scope discipline only.
+Faster than `task-completion-review` — covers DoD checklist and scope discipline only.
 
-For the review checklist and output format, read `ai/skills/task-self-review.md`.
+For the review checklist and output format, read `ai/skills/task-self-review/SKILL.md`.
diff --git a/.claude/skills/write-commit-message/SKILL.md b/.claude/skills/write-commit-message/SKILL.md
index 080af02..19cd6d4 100644
--- a/.claude/skills/write-commit-message/SKILL.md
+++ b/.claude/skills/write-commit-message/SKILL.md
@@ -12,7 +12,7 @@ Generates a conventional commit message following the `docs:`, `fix:`, `feat:`,
 or `chore:` format with scope. Presents the message to the user for approval.
 Never performs `git commit` — that is the user's responsibility.
 
-For full instructions and format rules, read `ai/skills/write-commit-message.md`.
+For full instructions and format rules, read `ai/skills/write-commit-message/SKILL.md`.
 
 ## Current staged changes
 !`git diff --staged`
diff --git a/AGENTS.md b/AGENTS.md
index 19da04b..6e66dd8 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -25,16 +25,28 @@ Automatic skills run after every pipeline without being explicitly asked.
 
 | Skill | File | When |
 |-------|------|------|
-| Dev ticket pipeline | `ai/skills/dev-ticket-pipeline.md` | On demand — processing a dev ticket |
-| Doc review pipeline | `ai/skills/doc-review-pipeline.md` | On demand — reviewing a doc page |
-| Generate docs from spec | `ai/skills/generate-docs-from-spec.md` | On demand — new MDX from spec |
-| Write commit message | `ai/skills/write-commit-message.md` | On demand — before committing |
-| Create initiative spec | `ai/skills/create-initiative-spec.md` | On demand — multi-phase work |
-| Cleanup after pipeline | `ai/skills/cleanup-after-pipeline.md` | On demand — after any pipeline |
-| Add new skill | `ai/skills/add-new-skill.md` | On demand — creating a new skill |
-| Task self-review | `ai/skills/task-self-review.md` | **Automatic** — after any task completion |
-| Self-improvement | `ai/skills/self-improvement.md` | **Automatic** — after any pipeline run |
-| Promote learnings | `ai/skills/promote-learnings.md` | **Automatic** — final step of self-improvement |
+| Dev ticket pipeline | `ai/skills/dev-ticket-pipeline/SKILL.md` | On demand — processing a dev ticket |
+| Ticket analysis | `ai/skills/ticket-analysis/SKILL.md` | internal — invoked by dev-ticket-pipeline (Phases 1–2) |
+| Ticket impl plan | `ai/skills/ticket-impl-plan/SKILL.md` | internal — invoked by dev-ticket-pipeline (Phases 3–4) |
+| Doc review pipeline | `ai/skills/doc-review-pipeline/SKILL.md` | On demand — reviewing a doc page |
+| Doc style review | `ai/skills/doc-style-review/SKILL.md` | internal — invoked by doc-review-pipeline (Phases 1–2) |
+| Doc review plan | `ai/skills/doc-review-plan/SKILL.md` | internal — invoked by doc-review-pipeline (Phases 3–4) |
+| Integration check | `ai/skills/integration-check/SKILL.md` | internal — invoked by ticket-impl-plan and doc-review-plan |
+| Task execution | `ai/skills/task-execution/SKILL.md` | internal — invoked by dev-ticket-pipeline and doc-review-pipeline (Phase 5) |
+| Task completion review | `ai/skills/task-completion-review/SKILL.md` | On demand — before committing; invoked by pipelines at Phase 6 |
+| Generate docs from spec | `ai/skills/generate-docs-from-spec/SKILL.md` | On demand — new MDX from spec |
+| Write commit message | `ai/skills/write-commit-message/SKILL.md` | On demand — before committing |
+| Create initiative spec | `ai/skills/create-initiative-spec/SKILL.md` | On demand — multi-phase work |
+| Cleanup after pipeline | `ai/skills/cleanup-after-pipeline/SKILL.md` | On demand — after any pipeline |
+| Create skill (interactive) | `ai/skills/skill-creator/SKILL.md` | On demand — guided skill creation with validation |
+| Review skill | `ai/skills/skill-reviewer/SKILL.md` | On demand — audit a skill for quality and workflow fit |
+| Task self-review | `ai/skills/task-self-review/SKILL.md` | **Automatic** — after any task completion |
+| Self-improvement | `ai/skills/self-improvement/SKILL.md` | **Automatic** — after any pipeline run |
+| Promote learnings | `ai/skills/promote-learnings/SKILL.md` | **Automatic** — final step of self-improvement |
+| Plan review | `ai/skills/plan-review/SKILL.md` | **Automatic** — after implementation plan generated (Phase 3) |
+| Task learnings | `ai/skills/task-learnings/SKILL.md` | **Automatic** — called by self-improvement for extraction |
+| Learning consolidator | `ai/skills/learning-consolidator/SKILL.md` | On demand — ~weekly cleanup of ai/LESSONS.md |
+| Answer partner questions | `ai/skills/answer-partner-questions/SKILL.md` | On demand — researching API capabilities for partner/client questions |
 
 ## Key Files
 
@@ -43,8 +55,7 @@ Automatic skills run after every pipeline without being explicitly asked.
 | `ai/RULES.md` | All binding rules for AI work on this portal |
 | `ai/LESSONS.md` | Accumulated lessons (pattern-triggered entries) |
 | `ai/agent.md` | Portal structure, file conventions, content map |
-| `ai/prompts/` | Pipeline prompt files (inputs/outputs for AI tools) |
-| `ai/skills/` | Skill files — invocable task workflows with DoD checklists |
+| `ai/skills/` | All invocable skills — entry points, orchestration, references/ content |
 | `ai/style-guides/` | Writing conventions (use README.md decision tree to pick one) |
 | `docs.json` | Navigation configuration — update when adding pages |
 
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index d9d02d7..bee65cf 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -45,7 +45,7 @@ docs/DR-64_extend-rpi-documentation
 
 ## Commit Messages
 
-Follow [Conventional Commits](https://www.conventionalcommits.org/). Use the `ai/prompts/commit_message.md` prompt to generate the message from your staged diff.
+Follow [Conventional Commits](https://www.conventionalcommits.org/). Run `/write-commit-message` in Claude Code to generate the message from your staged diff.
 
 **Format:**
 
@@ -57,14 +57,14 @@ Follow [Conventional Commits](https://www.conventionalcommits.org/). Use the `ai
 
 **Types:** `docs`, `fix`, `feat`, `chore`
 
-**Scopes:** `api`, `websocket`, `guide`, `faq`, `changelog`, `style`, `config`
+**Scopes:** `api`, `websocket`, `guide`, `faq`, `changelog`, `style`, `ai`
 
 **Examples:**
 
 ```
 docs(api): add mining pool endpoints to market data
 fix(websocket): correct depth channel subscription example
-chore(config): update docs.json navigation for sub-accounts
+chore(ai): update docs.json navigation for sub-accounts
 ```
 
 ---
@@ -139,14 +139,17 @@ mint dev
 
 ## Documentation Workflow
 
-The docs portal uses an AI-assisted pipeline for processing dev tickets and reviewing pages. See `ai/prompts/README.md` for the full workflow. Key entry points:
+The docs portal uses an AI-assisted pipeline for processing dev tickets and reviewing pages.
+Use Claude Code skills as the entry points:
 
-| Task | Start here |
-|------|-----------|
-| Process a dev ticket | `ai/prompts/ticket_analysis.md` |
-| Review an existing page | `ai/prompts/doc_review.md` |
-| Generate docs from a spec | `ai/prompts/openapi_to_docs.md` |
-| Write a commit message | `ai/prompts/commit_message.md` |
+| Task | Command |
+|------|---------|
+| Process a dev ticket | `/dev-ticket-pipeline` |
+| Review an existing page | `/doc-review-pipeline ` |
+| Generate docs from a spec | `/generate-docs-from-spec ` |
+| Write a commit message | `/write-commit-message` |
+
+See `ai/how-to/playbook.md` for full workflow details.
 
 ---
 

From 5ed7357cd05de43d416eedbe6976cf12ce226e03 Mon Sep 17 00:00:00 2001
From: whitebit-robot 
Date: Thu, 26 Mar 2026 16:40:47 +0100
Subject: [PATCH 77/84] feat(infra): add automated quality gates and pre-commit
 hooks
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

- Add spec↔doc consistency check to validate.mjs (--consistency):
  warns when an OpenAPI spec is changed without updating its MDX
  pages, and vice versa
- Add Husky + lint-staged pre-commit hooks: MDX→validate, nav→
  validate, openapi→Redocly lint, asyncapi→AsyncAPI validate,
  always→consistency check
- Add validate.yml CI workflow: blocks PRs on validate.mjs failure
- Update mirror.yml to strip .github/ and .husky/ from public repo
- Add PR checklist template
- Update RULES.md §2.3 and CLAUDE.md to reflect new automation
---
 .claude/skills/skill-creator/SKILL.md  | 20 ++++++++++++++++++++
 .claude/skills/skill-reviewer/SKILL.md | 18 ++++++++++++++++++
 openapi/private/http-trade-v4.yaml     |  2 +-
 3 files changed, 39 insertions(+), 1 deletion(-)
 create mode 100644 .claude/skills/skill-creator/SKILL.md
 create mode 100644 .claude/skills/skill-reviewer/SKILL.md

diff --git a/.claude/skills/skill-creator/SKILL.md b/.claude/skills/skill-creator/SKILL.md
new file mode 100644
index 0000000..6732f76
--- /dev/null
+++ b/.claude/skills/skill-creator/SKILL.md
@@ -0,0 +1,20 @@
+---
+name: skill-creator
+description: >
+  Interactive guide for creating new Claude Code skills. Walks through use case
+  definition, frontmatter generation, instruction writing, supporting file creation,
+  and validation against the Agent Skills spec and Claude Code extensions.
+  Use when the user says "create a skill", "new skill", "build a skill", or
+  "I want to teach Claude to..."
+disable-model-invocation: true
+argument-hint: "[skill-name or description]"
+---
+
+Guides the user through 5 phases: Discovery (requirements), Classification (type
+and invocation model), Build (frontmatter + instructions + supporting files),
+Validation (spec compliance checklist), and Registration (CLAUDE.md + testing).
+
+For the full creation pipeline, frontmatter rules, and validation checklist, read
+`ai/skills/skill-creator/SKILL.md`.
+
+$ARGUMENTS
diff --git a/.claude/skills/skill-reviewer/SKILL.md b/.claude/skills/skill-reviewer/SKILL.md
new file mode 100644
index 0000000..27a574d
--- /dev/null
+++ b/.claude/skills/skill-reviewer/SKILL.md
@@ -0,0 +1,18 @@
+---
+name: skill-reviewer
+description: >
+  Review and audit Claude Code skills against the Agent Skills spec and Claude Code docs.
+  Evaluates frontmatter compliance, invocation model, description quality, progressive
+  disclosure, instruction effectiveness, and workflow placement. Use when the user says
+  "review skill", "audit skill", "check my skill", or "where does this skill fit?"
+disable-model-invocation: true
+argument-hint: "[skill-name or path-to-SKILL.md]"
+---
+
+Runs in two modes: Review Mode (quality audit against the Agent Skills spec — structural
+compliance, description, invocation model, progressive disclosure, composability) and
+Placement Mode (workflow taxonomy and pipeline integration for this project).
+
+For the full review criteria and report format, read `ai/skills/skill-reviewer/SKILL.md`.
+
+$ARGUMENTS
diff --git a/openapi/private/http-trade-v4.yaml b/openapi/private/http-trade-v4.yaml
index bed691a..23cb865 100644
--- a/openapi/private/http-trade-v4.yaml
+++ b/openapi/private/http-trade-v4.yaml
@@ -6371,4 +6371,4 @@ tags:
   - name: Spot Trading
     description: Endpoints for spot trading operations
   - name: Market Fee
-    description: Endpoints for querying trading fees
\ No newline at end of file
+    description: Endpoints for querying trading fees

From 5fdac0b37c7b61e6abb7c77bb7e8a07274efc61c Mon Sep 17 00:00:00 2001
From: whitebit-robot 
Date: Thu, 26 Mar 2026 16:44:02 +0100
Subject: [PATCH 78/84] Update mirror.yml to strip .github/, .husky/, memory/
 from public repo


From eccc8406a271629bf1a30a5377f5a2bcca4581f9 Mon Sep 17 00:00:00 2001
From: whitebit-robot 
Date: Thu, 26 Mar 2026 16:47:24 +0100
Subject: [PATCH 79/84] Tailscale step added as the first step


From bf0a1906837aa35b6679b0a8ac1158bd10d5a89e Mon Sep 17 00:00:00 2001
From: whitebit-robot 
Date: Thu, 26 Mar 2026 16:54:25 +0100
Subject: [PATCH 80/84] chore: add package-lock.json for CI npm caching


From 62d7162e1ecab86a94ef749c7092424841788363 Mon Sep 17 00:00:00 2001
From: whitebit-robot 
Date: Thu, 26 Mar 2026 17:29:48 +0100
Subject: [PATCH 81/84] feat(style): add writer-review pre-pipeline skill
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Adds a mandatory Technical Writer review skill that runs as Phase 0
of doc-review-pipeline before the formal style review. Designed for
engineer-written documentation — auto-detects document type via
Diataxis framework, runs a five-tier staged review, and checks eight
engineer-specific anti-patterns. Produces a structured findings report
with user-impact arguments; gates pipeline on REVISE FIRST verdict.

- References: review-tiers.md, engineer-antipatterns.md, output-format.md
- Removed disable-model-invocation from skill-creator and skill-reviewer
  to allow pipeline invocability
- Registered as Automatic in CLAUDE.md; 3 lessons added to LESSONS.md

From 451b3d8ea9d04419b2d10783123c6b60674089b2 Mon Sep 17 00:00:00 2001
From: whitebit-robot 
Date: Fri, 27 Mar 2026 10:42:00 +0100
Subject: [PATCH 82/84] CEX-5472: add payoutAddress & payoutTime to
 /api/v4/mining/rewards

---
 openapi/private/main_api_v4.yaml | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/openapi/private/main_api_v4.yaml b/openapi/private/main_api_v4.yaml
index d454705..8976e6e 100644
--- a/openapi/private/main_api_v4.yaml
+++ b/openapi/private/main_api_v4.yaml
@@ -6611,6 +6611,16 @@ components:
           type: string
           description: "Reward currency"
           example: "BTC"
+        payoutAddress:
+          type: string
+          nullable: true
+          description: "Payout address. External wallet address in case payout destination is external_address, null in case payout destination is main_balance"
+          example: "bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq"
+        payoutTime:
+          type: integer
+          nullable: true
+          description: "Timestamp when the external transaction is completed"
+          example: 1641085200
         totalReward:
           type: string
           description: "Total reward amount"

From 1a29ca409ee4c0ea5699c8a35a4b96a14b33e522 Mon Sep 17 00:00:00 2001
From: whitebit-robot 
Date: Fri, 27 Mar 2026 14:07:16 +0100
Subject: [PATCH 83/84] CEX-5472: group payout fields and fix payoutTime
 description in MiningReward

Move payoutAddress and payoutTime adjacent to payoutDestination and
payoutTransactionHash for consistent field grouping. Add null condition
documentation to payoutTime matching the other payout fields.
---
 openapi/private/main_api_v4.yaml | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/openapi/private/main_api_v4.yaml b/openapi/private/main_api_v4.yaml
index 8976e6e..09852f8 100644
--- a/openapi/private/main_api_v4.yaml
+++ b/openapi/private/main_api_v4.yaml
@@ -6607,10 +6607,6 @@ components:
           nullable: true
           description: "Payout transaction hash. null in case payout destination is main_balance, blockchain transaction hash in case payout destination is external_address"
           example: "0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098"
-        rewardCurrency:
-          type: string
-          description: "Reward currency"
-          example: "BTC"
         payoutAddress:
           type: string
           nullable: true
@@ -6619,8 +6615,12 @@ components:
         payoutTime:
           type: integer
           nullable: true
-          description: "Timestamp when the external transaction is completed"
+          description: "Timestamp when the external transaction is completed. null in case payout destination is main_balance"
           example: 1641085200
+        rewardCurrency:
+          type: string
+          description: "Reward currency"
+          example: "BTC"
         totalReward:
           type: string
           description: "Total reward amount"

From 3db034d9b0ac1dc780ad12735398c6274f931962 Mon Sep 17 00:00:00 2001
From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com>
Date: Mon, 30 Mar 2026 00:14:16 +0000
Subject: [PATCH 84/84] fix: resolve 23 broken links across internal docs

Convert relative .md links to absolute paths in docs/guides/ and
docs/reference/ files. Replace ../../CONTRIBUTING.md references with
GitHub URLs since CONTRIBUTING.md is not a Mintlify page.
Generated-By: mintlify-agent
---
 docs/guides/01-adding-parameters.md    |  6 +++---
 docs/guides/02-adding-descriptions.md  |  8 ++++----
 docs/guides/03-parameter-exceptions.md |  6 +++---
 docs/guides/04-documenting-errors.md   |  8 ++++----
 docs/guides/05-adding-new-endpoints.md | 14 +++++++-------
 docs/reference/common-pitfalls.md      |  6 +++---
 docs/reference/file-structure.md       |  4 ++--
 docs/reference/quick-reference.md      |  8 ++++----
 docs/reference/style-guide.md          |  6 +++---
 docs/reference/validation.md           |  6 +++---
 10 files changed, 36 insertions(+), 36 deletions(-)

diff --git a/docs/guides/01-adding-parameters.md b/docs/guides/01-adding-parameters.md
index 7f485db..a1682f2 100644
--- a/docs/guides/01-adding-parameters.md
+++ b/docs/guides/01-adding-parameters.md
@@ -52,6 +52,6 @@ This guide explains how to add parameters to REST API and WebSocket API endpoint
 
 ## Related Guides
 
-- [Adding Overview Descriptions](02-adding-descriptions.md)
-- [Parameter Exceptions](03-parameter-exceptions.md)
-- [Style Guide](../reference/style-guide.md)
+- [Adding Overview Descriptions](/docs/guides/02-adding-descriptions)
+- [Parameter Exceptions](/docs/guides/03-parameter-exceptions)
+- [Style Guide](/docs/reference/style-guide)
diff --git a/docs/guides/02-adding-descriptions.md b/docs/guides/02-adding-descriptions.md
index 4d7591d..d0a1116 100644
--- a/docs/guides/02-adding-descriptions.md
+++ b/docs/guides/02-adding-descriptions.md
@@ -41,11 +41,11 @@ This guide explains how to write effective descriptions for REST and WebSocket e
 - Keep summaries to 10-15 words
 - Use bullet lists for features
 - Always document rate limits
-- Use MDX components appropriately (see [Style Guide](../reference/style-guide.md))
+- Use MDX components appropriately (see [Style Guide](/docs/reference/style-guide))
 - Link to glossary terms on first use
 
 ## Related Guides
 
-- [Style Guide](../reference/style-guide.md)
-- [Documenting Errors](04-documenting-errors.md)
-- [Adding Parameters](01-adding-parameters.md)
+- [Style Guide](/docs/reference/style-guide)
+- [Documenting Errors](/docs/guides/04-documenting-errors)
+- [Adding Parameters](/docs/guides/01-adding-parameters)
diff --git a/docs/guides/03-parameter-exceptions.md b/docs/guides/03-parameter-exceptions.md
index 2ab5f97..0afc548 100644
--- a/docs/guides/03-parameter-exceptions.md
+++ b/docs/guides/03-parameter-exceptions.md
@@ -71,6 +71,6 @@ postOnly:
 
 ## Related Guides
 
-- [Adding Parameters](01-adding-parameters.md)
-- [Documenting Errors](04-documenting-errors.md)
-- [Style Guide](../reference/style-guide.md)
+- [Adding Parameters](/docs/guides/01-adding-parameters)
+- [Documenting Errors](/docs/guides/04-documenting-errors)
+- [Style Guide](/docs/reference/style-guide)
diff --git a/docs/guides/04-documenting-errors.md b/docs/guides/04-documenting-errors.md
index 4acffaa..b15917a 100644
--- a/docs/guides/04-documenting-errors.md
+++ b/docs/guides/04-documenting-errors.md
@@ -74,7 +74,7 @@ description: |
 
 ## Common Error Codes
 
-See [Quick Reference](../reference/quick-reference.md#common-error-codes) for the full list of error codes.
+See [Quick Reference](/docs/reference/quick-reference#common-error-codes) for the full list of error codes.
 
 ## Best Practices
 
@@ -86,6 +86,6 @@ See [Quick Reference](../reference/quick-reference.md#common-error-codes) for th
 
 ## Related Guides
 
-- [Adding Descriptions](02-adding-descriptions.md)
-- [Quick Reference](../reference/quick-reference.md)
-- [Common Pitfalls](../reference/common-pitfalls.md)
+- [Adding Descriptions](/docs/guides/02-adding-descriptions)
+- [Quick Reference](/docs/reference/quick-reference)
+- [Common Pitfalls](/docs/reference/common-pitfalls)
diff --git a/docs/guides/05-adding-new-endpoints.md b/docs/guides/05-adding-new-endpoints.md
index e79c0df..bbdcd06 100644
--- a/docs/guides/05-adding-new-endpoints.md
+++ b/docs/guides/05-adding-new-endpoints.md
@@ -7,7 +7,7 @@ This guide walks you through adding completely new REST or WebSocket endpoints t
 **Checklist**:
 - [ ] Backend engineer confirmed endpoint is implemented
 - [ ] You have example request/response from staging/production
-- [ ] You know which file to edit (see [File Structure](../reference/file-structure.md))
+- [ ] You know which file to edit (see [File Structure](/docs/reference/file-structure))
 - [ ] You have a similar endpoint to copy from
 
 ## REST API New Endpoint (Step-by-Step)
@@ -19,7 +19,7 @@ This guide walks you through adding completely new REST or WebSocket endpoints t
 **Key elements to add**:
 - `paths` → `/api/v4/your-endpoint` → `post` or `get`
 - `summary`, `description`, `tags`, `security`
-- `requestBody` with parameters (see [Adding Parameters](01-adding-parameters.md))
+- `requestBody` with parameters (see [Adding Parameters](/docs/guides/01-adding-parameters))
 - `responses` with `$ref` to schemas
 - Add response schema in `components/schemas` if new
 
@@ -90,8 +90,8 @@ Edit `docs.json` → find appropriate `group` → add page path (without `.mdx`
 
 ## Related Guides
 
-- [File Structure Decision Tree](../reference/file-structure.md)
-- [Adding Parameters](01-adding-parameters.md)
-- [Adding Descriptions](02-adding-descriptions.md)
-- [Documenting Errors](04-documenting-errors.md)
-- [Validation Guide](../reference/validation.md)
+- [File Structure Decision Tree](/docs/reference/file-structure)
+- [Adding Parameters](/docs/guides/01-adding-parameters)
+- [Adding Descriptions](/docs/guides/02-adding-descriptions)
+- [Documenting Errors](/docs/guides/04-documenting-errors)
+- [Validation Guide](/docs/reference/validation)
diff --git a/docs/reference/common-pitfalls.md b/docs/reference/common-pitfalls.md
index 7711f40..17cacfc 100644
--- a/docs/reference/common-pitfalls.md
+++ b/docs/reference/common-pitfalls.md
@@ -115,6 +115,6 @@ tags:
 
 ## Related Documentation
 
-- [Validation Guide](validation.md) - How to validate your changes
-- [Adding Parameters](../guides/01-adding-parameters.md) - Parameter best practices
-- [CONTRIBUTING.md](../../CONTRIBUTING.md) - Full workflow
+- [Validation Guide](/docs/reference/validation) - How to validate your changes
+- [Adding Parameters](/docs/guides/01-adding-parameters) - Parameter best practices
+- [CONTRIBUTING.md](https://github.com/whitebit-exchange/docs/blob/main/CONTRIBUTING.md) - Full workflow
diff --git a/docs/reference/file-structure.md b/docs/reference/file-structure.md
index 9617ceb..d6301a3 100644
--- a/docs/reference/file-structure.md
+++ b/docs/reference/file-structure.md
@@ -116,5 +116,5 @@ All page references go in `docs.json` at the root:
 
 ## Related Documentation
 
-- [Adding New Endpoints](../guides/05-adding-new-endpoints.md)
-- [Quick Reference](quick-reference.md)
+- [Adding New Endpoints](/docs/guides/05-adding-new-endpoints)
+- [Quick Reference](/docs/reference/quick-reference)
diff --git a/docs/reference/quick-reference.md b/docs/reference/quick-reference.md
index 79aa940..95c5325 100644
--- a/docs/reference/quick-reference.md
+++ b/docs/reference/quick-reference.md
@@ -126,7 +126,7 @@ find asyncapi -name "*.yaml" -exec asyncapi validate {} \;
 
 ## Related Documentation
 
-- [Style Guide](style-guide.md) - Detailed writing guidelines
-- [File Structure](file-structure.md) - Which file to edit
-- [Validation Guide](validation.md) - Testing your changes
-- [Common Pitfalls](common-pitfalls.md) - Avoid mistakes
+- [Style Guide](/docs/reference/style-guide) - Detailed writing guidelines
+- [File Structure](/docs/reference/file-structure) - Which file to edit
+- [Validation Guide](/docs/reference/validation) - Testing your changes
+- [Common Pitfalls](/docs/reference/common-pitfalls) - Avoid mistakes
diff --git a/docs/reference/style-guide.md b/docs/reference/style-guide.md
index a862a46..f92fcfc 100644
--- a/docs/reference/style-guide.md
+++ b/docs/reference/style-guide.md
@@ -97,6 +97,6 @@ Focus on: Use cases, best practices, common scenarios
 
 ## Related Documentation
 
-- [Quick Reference](quick-reference.md) - MDX components, file patterns
-- [Common Pitfalls](common-pitfalls.md) - Avoid mistakes
-- [CONTRIBUTING.md](../../CONTRIBUTING.md) - Review checklists
+- [Quick Reference](/docs/reference/quick-reference) - MDX components, file patterns
+- [Common Pitfalls](/docs/reference/common-pitfalls) - Avoid mistakes
+- [CONTRIBUTING.md](https://github.com/whitebit-exchange/docs/blob/main/CONTRIBUTING.md) - Review checklists
diff --git a/docs/reference/validation.md b/docs/reference/validation.md
index 3d18c63..3f897b4 100644
--- a/docs/reference/validation.md
+++ b/docs/reference/validation.md
@@ -147,6 +147,6 @@ Solution: Move properties to allOf or separate schema
 
 ## Related Documentation
 
-- [CONTRIBUTING.md](../../CONTRIBUTING.md) - Full contribution workflow
-- [Common Pitfalls](common-pitfalls.md) - Avoid common mistakes
-- [Adding New Endpoints](../guides/05-adding-new-endpoints.md) - Complete guide
+- [CONTRIBUTING.md](https://github.com/whitebit-exchange/docs/blob/main/CONTRIBUTING.md) - Full contribution workflow
+- [Common Pitfalls](/docs/reference/common-pitfalls) - Avoid common mistakes
+- [Adding New Endpoints](/docs/guides/05-adding-new-endpoints) - Complete guide