# Exness API Developer Portal > Consolidated implementation guide and API reference for Trading, Partnership, Payments and Exness MCP. Documentation snapshot from the public portal on 2026-11-19. The guides are summarized and linked by page. Reference blocks preserve the published operation IDs, parameters, schemas, status codes and public error identifiers. Follow the linked originals for complete narrative descriptions and runnable examples. Read Authentication first. Product sections cover onboarding and recovery. Each API reference section contains its own OpenAPI component definitions. Resolve references such as `#/components/schemas/TransferRequest` within the same product. ## Getting started ### Exness API overview Choose Trading for account, execution and market-data integrations. Choose Partnership for attribution, campaign, report and rebate workflows. Choose Payments for supported Exness account transfers and balance reads. Start with a product-enabled key, appropriate scopes and the product-specific host. For Trading, resolve the Access Point for each account through the Gateway before requests or connections. [Source](https://www.exness-api.com/) ## Authentication ### API Key & Host Setup In Personal Area, open Key Management, create a key, select the scopes and configure expiry, IP restrictions and account access where available. Trading Full access is tied to one account. Trading Read-only permits 1–10 accounts. Partnership offers Full access and Read-only. Internal transfers requires Trading or Partnership Full access. Partner transfers requires Partnership access at either level. Exness-generated signing material is a 128-character hex string. Its first 32 bytes are the Ed25519 seed and its final 32 bytes are the public key. If you generate your own key using OpenSSL with Ed25519 support, the documented private-key format is unencrypted PKCS#8 PEM. Register the entire DER SubjectPublicKeyInfo public key in standard padded Base64, on one line. Use the API key identifier in `EXN-API-KEY` and keep the private key on the backend. The registered public key and the API key identifier serve different purposes. For Trading, get the Gateway URL from the DNS widget in Key Management. Discover the account Access Point before account requests or WebSocket handshakes. For Partnership and Payments, use the host provisioned for product access. Revoke and replace any leaked key. [Source](https://www.exness-api.com/authentication/api-key-and-host-setup) ### Authentication Construct a UTF-8 JSON object with `api_key`, `idempotency_key`, `timestamp`, `sign_version`, `method`, `path` and `body_hash`. Use Unix milliseconds, sign version `1`, the uppercase method and the exact path with its transmitted query. Exclude the scheme and host from the signed path. Hash the transmitted body bytes with SHA-256 and encode the hash as unpadded base64url. The empty-body hash is `47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU`. Encode the serialized payload bytes as unpadded base64url in `EXN-DATA`. Sign those same serialized bytes with Ed25519 and encode the result as unpadded base64url in `EXN-SIGN`. Set `EXN-API-KEY`, `EXN-TIMESTAMP` and `EXN-SIGN-VERSION` to values matching the payload. Serialize the body and build the query before signing. Keep their wire representations unchanged through transport. Generate a fresh timestamp and signature per attempt. Trading and Payments signed reads send an empty `EXN-IDEMPOTENCY-KEY` header and an empty signed `idempotency_key`. Writes use the product-specific key format. Partnership requests omit the header and use an empty signed `idempotency_key` even for writes. Partnership query serialization is parameter-specific and certain filters, such as conversion `tags`, use repeated keys. Refer to the selected product contract for the exact operation behavior. [Source](https://www.exness-api.com/authentication/request-signing) ## Trading ### Trading API overview Access requires an eligible Exness-platform trading account and the applicable identity and address verification. Obtain the account ID and a key scoped to it. Discover the Access Point, then verify a signed read before starting state synchronization or sending trading operations. Current market-data and trading coverage excludes stocks and indices, including their suffix variants. [Source](https://www.exness-api.com/trading/get-started) ### Access Point / Host Discovery Use the DNS widget’s Gateway host and send signed `GET /v1/trading/access-point?account_id={account_id}` with an unsigned 64-bit account ID as a decimal string. Include the exact query in the signed path and send the empty idempotency header. HTTP 200 supplies `access_point` and echoes `account_id` as a string. Cache the result by account because discovery is rate-limited. Use the returned URL for account REST requests and its host for signed WebSocket handshakes. Resolve through Key Management again if the Gateway details need refreshing. [Source](https://www.exness-api.com/trading/get-started/access-point-host-discovery) ### Send Your First Request After discovery, sign `GET /v1/configuration/accounts/{account_id}/account` against that account’s Access Point. The read verifies the key, signature and account access. The account schema covers configuration such as currency, leverage and the margin call and stop-out thresholds. [Source](https://www.exness-api.com/trading/get-started/send-first-request) ### Recommended Integration Flow Start with credentials, discovery and a signed account read. Load effective limits and read the available instruments and relevant conditions. Establish the stream for your workflow and synchronize state. For a Trading Full-access workflow, persist the idempotency key before sending a mutation and track the ACK through a final event or operation-status read. Coordinate retries with the published error contract. [Source](https://www.exness-api.com/trading/get-started/recommended-integration-flow) ### Place Your First Trade Use Trading Full access. Read the instrument’s trade mode, session, volume and margin constraints and subscribe to transactions. Send an open-position request to `POST /v1/trading/accounts/{account_id}/positions` with `instrument`, `side`, `volume` as a decimal string and a non-empty idempotency header. Store `operation_id` and `client_request_id` from the HTTP 202 ACK. Wait for `transaction_event` or query operation status before recording the final outcome. [Source](https://www.exness-api.com/trading/get-started/place-first-trade) ### Subscribe To WebSocket Events Connect to `/v1/server-events/accounts/{account_id}/ws/ticks` for ticks and to `/v1/server-events/accounts/{account_id}/ws/events` for transactions, account state, instruments and HMR. Sign the actual connection path and query as a GET handshake. On an open socket, send a JSON message with an `id` and nested `subscribe` object. Set `subscribe.event` to `ticks`, `transactions`, `account_state`, `instruments` or `hmr` on the corresponding socket. Include `subscribe.instruments` for ticks and HMR. An instrument subscription can target selected symbols or follow the default described in the reference. After a disconnect, back off, generate fresh handshake headers, resubscribe, and reconcile local state against fresh snapshots where available before applying updates. Treat `transaction_event` as a change set. [Source](https://www.exness-api.com/trading/get-started/subscribe-to-websocket-events) ### Core Concepts An order is an instruction, a position is live exposure and a deal represents an execution or financial event. Use the account snapshot and events to build the current state. Read closed orders and deals through history. Account permissions, instrument conditions, trading sessions, leverage and HMR influence whether a request is accepted or executes. [Source](https://www.exness-api.com/trading/core-concepts) ### Guides Overview Use runtime semantics for the state model and recovery, formulas for local calculations, effective limits for scheduling and troubleshooting for request and execution errors. Match implementation details to the linked operation schema. [Source](https://www.exness-api.com/trading/guides) ### API Configuration and Limits Call `GET /v1/configuration/accounts/{account_id}/limits` at startup. REST limits span the Access Point cluster and include an account budget plus operation limits. WebSocket limits apply per node and include connection and message budgets plus limits per endpoint and subscription type. Calculate local consumption and refresh effective limits when conditions change. Apply backoff after HTTP 429. Use `limits.rest.methods[].limits` with the relevant `api_operation_id` to find documented constants. For `getDealsHistory`, `history_age_days` measures the maximum lookback for `from` and `history_range_days` caps one interval. Both are optional configuration fields. Cursor pagination applies within a permitted interval. These values describe query constraints and data retention is separate. [Source](https://www.exness-api.com/trading/guides/api-configuration-and-limits) ### Runtime Semantics Trading mutations return an ACK and later finalize through `transaction_event` and operation status. Event status is `success`, `rejected` or `failed`. Operation status uses `pending`, `confirmed`, `rejected` or `failed`. Query `GET /v1/trading/accounts/{account_id}/operations/{operation_id}` to recover a missing final result. The guide documents 24-hour retention for operation status. This is separate from the finite idempotency retention period. Trading write keys use 5–128 characters in `[A-Za-z0-9._~-]`. Matching retries return the original operation ID within the retention period. Key reuse with a different payload is a conflict for the same account and operation kind. A new `transactions` subscription supplies `trading_state_snapshot` followed by incremental events. To recover a gap or reconnect, replace state using a fresh snapshot. Keep cursor tokens opaque, generally combine them only with `limit`, and retain the returned order. Candle queries require `from` and either `to` or a positive or negative nonzero `count` between −1000 and 1000, subject to effective limits. A time range includes the lower bound and excludes the upper bound and results are oldest first. Account amounts and trading prices and volumes use decimal strings as specified. Tick prices and candle OHLC values are JSON numbers. The `account_state` stream supplies periodic floating state, currently on a shared two-second cadence. Transaction events carry balance changes. Instrument updates contain the complete condition object. HMR uses `hmr_snapshot` and `hmr_update` on Server Events. For a missing or empty `order_types`, still apply the endpoint, session and runtime restrictions. In close-only mode, permit closing positions or canceling orders according to the operation’s contract. [Source](https://www.exness-api.com/trading/guides/runtime-semantics) ### Formulas & Calculations Use decimal arithmetic and calculate in account currency. Equity equals balance plus floating PnL. Free margin equals equity minus used margin. Margin level is 100 times equity divided by used margin when used margin is positive. Calculate long floating PnL with the latest bid minus entry price and short PnL with entry price minus the latest ask. Multiply by lots, contract size and the quote-to-account conversion rate. Used margin depends on lots, contract size, margin conversion and the applicable factor. Multiply by open price for CFD modes. The factor follows leverage for Forex and CFDLeverage and instrument margin percentage for ForexNoLeverage and CFD. Account for hedged versus unhedged volume and for effective leverage during HMR. Use account and instrument configuration for thresholds and settings. Currency conversion tries identical currencies, a direct pair, a reverse pair, then two legs through USD. Bid and ask selection depends on the conversion direction. The guide documents the direction rules separately for `ProfitRate` and `MarginRate`. [Source](https://www.exness-api.com/trading/guides/formulas-calculations) ### Code Examples The portal supplies a read-only example in TypeScript, Python and Go. It imports either the generated hex key or a PKCS#8 PEM key, signs discovery and signs the account read through the returned Access Point. The page includes a signing test vector and TypeScript patterns for ticks, instruments, HMR, account-state monitoring, trade submission and operation polling. [Source](https://www.exness-api.com/trading/guides/code-examples) ### Troubleshooting Your API Requests First identify whether the failure is HTTP/REST, a WebSocket reply or a finalized execution result. Follow `code` and `error_message` for API responses. A 403 with HTML or plain text can come from infrastructure and calls for checking host and network access. For HTTP 202 with no subsequent event, use operation status and rebuild stream state if needed. Inspect instrument permissions, market hours, volume steps, price levels and margin rules for business errors. Apply backoff for recoverable failures and preserve the idempotency key on a safe retry. [Source](https://www.exness-api.com/trading/guides/troubleshooting) ### Changelog — Releases The Trading release table has zero entries in this snapshot. [Source](https://www.exness-api.com/trading/changelog/releases) ### Changelog — Breaking Changes The Trading breaking-change table has zero entries in this snapshot. [Source](https://www.exness-api.com/trading/changelog/breaking-changes) ### Changelog — Deprecations The Trading deprecation table has zero entries in this snapshot. [Source](https://www.exness-api.com/trading/changelog/deprecations) ## Partnership ### Partnership API overview Use your provisioned Partnership API host, a verified partner account and an API key with `partnership.all:read` or `partnership.all`. Verify the connection by reading the default link. Select the guide based on the entity your workflow uses: a partner link, campaign, client, trading account, reward, rebate or referral agent. [Source](https://www.exness-api.com/partnership/get-started) ### Send Your First Request Send `GET /v1/partnership/partner/default-link` with Partnership read access. Omit `EXN-IDEMPOTENCY-KEY` and sign an empty `idempotency_key`. A successful response includes the default link in `full_default_link` and `url`, plus `domain`, `code` and `path`. The code examples page links to a runnable signing example. [Source](https://www.exness-api.com/partnership/get-started/send-first-request) ### Recommended Integration Flow Verify a signed read, choose the domain workflow and preserve returned identifiers for later reads. Apply the relevant request budgets and pagination rules. Keep report filters and ordering stable during pagination. For a lost write response, read the affected resource or list to check current state before deciding whether to resubmit. [Source](https://www.exness-api.com/partnership/get-started/recommended-integration-flow) ### Core Concepts Client-level attribution and an individual trading account’s attribution may point to different partners. Join with the IDs documented for each report. Campaigns group trackable links. The selected endpoint determines whether it accepts `campaign_code`, `partner_code` or `link_code`. `partner_code` and `link_code` identify the same link. Eligible closed orders can contribute reward orders, which are aggregated into partner rewards. A subpartner can earn first-level rewards while the master partner earns second-level rewards. A referral agent instead uses a master partner’s dedicated link, with the applicable agreement selected by its effective dates. A rebate returns a share of a reward to a client. A rebate row records the result for an account, while a payment aggregates rows. Reports are updated asynchronously. Preserve null values when fields are unavailable or masked, parse amounts as decimals and use each schema’s timestamp and date-filter types. Current tier, qualification tier and progress reward represent different facts. [Source](https://www.exness-api.com/partnership/core-concepts) ### Guides Overview Use this hub to move from onboarding to links and attribution, campaigns, reports, rebates, referral agents or partner tiers. The operation reference names the supported request fields and response schemas. [Source](https://www.exness-api.com/partnership/guides) ### Partner Links and Attribution Read `/v1/partnership/partner/default-link` and `/v1/partnership/partner/links` to collect public URLs and codes. `POST /v1/partnership/affiliation` checks a client email and is a read operation despite using POST. Custom codes are created with `POST /v1/partnership/partner/codes` under write scope. Read the link list after an uncertain create to check for the intended code. [Source](https://www.exness-api.com/partnership/guides/partner-profile-links) ### Campaigns Create a campaign with a title using `POST /v1/partnership/campaigns`. It creates the initial link. `reward_schema` accepts `revenue_share` and `cpa`, with `revenue_share` as the default. Store `campaign_code`. To add links, send a domain to the campaign’s links operation. Read campaign details and use the performance report matching the attribution dimensions you need. PATCH supports title, description and archive state. Campaign reads can verify fields they return, such as title or archive state. For an uncertain description change, consult the source recovery guidance because the read schema omits that field. [Source](https://www.exness-api.com/partnership/guides/campaigns) ### Reports Use Clients for a referred person, Client accounts for trading-account attribution and Client transactions for closed-order detail. Use Reward history for credited rewards, IB performance for grouped activity, and Conversion for acquisition and funnel metrics. The IB performance operation requires one or two grouping dimensions. Conversion requires a non-empty `ordering`; for example, `group_by=day&ordering=-day`. Conversion `tags` are repeated query keys. For other arrays, use the selected parameter’s OpenAPI serialization. Use stable `limit`, `offset` progression, filters and ordering where documented. Read totals from response metadata when supplied. Reconcile recent data again when lag matters and account for nullable or masked report identifiers. The Client transactions report offers its own filters and omits campaign and link filters. [Source](https://www.exness-api.com/partnership/guides/reports) ### Rebates Use the batch, client, group and rule operations for configuration and inspection. Empty a group of assigned clients before deleting it. Include `rebate_percent` on a group update, inspect `need_approve` and handle approval through the separate process. Non-default rules are evaluated in ascending priority, with conditions based on USD or lots. Compare batch amounts and outcomes against the individual rows and payment records. A processed batch can contain rejected rows. Some row views report `APPROVED` as `PROCESSING`. The payment list can present `PENDING` as `PROCESSING` while a payment’s row totals can preserve `PENDING`. Consult the endpoint-specific status fields before interpreting the outcome. Reconcile a questionable write by reading the affected settings or rows. [Source](https://www.exness-api.com/partnership/guides/autorebates) ### Referral Agents Create a link with a unique alias for the partner and an existing registered user’s email. Store the returned `agent_link_id`. Read detail to inspect access and reward share, use PATCH for aliases, and archive an active link to stop new referrals. Returned agreement and shared-report fields describe configuration. The exposed write operations cover link creation, alias changes and archiving. [Source](https://www.exness-api.com/partnership/guides/referral-agents) ### Partner Tiers and Progress Rewards Read current tier state and qualification progress. Use `page` and `page_size` for tier conditions and `tier_id` for the fixed-per-lot matrix. Lot commission uses the documented `symbol` and `account_type` inputs. Preserve null in first- and second-level commission percentages. List progress rewards and follow `compensation_id` to details. Interpret `payment_date` as a status-update timestamp and check payment records for the actual outcome. [Source](https://www.exness-api.com/partnership/guides/partner-tiers) ### API Configuration and Limits The shared budget is 600 requests per 60 seconds per partner across keys. Additional limits per 60 seconds include 100 affiliation checks, 5 referral-agent link creates and 60 referral-agent archives. Use both applicable limits. Common list and report limits in the guide cap pages at 1000 rows, with defaults varying by operation. Reference each operation’s own `limit` parameter. The guide lists maximum date ranges of 366 days for daily registrations, 180 days for conversion grouped by day and 32 days for client transactions. On 429, reduce the request rate and honor the returned retry timing. [Source](https://www.exness-api.com/partnership/guides/api-configuration-and-limits) ### Code Examples The official sample demonstrates a signed default-link request and separates numeric authentication/processing errors from Partnership string-code errors. Configure the provisioned API host and key material before running it. [Download the official first-request.mjs example](https://www.exness-api.com/examples/partnership/first-request.mjs). [Source](https://www.exness-api.com/partnership/guides/code-examples) ### Troubleshooting Your API Requests For product errors, branch on HTTP status and the string `code`; `details` can provide field-level validation. Authentication and processing failures use numeric `code` plus `error_message`. The documented Partnership scope error is `1002 / AUTH_FORBIDDEN`. A numeric rate-limit response can include an RFC 3339 `retry_after` timestamp, while the `Retry-After` header is seconds. Back off on recoverable read errors. For an uncertain write, inspect state before resending because this API provides no write idempotency. [Source](https://www.exness-api.com/partnership/guides/troubleshooting) ### Changelog — Releases The Partnership release table has zero entries in this snapshot. [Source](https://www.exness-api.com/partnership/changelog/releases) ### Changelog — Breaking Changes The 2026-10-29 entry requires a non-empty `ordering` value for `GET /v1/partnership/reports/conversion`. Missing or empty values produce HTTP 400. An example for descending daily results is `group_by=day&ordering=-day`. [Source](https://www.exness-api.com/partnership/changelog/breaking-changes) ### Changelog — Deprecations The Partnership deprecation table has zero entries in this snapshot. [Source](https://www.exness-api.com/partnership/changelog/deprecations) ## Payments ### Payments API overview Payments supports eligible Exness-platform wallets and trading accounts. Internal transfers moves funds between your own accounts. Partner transfers allows eligible partners to pay another Exness client from a Partner Reward Wallet. Use the API host provided during onboarding and run a signed read before creating a transfer. [Source](https://www.exness-api.com/payments/get-started) ### Send Your First Request Use `GET /v1/accounts/{account_id}/balance` against the provisioned host. Select an accessible account or wallet and preserve its number as a string. Use a fresh signature with an empty signed idempotency value and empty idempotency header. HTTP 200 returns `account_id`, `balance` and `currency`. [Source](https://www.exness-api.com/payments/get-started/send-first-request) ### Create and Track a Transfer Optionally read the source balance. Store a new canonical UUID and the request before the first submission. Record each attempt durably before sending. Save the `transfer_id` from a valid HTTP 201 response and query status rather than repeating creation. A transfer may remain `processing` after the local polling budget ends. Use the recovery guide when creation is uncertain and keep the same key for a retry of that transfer. [Source](https://www.exness-api.com/payments/get-started/recommended-integration-flow) ### Core Concepts Use `own_account` with the Internal transfers scope or `another_client` with the Partner transfers scope and the payer’s Reward Wallet. Source and destination identifiers are strings. Only supported accounts on the Exness platform are eligible, which excludes MT4 and MT5 accounts. Supply a positive fixed-point decimal string in the source currency, with precision valid for that currency. The creation response shows source and destination amounts. Conversion is applied where required. After creation, the transfer can be `processing` until `done` or `rejected`. A recipient or sender key can read the transfer with a scope that covers its type. Each creation key is a canonical UUID scoped to the Exness client and survives API key rotation. Keys are permanent for created transfers. A same-key replay with the same source, destination and amount protects against duplicate transfer creation. Pre-idempotency eligibility, funds and limit checks may still return an error. A successful replay returns the original transfer ID and may show recalculated amounts. The definitive amounts can be reconciled in Transaction History. [Source](https://www.exness-api.com/payments/core-concepts) ### Guides Overview Use the guide for your transfer destination type, then follow the status and recovery guides for the relevant outcome. See the official OpenAPI for field and response definitions. [Source](https://www.exness-api.com/payments/guides) ### Read an Account Balance `GET /v1/accounts/{account_id}/balance` reports the transferable balance as a non-negative decimal string in the account currency. Either transfer scope can read an account available to the key. An account lookup can return `ACCOUNT_NOT_FOUND` for inaccessible accounts. Treat the read as point-in-time because the balance can change before creation. [Source](https://www.exness-api.com/payments/guides/account-balance) ### Transfer Between Your Own Accounts Use Internal transfers access and verify both account numbers belong to you. Send `POST /v1/transfers` with `source_account`, `destination_account`, `destination_type` set to `own_account` and a decimal string `amount`. Use a fresh UUID for a new transfer and the original UUID and request for a retry. Persist the transfer ID from HTTP 201 and read status. [Source](https://www.exness-api.com/payments/guides/transfer-own-accounts) ### Transfer to Another Client Set `destination_type` to `another_client`, use the Reward Wallet as source and sign with the Partner transfers scope. Verify the recipient’s supported trading account or wallet. Direct client trading-account numbers can be obtained from the Partnership Client accounts report. Second-level report account numbers can be masked. Persist a distinct UUID for each new payout and use the returned ID to track status. [Source](https://www.exness-api.com/payments/guides/transfer-another-client) ### Check a Transfer Status Use `GET /v1/transfers/{transfer_id}` with the exact identifier returned by creation. A properly scoped key of the sender or recipient can read it. While `processing`, the guide suggests polling every two seconds within request limits and your chosen time budget. `done` and `rejected` are terminal. Use Personal Area Transaction History for details and support for a transfer that stays in processing beyond the chosen budget. [Source](https://www.exness-api.com/payments/guides/transfer-status) ### Recovery and Idempotency Persist one record and UUID per transfer. Immediately before each send, durably mark the attempt in flight, with a single sender per record. Treat timeouts, invalid responses, missing IDs on 201, `TRANSFER_OUTCOME_UNKNOWN`, `SYSTEM_INTERNAL_ERROR` and `SYSTEM_TEMPORARY_UNAVAILABLE` as unknown. Retain the original request and UUID. For each retry, generate fresh signing headers and apply backoff. A subsequent balance, eligibility, permission or rate-limit error can occur before idempotency lookup and may leave the first outcome unknown. If you discontinue submission without a confirmed transfer ID, retire the UUID durably. Reconcile in Transaction History by account numbers, amount and attempt time because the UI omits the UUID. An absent or ambiguous entry calls for support confirmation before resubmitting the same intended transfer with a new key. Once the ID is known, recover by querying status. A deliberate new transfer after a confirmed rejection uses a new UUID. [Source](https://www.exness-api.com/payments/guides/recovery-idempotency) ### API Configuration and Limits Payments documents three requests per second per API key per operation, shared among workers using that key and across account or transfer IDs. Count retries and status polling. Throttle on HTTP 429 / `3015 REQUEST_RATE_LIMIT`, even if it occurs below the published rate. Apply the transfer recovery rules to retries after an uncertain create. [Source](https://www.exness-api.com/payments/guides/api-configuration-and-limits) ### Code Examples The Python examples show the exact signing path and body, API error validation, a balance read, transfer creation and polling, and reuse of the stored UUID after an uncertain outcome. Integrate the example flow with durable persistence before first sending a transfer. [Source](https://www.exness-api.com/payments/guides/code-examples) ### Troubleshooting Your API Requests Branch on the public numeric `code` and matching `error_message`; use `description` for diagnostics. Treat an unrecognized response envelope after creation as an uncertain outcome. Check scopes and IP permissions for 403, the account or transfer ID and access for 404, and UUID/request consistency for `3016 REQUEST_IDEMPOTENCY_KEY_REUSED`. Follow the recovery guide for creation failures whose outcome may still be unknown. [Source](https://www.exness-api.com/payments/guides/troubleshooting) ### Changelog — Releases The Payments release table has zero entries in this snapshot. [Source](https://www.exness-api.com/payments/changelog/releases) ### Changelog — Breaking Changes The Payments breaking-change table has zero entries in this snapshot. [Source](https://www.exness-api.com/payments/changelog/breaking-changes) ### Changelog — Deprecations The Payments deprecation table has zero entries in this snapshot. [Source](https://www.exness-api.com/payments/changelog/deprecations) ## AI agents and MCP ### AI agents Exness MCP exposes tool access to account and partner information and can surface documentation. Tool availability depends on the client and granted permissions. Trading access in MCP is read-only. Partnership capabilities depend on the access selected during authorization and the tools Exness makes available. [Source](https://www.exness-api.com/ai-agents/overview) ### Connect Exness MCP Use the official plugin where available or configure a remote MCP connection at `https://api.exness.com/mcp`. Complete OAuth in Exness Personal Area and select the trading accounts or Partnership access needed. Verify the connection with an actual authorized read, such as a tool call for a selected trading account. [Source](https://www.exness-api.com/ai-agents/exness-mcp/connect) ### Connect Exness in ChatGPT and Codex In the Plugins view, find Exness and connect Exness MCP. Complete the Exness browser authorization and return to the assistant. Select Exness in the composer or in the Codex sources controls as documented by the portal. [Source](https://www.exness-api.com/ai-agents/exness-mcp/openai-plugin) ### Connect Exness by URL in ChatGPT Where custom MCP is enabled for the account or workspace, add a remote MCP server using the Exness URL and OAuth. Create the connection, select Connect and complete the Exness account and permission selection. [Source](https://www.exness-api.com/ai-agents/exness-mcp/openai-mcp-url) ### Connect Exness by URL in Codex The portal documents Streamable HTTP in Codex Desktop. From the CLI, configure the URL with `codex mcp add exness --url https://api.exness.com/mcp`. Run `codex mcp login exness` if authorization has yet to open, and check configured servers with `codex mcp list`. Verify account access through a tool call after completing authorization. [Source](https://www.exness-api.com/ai-agents/exness-mcp/codex-mcp-url) ### Connect Exness in Claude Find the plugin published by Exness. Follow the browser continuation prompt, sign in to Exness and authorize only the accounts and Partnership access needed for the workflow. Return to Claude to verify the selected access. [Source](https://www.exness-api.com/ai-agents/exness-mcp/claude-plugin) ### Connect Exness by URL in Claude In Claude, add a custom connector with the Exness MCP URL, then follow the detected sign-in and registration steps. In Claude Code, the portal uses `claude mcp add --transport http exness https://api.exness.com/mcp`. Start Claude Code in the same project and use `/mcp` to authorize and check the server status. [Source](https://www.exness-api.com/ai-agents/exness-mcp/claude-mcp-url) ### Connect Exness to other AI assistants Add `https://api.exness.com/mcp` through the client’s remote server configuration. Complete the Exness OAuth flow and review the selected permissions. The tool list depends on the capabilities of the client and the authorized access. [Source](https://www.exness-api.com/ai-agents/exness-mcp/other-mcp-clients) ### Troubleshooting Exness MCP Confirm the official publisher or server URL and check whether the assistant or workspace permits the connection. If access expired or was revoked, reauthorize and select the intended accounts. Verify the connection with an appropriate account tool. For a possibly successful change after an error, check the current state before retrying. Provide support with the client, connection method, failing step and sanitized error. [Source](https://www.exness-api.com/ai-agents/exness-mcp/troubleshooting) ### Disclaimer The portal’s disclaimer treats AI outputs as informational and directs users to verify them against official records and applicable terms. Trading tools are limited to reads. Enabled Partnership changes depend on Exness authorization and applicable confirmations. Consult the original disclaimer for the terms and legal scope. [Source](https://www.exness-api.com/ai-agents/disclaimer) ## Trading API reference ### Exness Trader API API version `1.0.2` · OpenAPI `3.1.1`. Use a discovered account Access Point. Read operations and WebSocket handshakes use an empty idempotency header. Trading mutations use a non-empty key and can return HTTP 202 before execution. The discovery route itself is documented in the [Gateway guide](https://www.exness-api.com/trading/get-started/access-point-host-discovery). [Reference introduction](https://www.exness-api.com/reference/trading/exness-trader-api) · [Official OpenAPI YAML](https://www.exness-api.com/openapi/trading.public.yaml) ### Historical Market Data #### Get candle history `GET /v1/market-data/accounts/{account_id}/candles` · Operation ID `getCandleHistory`. Use `from` with either `to` or `count`. The `to` bound is exclusive. Effective history and count limits are available from the limits endpoint. [Operation reference](https://www.exness-api.com/reference/trading/get-candle-history) ```json { "tags": ["Historical Market Data"], "operationId": "getCandleHistory", "x-public-error-codes": [ "REQUEST_INVALID", "REQUEST_INVALID_PARAMETERS", "REQUEST_INVALID_TIMEFRAME", "REQUEST_INVALID_TIME_RANGE", "REQUEST_INVALID_COUNT", "REQUEST_INVALID_PRICE_TYPE", "AUTH_INVALID_API_KEY", "AUTH_INVALID_SIGNATURE", "AUTH_PERMISSION_DENIED", "ACCOUNT_NOT_FOUND", "MARKET_INSTRUMENT_NOT_FOUND", "MARKET_NO_QUOTES", "REQUEST_RATE_LIMIT", "SYSTEM_TEMPORARY_UNAVAILABLE", "SYSTEM_INTERNAL_ERROR" ], "parameters": [ {"$ref": "#/components/parameters/AccountIdPath"}, {"name": "instrument", "in": "query", "required": true, "schema": {"$ref": "#/components/schemas/InstrumentName"}}, { "name": "price_type", "in": "query", "required": false, "schema": {"type": "string", "enum": ["bid", "ask", "both"], "default": "bid"} }, { "name": "timeframe", "in": "query", "required": true, "schema": { "type": "string", "enum": ["S1", "S5", "S15", "M1", "M3", "M5", "M10", "M15", "M30", "H1", "H2", "H4", "D1", "W1", "MN"] } }, {"name": "from", "in": "query", "required": true, "schema": {"type": "string", "format": "date-time"}}, {"name": "to", "in": "query", "required": false, "schema": {"type": "string", "format": "date-time"}}, { "name": "count", "in": "query", "required": false, "schema": {"oneOf": [{"type": "integer", "maximum": -1}, {"type": "integer", "minimum": 1}]} } ], "responses": { "200": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CandleHistoryResponse"}}}}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/AccountNotFound"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"}, "500": {"$ref": "#/components/responses/InternalServerError"} } } ``` ### Trading #### Place pending order `POST /v1/trading/accounts/{account_id}/orders` · Operation ID `placePendingOrder`. [Operation reference](https://www.exness-api.com/reference/trading/place-pending-order) ```json { "tags": ["Trading"], "x-runtime-restrictions": ["trading_disabled", "close_only"], "operationId": "placePendingOrder", "x-public-error-codes": [ "REQUEST_INVALID", "REQUEST_INVALID_PARAMETERS", "REQUEST_INVALID_PRICE", "REQUEST_UNSUPPORTED_MEDIA_TYPE", "AUTH_INVALID_API_KEY", "AUTH_INVALID_SIGNATURE", "AUTH_PERMISSION_DENIED", "ACCOUNT_NOT_FOUND", "REQUEST_RATE_LIMIT", "SYSTEM_TEMPORARY_UNAVAILABLE", "SYSTEM_INTERNAL_ERROR" ], "x-public-async-error-codes": [ "ACCOUNT_NOT_FOUND", "ACCOUNT_DISABLED", "ACCOUNT_CLOSE_ONLY", "REQUEST_INVALID", "REQUEST_INVALID_PARAMETERS", "REQUEST_INVALID_PRICE", "MARKET_INSTRUMENT_NOT_FOUND", "MARKET_TRADE_DISABLED", "MARKET_CLOSE_ONLY", "MARKET_SESSION_CLOSED", "MARKET_NO_QUOTES", "TRADING_RULE_INVALID_VOLUME", "TRADING_RULE_VOLUME_TOO_SMALL", "TRADING_RULE_VOLUME_TOO_LARGE", "TRADING_RULE_INVALID_VOLUME_STEP", "TRADING_RULE_INVALID_PRICE_LEVELS", "TRADING_RULE_INSUFFICIENT_MARGIN", "TRADING_RULE_MARGIN_LEVEL_TOO_LOW", "TRADING_RULE_OPERATION_RESTRICTED", "TRADING_RULE_TOO_MANY_PENDING_ORDERS", "EXECUTION_REQUOTE", "EXECUTION_REJECTED", "SYSTEM_RATE_LIMIT", "SYSTEM_TEMPORARY_UNAVAILABLE", "SYSTEM_INTERNAL_ERROR" ], "parameters": [{"$ref": "#/components/parameters/AccountIdPath"}], "requestBody": { "required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NewPendingOrderRequest"}}} }, "responses": { "202": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/AckResponse"}}}}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/AccountNotFound"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"}, "500": {"$ref": "#/components/responses/InternalServerError"} } } ``` #### Modify active order `PATCH /v1/trading/accounts/{account_id}/orders/{order_id}` · Operation ID `modifyOrder`. [Operation reference](https://www.exness-api.com/reference/trading/modify-order) ```json { "tags": ["Trading"], "x-runtime-restrictions": ["trading_disabled", "close_only"], "operationId": "modifyOrder", "x-public-error-codes": [ "REQUEST_INVALID", "REQUEST_INVALID_PARAMETERS", "REQUEST_ORDER_NOT_FOUND", "REQUEST_INVALID_PRICE", "REQUEST_UNSUPPORTED_MEDIA_TYPE", "AUTH_INVALID_API_KEY", "AUTH_INVALID_SIGNATURE", "AUTH_PERMISSION_DENIED", "ACCOUNT_NOT_FOUND", "REQUEST_RATE_LIMIT", "SYSTEM_TEMPORARY_UNAVAILABLE", "SYSTEM_INTERNAL_ERROR" ], "x-public-async-error-codes": [ "ACCOUNT_NOT_FOUND", "ACCOUNT_DISABLED", "ACCOUNT_CLOSE_ONLY", "REQUEST_INVALID", "REQUEST_INVALID_PARAMETERS", "REQUEST_ORDER_NOT_FOUND", "REQUEST_INVALID_PRICE", "MARKET_INSTRUMENT_NOT_FOUND", "MARKET_TRADE_DISABLED", "MARKET_CLOSE_ONLY", "MARKET_SESSION_CLOSED", "MARKET_NO_QUOTES", "TRADING_RULE_INVALID_PRICE_LEVELS", "EXECUTION_REQUOTE", "EXECUTION_REJECTED", "SYSTEM_RATE_LIMIT", "SYSTEM_TEMPORARY_UNAVAILABLE", "SYSTEM_INTERNAL_ERROR" ], "parameters": [ {"$ref": "#/components/parameters/AccountIdPath"}, {"name": "order_id", "in": "path", "required": true, "schema": {"$ref": "#/components/schemas/UInt64String"}} ], "requestBody": { "required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ModifyOrderRequest"}}} }, "responses": { "202": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/AckResponse"}}}}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/AccountNotFound"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"}, "500": {"$ref": "#/components/responses/InternalServerError"} } } ``` #### Cancel pending or SLTP order `DELETE /v1/trading/accounts/{account_id}/orders/{order_id}` · Operation ID `cancelPendingOrder`. [Operation reference](https://www.exness-api.com/reference/trading/cancel-pending-order) ```json { "tags": ["Trading"], "x-runtime-restrictions": ["trading_disabled"], "operationId": "cancelPendingOrder", "x-public-error-codes": [ "REQUEST_INVALID", "REQUEST_INVALID_PARAMETERS", "REQUEST_ORDER_NOT_FOUND", "REQUEST_UNSUPPORTED_MEDIA_TYPE", "AUTH_INVALID_API_KEY", "AUTH_INVALID_SIGNATURE", "AUTH_PERMISSION_DENIED", "ACCOUNT_NOT_FOUND", "REQUEST_RATE_LIMIT", "SYSTEM_TEMPORARY_UNAVAILABLE", "SYSTEM_INTERNAL_ERROR" ], "x-public-async-error-codes": [ "ACCOUNT_NOT_FOUND", "ACCOUNT_DISABLED", "REQUEST_INVALID", "REQUEST_INVALID_PARAMETERS", "REQUEST_ORDER_NOT_FOUND", "EXECUTION_REJECTED", "SYSTEM_RATE_LIMIT", "SYSTEM_TEMPORARY_UNAVAILABLE", "SYSTEM_INTERNAL_ERROR" ], "parameters": [ {"$ref": "#/components/parameters/AccountIdPath"}, {"name": "order_id", "in": "path", "required": true, "schema": {"$ref": "#/components/schemas/UInt64String"}} ], "responses": { "202": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/AckResponse"}}}}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/AccountNotFound"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"}, "500": {"$ref": "#/components/responses/InternalServerError"} } } ``` #### Open position `POST /v1/trading/accounts/{account_id}/positions` · Operation ID `openPosition`. [Operation reference](https://www.exness-api.com/reference/trading/open-position) ```json { "tags": ["Trading"], "x-runtime-restrictions": ["trading_disabled", "close_only"], "operationId": "openPosition", "x-public-error-codes": [ "REQUEST_INVALID", "REQUEST_INVALID_PARAMETERS", "REQUEST_INVALID_PRICE", "REQUEST_UNSUPPORTED_MEDIA_TYPE", "AUTH_INVALID_API_KEY", "AUTH_INVALID_SIGNATURE", "AUTH_PERMISSION_DENIED", "ACCOUNT_NOT_FOUND", "REQUEST_RATE_LIMIT", "SYSTEM_TEMPORARY_UNAVAILABLE", "SYSTEM_INTERNAL_ERROR" ], "x-public-async-error-codes": [ "ACCOUNT_NOT_FOUND", "ACCOUNT_DISABLED", "ACCOUNT_CLOSE_ONLY", "REQUEST_INVALID", "REQUEST_INVALID_PARAMETERS", "REQUEST_INVALID_PRICE", "MARKET_INSTRUMENT_NOT_FOUND", "MARKET_TRADE_DISABLED", "MARKET_CLOSE_ONLY", "MARKET_SESSION_CLOSED", "MARKET_NO_QUOTES", "TRADING_RULE_INVALID_VOLUME", "TRADING_RULE_VOLUME_TOO_SMALL", "TRADING_RULE_VOLUME_TOO_LARGE", "TRADING_RULE_INVALID_VOLUME_STEP", "TRADING_RULE_INVALID_PRICE_LEVELS", "TRADING_RULE_INSUFFICIENT_MARGIN", "TRADING_RULE_MARGIN_LEVEL_TOO_LOW", "TRADING_RULE_OPERATION_RESTRICTED", "TRADING_RULE_TOO_MANY_OPEN_POSITIONS", "EXECUTION_REQUOTE", "EXECUTION_REJECTED", "SYSTEM_RATE_LIMIT", "SYSTEM_TEMPORARY_UNAVAILABLE", "SYSTEM_INTERNAL_ERROR" ], "parameters": [{"$ref": "#/components/parameters/AccountIdPath"}], "requestBody": { "required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OpenPositionRequest"}}} }, "responses": { "202": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/AckResponse"}}}}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/AccountNotFound"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"}, "500": {"$ref": "#/components/responses/InternalServerError"} } } ``` #### Close position `DELETE /v1/trading/accounts/{account_id}/positions/{position_id}` · Operation ID `closePosition`. [Operation reference](https://www.exness-api.com/reference/trading/close-position) ```json { "tags": ["Trading"], "x-runtime-restrictions": ["trading_disabled"], "operationId": "closePosition", "x-public-error-codes": [ "REQUEST_INVALID", "REQUEST_INVALID_PARAMETERS", "REQUEST_POSITION_NOT_FOUND", "REQUEST_INVALID_PRICE", "REQUEST_UNSUPPORTED_MEDIA_TYPE", "AUTH_INVALID_API_KEY", "AUTH_INVALID_SIGNATURE", "AUTH_PERMISSION_DENIED", "ACCOUNT_NOT_FOUND", "REQUEST_RATE_LIMIT", "SYSTEM_TEMPORARY_UNAVAILABLE", "SYSTEM_INTERNAL_ERROR" ], "x-public-async-error-codes": [ "ACCOUNT_NOT_FOUND", "ACCOUNT_DISABLED", "REQUEST_INVALID", "REQUEST_INVALID_PARAMETERS", "REQUEST_POSITION_NOT_FOUND", "REQUEST_INVALID_PRICE", "MARKET_TRADE_DISABLED", "MARKET_SESSION_CLOSED", "MARKET_NO_QUOTES", "TRADING_RULE_INVALID_VOLUME", "TRADING_RULE_VOLUME_TOO_SMALL", "TRADING_RULE_VOLUME_TOO_LARGE", "TRADING_RULE_INVALID_VOLUME_STEP", "TRADING_RULE_INVALID_REMAINING_VOLUME", "TRADING_RULE_MARGIN_LEVEL_TOO_LOW", "TRADING_RULE_OPERATION_RESTRICTED", "EXECUTION_REQUOTE", "EXECUTION_REJECTED", "SYSTEM_RATE_LIMIT", "SYSTEM_TEMPORARY_UNAVAILABLE", "SYSTEM_INTERNAL_ERROR" ], "parameters": [ {"$ref": "#/components/parameters/AccountIdPath"}, {"name": "position_id", "in": "path", "required": true, "schema": {"$ref": "#/components/schemas/UInt64String"}}, { "name": "volume", "in": "query", "required": false, "schema": {"$ref": "#/components/schemas/ClosePositionVolumeString"} }, { "name": "price", "in": "query", "required": false, "schema": {"$ref": "#/components/schemas/InstrumentPriceString"} }, { "name": "deviation", "in": "query", "required": false, "schema": {"allOf": [{"$ref": "#/components/schemas/DecimalString"}]} }, { "name": "close_by_position_id", "in": "query", "required": false, "schema": {"$ref": "#/components/schemas/UInt64String"} } ], "responses": { "202": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/AckResponse"}}}}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/AccountNotFound"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"}, "500": {"$ref": "#/components/responses/InternalServerError"} } } ``` #### Get snapshot `GET /v1/trading/accounts/{account_id}/snapshot` · Operation ID `getTradingStateSnapshot`. Use this snapshot to reconcile current account state, active pending orders and open positions. [Operation reference](https://www.exness-api.com/reference/trading/get-trading-state-snapshot) ```json { "tags": ["Trading"], "x-runtime-restrictions": ["trading_disabled"], "operationId": "getTradingStateSnapshot", "x-public-error-codes": [ "REQUEST_INVALID", "REQUEST_UNSUPPORTED_MEDIA_TYPE", "AUTH_INVALID_API_KEY", "AUTH_INVALID_SIGNATURE", "AUTH_PERMISSION_DENIED", "ACCOUNT_NOT_FOUND", "REQUEST_RATE_LIMIT", "SYSTEM_TEMPORARY_UNAVAILABLE", "SYSTEM_INTERNAL_ERROR" ], "parameters": [{"$ref": "#/components/parameters/AccountIdPath"}], "responses": { "200": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/TradingStateSnapshot"}}}}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/AccountNotFound"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"}, "500": {"$ref": "#/components/responses/InternalServerError"} } } ``` #### Get operation status `GET /v1/trading/accounts/{account_id}/operations/{operation_id}` · Operation ID `getOperationStatus`. Use the operation ID from the HTTP 202 acknowledgement to recover a final result. The runtime guide documents a 24-hour retention period. [Operation reference](https://www.exness-api.com/reference/trading/get-operation-status) ```json { "tags": ["Trading"], "operationId": "getOperationStatus", "x-public-error-codes": [ "REQUEST_INVALID", "REQUEST_INVALID_PARAMETERS", "REQUEST_OPERATION_NOT_FOUND", "AUTH_INVALID_API_KEY", "AUTH_INVALID_SIGNATURE", "AUTH_PERMISSION_DENIED", "ACCOUNT_NOT_FOUND", "REQUEST_RATE_LIMIT", "SYSTEM_TEMPORARY_UNAVAILABLE", "SYSTEM_INTERNAL_ERROR" ], "x-public-async-error-codes": [ "ACCOUNT_NOT_FOUND", "ACCOUNT_DISABLED", "ACCOUNT_CLOSE_ONLY", "REQUEST_INVALID", "REQUEST_INVALID_PARAMETERS", "REQUEST_INVALID_PRICE", "MARKET_INSTRUMENT_NOT_FOUND", "MARKET_TRADE_DISABLED", "MARKET_CLOSE_ONLY", "MARKET_SESSION_CLOSED", "MARKET_NO_QUOTES", "TRADING_RULE_INVALID_VOLUME", "TRADING_RULE_VOLUME_TOO_SMALL", "TRADING_RULE_VOLUME_TOO_LARGE", "TRADING_RULE_INVALID_VOLUME_STEP", "TRADING_RULE_INVALID_REMAINING_VOLUME", "TRADING_RULE_INVALID_PRICE_LEVELS", "TRADING_RULE_INSUFFICIENT_MARGIN", "TRADING_RULE_MARGIN_LEVEL_TOO_LOW", "TRADING_RULE_OPERATION_RESTRICTED", "TRADING_RULE_TOO_MANY_PENDING_ORDERS", "TRADING_RULE_TOO_MANY_OPEN_POSITIONS", "EXECUTION_REQUOTE", "EXECUTION_REJECTED", "SYSTEM_RATE_LIMIT", "SYSTEM_TEMPORARY_UNAVAILABLE", "SYSTEM_INTERNAL_ERROR" ], "parameters": [ {"$ref": "#/components/parameters/AccountIdPath"}, {"name": "operation_id", "in": "path", "required": true, "schema": {"$ref": "#/components/schemas/UInt64String"}} ], "responses": { "200": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/OperationStatusResponse"}}}}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorResponse"}}}}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"}, "500": {"$ref": "#/components/responses/InternalServerError"} } } ``` #### Get orders history `GET /v1/history/accounts/{account_id}/orders` · Operation ID `getOrdersHistory`. [Operation reference](https://www.exness-api.com/reference/trading/get-orders-history) ```json { "tags": ["Trading"], "x-runtime-restrictions": ["trading_disabled"], "operationId": "getOrdersHistory", "x-public-error-codes": [ "REQUEST_INVALID", "REQUEST_INVALID_PARAMETERS", "REQUEST_INVALID_TIME_RANGE", "REQUEST_INVALID_LIMIT", "REQUEST_INVALID_CURSOR", "REQUEST_INVALID_FILTER_COMBINATION", "AUTH_INVALID_API_KEY", "AUTH_INVALID_SIGNATURE", "AUTH_PERMISSION_DENIED", "ACCOUNT_NOT_FOUND", "MARKET_INSTRUMENT_NOT_FOUND", "REQUEST_RATE_LIMIT", "SYSTEM_TEMPORARY_UNAVAILABLE", "SYSTEM_INTERNAL_ERROR" ], "parameters": [ {"$ref": "#/components/parameters/AccountIdPath"}, {"name": "from", "in": "query", "required": false, "schema": {"type": "string", "format": "date-time"}}, {"name": "to", "in": "query", "required": false, "schema": {"type": "string", "format": "date-time"}}, {"name": "cursor", "in": "query", "required": false, "schema": {"type": "string"}}, { "name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "default": 100, "minimum": 1, "maximum": 200} }, { "name": "order_state", "in": "query", "required": false, "schema": {"type": "string", "enum": ["filled", "cancelled", "rejected"]} }, {"$ref": "#/components/parameters/InstrumentFilter"} ], "responses": { "200": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrdersHistoryResponse"}}}}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/AccountNotFound"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"}, "500": {"$ref": "#/components/responses/InternalServerError"} } } ``` #### Get deals history `GET /v1/history/accounts/{account_id}/deals` · Operation ID `getDealsHistory`. Use the opaque cursor for subsequent pages. Find the current lookback and range caps under `getDealsHistory` in the account limits response. [Operation reference](https://www.exness-api.com/reference/trading/get-deals-history) ```json { "tags": ["Trading"], "x-runtime-restrictions": ["trading_disabled"], "operationId": "getDealsHistory", "x-public-error-codes": [ "REQUEST_INVALID", "REQUEST_INVALID_PARAMETERS", "REQUEST_INVALID_TIME_RANGE", "REQUEST_INVALID_LIMIT", "REQUEST_INVALID_CURSOR", "REQUEST_INVALID_FILTER_COMBINATION", "AUTH_INVALID_API_KEY", "AUTH_INVALID_SIGNATURE", "AUTH_PERMISSION_DENIED", "ACCOUNT_NOT_FOUND", "MARKET_INSTRUMENT_NOT_FOUND", "REQUEST_RATE_LIMIT", "SYSTEM_TEMPORARY_UNAVAILABLE", "SYSTEM_INTERNAL_ERROR" ], "parameters": [ {"$ref": "#/components/parameters/AccountIdPath"}, {"name": "from", "in": "query", "required": false, "schema": {"type": "string", "format": "date-time"}}, {"name": "to", "in": "query", "required": false, "schema": {"type": "string", "format": "date-time"}}, {"name": "cursor", "in": "query", "required": false, "schema": {"type": "string"}}, { "name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "default": 100, "minimum": 1, "maximum": 200} }, { "name": "deal_type", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "open", "close", "balance", "null_compensation", "admin_fee", "swap_fee", "dividend", "exness_dollar" ] } }, {"$ref": "#/components/parameters/InstrumentFilter"} ], "responses": { "200": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/DealsHistoryResponse"}}}}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/AccountNotFound"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"}, "500": {"$ref": "#/components/responses/InternalServerError"} } } ``` ### Server Events #### Server events subscription WebSocket `/v1/server-events/accounts/{account_id}/ws/events` · Operation ID `getWSEvents`. Sign a GET handshake to this path. Send the subscription body as a WebSocket message. The OpenAPI POST models the message schema. Use events for `transactions`, `account_state`, `instruments` and `hmr`. [Operation reference](https://www.exness-api.com/reference/trading/get-ws-events) ```json { "tags": ["Server Events"], "x-runtime-restrictions": ["trading_disabled"], "operationId": "getWSEvents", "x-public-error-codes": [ "REQUEST_INVALID", "REQUEST_INVALID_PARAMETERS", "AUTH_INVALID_API_KEY", "AUTH_INVALID_SIGNATURE", "AUTH_PERMISSION_DENIED", "ACCOUNT_NOT_FOUND", "MARKET_INSTRUMENT_NOT_FOUND", "REQUEST_RATE_LIMIT", "SYSTEM_TEMPORARY_UNAVAILABLE", "SYSTEM_INTERNAL_ERROR" ], "x-public-async-error-codes": [ "ACCOUNT_NOT_FOUND", "ACCOUNT_DISABLED", "ACCOUNT_CLOSE_ONLY", "REQUEST_INVALID", "REQUEST_INVALID_PARAMETERS", "REQUEST_INVALID_PRICE", "MARKET_INSTRUMENT_NOT_FOUND", "MARKET_TRADE_DISABLED", "MARKET_CLOSE_ONLY", "MARKET_SESSION_CLOSED", "MARKET_NO_QUOTES", "TRADING_RULE_INVALID_VOLUME", "TRADING_RULE_VOLUME_TOO_SMALL", "TRADING_RULE_VOLUME_TOO_LARGE", "TRADING_RULE_INVALID_VOLUME_STEP", "TRADING_RULE_INVALID_REMAINING_VOLUME", "TRADING_RULE_INVALID_PRICE_LEVELS", "TRADING_RULE_INSUFFICIENT_MARGIN", "TRADING_RULE_MARGIN_LEVEL_TOO_LOW", "TRADING_RULE_OPERATION_RESTRICTED", "TRADING_RULE_TOO_MANY_PENDING_ORDERS", "TRADING_RULE_TOO_MANY_OPEN_POSITIONS", "EXECUTION_REQUOTE", "EXECUTION_REJECTED", "SYSTEM_RATE_LIMIT", "SYSTEM_TEMPORARY_UNAVAILABLE", "SYSTEM_INTERNAL_ERROR" ], "parameters": [{"$ref": "#/components/parameters/AccountIdPath"}], "requestBody": { "required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WSEventsCommandRequestData"}}} }, "responses": { "200": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/WSTradingEvent"}}}}, "400": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/WsErrorResponse"}}}}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/AccountNotFound"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"}, "500": {"$ref": "#/components/responses/InternalServerError"} } } ``` #### Ticks subscription WebSocket `/v1/server-events/accounts/{account_id}/ws/ticks` · Operation ID `getWSTicks`. Sign a GET handshake to this path. The OpenAPI POST models the WebSocket message. Use a nested `subscribe` with `event: "ticks"` and an instrument list. [Operation reference](https://www.exness-api.com/reference/trading/get-ws-ticks) ```json { "tags": ["Server Events"], "x-runtime-restrictions": ["trading_disabled"], "operationId": "getWSTicks", "x-public-error-codes": [ "REQUEST_INVALID", "REQUEST_INVALID_PARAMETERS", "AUTH_INVALID_API_KEY", "AUTH_INVALID_SIGNATURE", "AUTH_PERMISSION_DENIED", "ACCOUNT_NOT_FOUND", "MARKET_INSTRUMENT_NOT_FOUND", "MARKET_NO_QUOTES", "REQUEST_RATE_LIMIT", "SYSTEM_TEMPORARY_UNAVAILABLE", "SYSTEM_INTERNAL_ERROR" ], "parameters": [{"$ref": "#/components/parameters/AccountIdPath"}], "requestBody": { "required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WSTicksSubscribeRequestData"}}} }, "responses": { "200": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/WSTick"}}}}, "400": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/WsErrorResponse"}}}}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/AccountNotFound"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"}, "500": {"$ref": "#/components/responses/InternalServerError"} } } ``` ### Configuration #### Get account info `GET /v1/configuration/accounts/{account_id}/account` · Operation ID `getAccountDetails`. [Operation reference](https://www.exness-api.com/reference/trading/get-account-details) ```json { "tags": ["Configuration"], "operationId": "getAccountDetails", "x-public-error-codes": [ "REQUEST_INVALID", "AUTH_INVALID_API_KEY", "AUTH_INVALID_SIGNATURE", "AUTH_PERMISSION_DENIED", "ACCOUNT_NOT_FOUND", "REQUEST_RATE_LIMIT", "SYSTEM_TEMPORARY_UNAVAILABLE", "SYSTEM_INTERNAL_ERROR" ], "parameters": [{"$ref": "#/components/parameters/AccountIdPath"}], "responses": { "200": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/AccountDetailsResponse"}}}}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/AccountNotFound"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"}, "500": {"$ref": "#/components/responses/InternalServerError"} } } ``` #### Get available instrument list `GET /v1/configuration/accounts/{account_id}/instruments` · Operation ID `getAvailableInstrumentList`. Use the account-specific list before subscribing to prices or looking up instrument conditions. The current Trading API excludes stocks, indices and their suffix variants. [Operation reference](https://www.exness-api.com/reference/trading/get-available-instrument-list) ```json { "tags": ["Configuration"], "operationId": "getAvailableInstrumentList", "x-public-error-codes": [ "REQUEST_INVALID", "AUTH_INVALID_API_KEY", "AUTH_INVALID_SIGNATURE", "AUTH_PERMISSION_DENIED", "ACCOUNT_NOT_FOUND", "REQUEST_RATE_LIMIT", "SYSTEM_TEMPORARY_UNAVAILABLE", "SYSTEM_INTERNAL_ERROR" ], "parameters": [{"$ref": "#/components/parameters/AccountIdPath"}], "responses": { "200": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/InstrumentNameListResponse"}}}}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/AccountNotFound"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"}, "500": {"$ref": "#/components/responses/InternalServerError"} } } ``` #### Get instrument condition `GET /v1/configuration/accounts/{account_id}/instruments/{instrument}/conditions` · Operation ID `getInstrumentCondition`. [Operation reference](https://www.exness-api.com/reference/trading/get-instrument-condition) ```json { "tags": ["Configuration"], "operationId": "getInstrumentCondition", "x-public-error-codes": [ "REQUEST_INVALID", "REQUEST_INVALID_PARAMETERS", "AUTH_INVALID_API_KEY", "AUTH_INVALID_SIGNATURE", "AUTH_PERMISSION_DENIED", "ACCOUNT_NOT_FOUND", "MARKET_INSTRUMENT_NOT_FOUND", "REQUEST_RATE_LIMIT", "SYSTEM_TEMPORARY_UNAVAILABLE", "SYSTEM_INTERNAL_ERROR" ], "parameters": [ {"$ref": "#/components/parameters/AccountIdPath"}, {"name": "instrument", "in": "path", "required": true, "schema": {"$ref": "#/components/schemas/InstrumentName"}} ], "responses": { "200": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/InstrumentConditionResponse"}}}}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/AccountNotFound"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"}, "500": {"$ref": "#/components/responses/InternalServerError"} } } ``` #### Get API limits `GET /v1/configuration/accounts/{account_id}/limits` · Operation ID `getLimits`. [Operation reference](https://www.exness-api.com/reference/trading/get-limits) ```json { "tags": ["Configuration"], "operationId": "getLimits", "x-public-error-codes": [ "REQUEST_INVALID", "AUTH_INVALID_API_KEY", "AUTH_INVALID_SIGNATURE", "AUTH_PERMISSION_DENIED", "ACCOUNT_NOT_FOUND", "REQUEST_RATE_LIMIT", "SYSTEM_TEMPORARY_UNAVAILABLE", "SYSTEM_INTERNAL_ERROR" ], "parameters": [{"$ref": "#/components/parameters/AccountIdPath"}], "responses": { "200": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/LimitsResponse"}}}}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/AccountNotFound"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"}, "500": {"$ref": "#/components/responses/InternalServerError"} } } ``` ### Trading public error codes | HTTP status | Code | Error name | | --- | --- | --- | | 429 | `1` | `SYSTEM_RATE_LIMIT` | | 503 | `2` | `SYSTEM_TEMPORARY_UNAVAILABLE` | | 500 | `3` | `SYSTEM_INTERNAL_ERROR` | | 401 | `1000` | `AUTH_INVALID_API_KEY` | | 401 | `1001` | `AUTH_INVALID_SIGNATURE` | | 403 | `1002` | `AUTH_PERMISSION_DENIED` | | 429 | `1003` | `AUTH_RATE_LIMIT` | | 404 | `2000` | `ACCOUNT_NOT_FOUND` | | 403 | `2001` | `ACCOUNT_DISABLED` | | 403 | `2002` | `ACCOUNT_CLOSE_ONLY` | | 400 | `3000` | `REQUEST_INVALID` | | 400 | `3001` | `REQUEST_INVALID_PARAMETERS` | | 400 | `3002` | `REQUEST_INVALID_PRICE` | | 400 | `3003` | `REQUEST_INVALID_TIMEFRAME` | | 400 | `3004` | `REQUEST_INVALID_TIME_RANGE` | | 400 | `3005` | `REQUEST_INVALID_COUNT` | | 400 | `3006` | `REQUEST_INVALID_LIMIT` | | 400 | `3007` | `REQUEST_INVALID_CURSOR` | | 400 | `3008` | `REQUEST_INVALID_PRICE_TYPE` | | 400 | `3009` | `REQUEST_INVALID_FILTER_COMBINATION` | | 400 | `3010` | `REQUEST_UNSUPPORTED_MEDIA_TYPE` | | 405 | `3011` | `REQUEST_METHOD_NOT_ALLOWED` | | 404 | `3012` | `REQUEST_ORDER_NOT_FOUND` | | 404 | `3013` | `REQUEST_POSITION_NOT_FOUND` | | 404 | `3014` | `REQUEST_OPERATION_NOT_FOUND` | | 429 | `3015` | `REQUEST_RATE_LIMIT` | | 404 | `4000` | `MARKET_INSTRUMENT_NOT_FOUND` | | 403 | `4001` | `MARKET_TRADE_DISABLED` | | 403 | `4002` | `MARKET_CLOSE_ONLY` | | 409 | `4003` | `MARKET_SESSION_CLOSED` | | 503 | `4004` | `MARKET_NO_QUOTES` | | 422 | `5000` | `TRADING_RULE_INVALID_VOLUME` | | 422 | `5001` | `TRADING_RULE_VOLUME_TOO_SMALL` | | 422 | `5002` | `TRADING_RULE_VOLUME_TOO_LARGE` | | 422 | `5003` | `TRADING_RULE_INVALID_VOLUME_STEP` | | 422 | `5004` | `TRADING_RULE_INVALID_REMAINING_VOLUME` | | 422 | `5005` | `TRADING_RULE_INVALID_PRICE_LEVELS` | | 422 | `5006` | `TRADING_RULE_INSUFFICIENT_MARGIN` | | 422 | `5007` | `TRADING_RULE_MARGIN_LEVEL_TOO_LOW` | | 422 | `5008` | `TRADING_RULE_OPERATION_RESTRICTED` | | 422 | `5009` | `TRADING_RULE_TOO_MANY_PENDING_ORDERS` | | 422 | `5010` | `TRADING_RULE_TOO_MANY_OPEN_POSITIONS` | | 409 | `6000` | `EXECUTION_REQUOTE` | | 409 | `6001` | `EXECUTION_REJECTED` | [Troubleshooting and retry guidance](https://www.exness-api.com/trading/guides/troubleshooting) ### Trading OpenAPI components ```json { "security": [ { "ExnApiKeyAuth": [], "ExnTimestampAuth": [], "ExnDataAuth": [], "ExnSignatureAuth": [], "ExnSignVersionAuth": [], "ExnIdempotencyKeyAuth": [] } ], "components": { "securitySchemes": { "ExnApiKeyAuth": {"type": "apiKey", "in": "header", "name": "EXN-API-KEY"}, "ExnTimestampAuth": {"type": "apiKey", "in": "header", "name": "EXN-TIMESTAMP"}, "ExnDataAuth": {"type": "apiKey", "in": "header", "name": "EXN-DATA"}, "ExnSignatureAuth": {"type": "apiKey", "in": "header", "name": "EXN-SIGN"}, "ExnSignVersionAuth": {"type": "apiKey", "in": "header", "name": "EXN-SIGN-VERSION"}, "ExnIdempotencyKeyAuth": {"type": "apiKey", "in": "header", "name": "EXN-IDEMPOTENCY-KEY"} }, "parameters": { "AccountIdPath": { "name": "account_id", "in": "path", "required": true, "schema": {"$ref": "#/components/schemas/UInt64String"} }, "ExnIdempotencyKey": { "name": "EXN-IDEMPOTENCY-KEY", "in": "header", "required": true, "schema": { "oneOf": [ {"type": "string", "const": ""}, {"type": "string", "minLength": 5, "maxLength": 128, "pattern": "^[A-Za-z0-9._~-]{5,128}$"} ] } }, "InstrumentFilter": { "name": "instrument", "in": "query", "required": false, "schema": {"$ref": "#/components/schemas/InstrumentName"} } }, "responses": { "BadRequest": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorResponse"}}}}, "AuthorizationFailed": { "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorResponse"}}} }, "Forbidden": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorResponse"}}}}, "AccountNotFound": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorResponse"}}}}, "Conflict": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorResponse"}}}}, "UnprocessableEntity": { "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorResponse"}}} }, "TooManyRequests": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorResponse"}}}}, "ServiceUnavailable": { "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorResponse"}}} }, "InternalServerError": { "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorResponse"}}} } }, "schemas": { "ErrorResponse": { "type": "object", "required": ["code", "error_message"], "properties": { "code": {"$ref": "#/components/schemas/PublicApiErrorCode"}, "error_message": {"type": "string"} } }, "PublicApiErrorCode": { "type": "integer", "format": "int32", "enum": [ 1, 2, 3, 1000, 1001, 1002, 2000, 2001, 2002, 3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009, 3010, 3011, 3012, 3013, 3014, 3015, 4000, 4001, 4002, 4003, 4004, 5000, 5001, 5002, 5003, 5004, 5005, 5006, 5007, 5008, 5009, 5010, 6000, 6001 ] }, "WsErrorResponse": { "type": "object", "required": ["id", "code", "error_message"], "properties": { "id": {"type": "string"}, "code": {"$ref": "#/components/schemas/PublicApiErrorCode"}, "error_message": {"type": "string"} } }, "Money": { "type": "object", "properties": {"amount": {"$ref": "#/components/schemas/DecimalString"}, "currency": {"type": "string"}} }, "DecimalString": {"type": "string", "pattern": "^[+-]?[0-9]+(?:\\.[0-9]+)?$"}, "UInt64String": {"type": "string", "minLength": 1, "maxLength": 20, "pattern": "^[0-9]{1,20}$"}, "InstrumentName": {"type": "string", "minLength": 1, "maxLength": 11, "pattern": "^[A-Za-z0-9._-]+$"}, "PositiveDecimalString": { "type": "string", "pattern": "^[+]?(?:(?:0*[1-9][0-9]*)(?:\\.[0-9]+)?|0+\\.[0-9]*[1-9][0-9]*)$" }, "ClosePositionVolumeString": {"type": "string", "pattern": "^[+]?[0-9]+(?:\\.[0-9]+)?$"}, "InstrumentVolumeString": {"allOf": [{"$ref": "#/components/schemas/PositiveDecimalString"}]}, "InstrumentPriceString": {"allOf": [{"$ref": "#/components/schemas/PositiveDecimalString"}]}, "TradingSubscriptionType": {"type": "string", "enum": ["transactions", "account_state", "instruments"]}, "TradingEventType": { "type": "string", "enum": ["trading_state_snapshot", "transaction_event", "account_state_event", "instrument_event"] }, "InstrumentEventAction": {"type": "string", "enum": ["new", "upd", "del"]}, "TradingEventStatus": {"type": "string", "enum": ["success", "failed", "rejected"]}, "AccountTradingStatus": {"type": "string", "enum": ["active", "close_only"]}, "ExecutionMode": {"type": "string", "enum": ["undefined", "instant", "market"]}, "CalculationMode": { "type": "string", "enum": ["undefined", "forex", "forex_no_leverage", "cfd", "cfd_leverage"] }, "TradeMode": {"type": "string", "enum": ["enabled", "trading_disabled"]}, "InstrumentOrderType": {"type": "string", "enum": ["stop", "limit", "stoplimit", "market"]}, "FillingMode": {"type": "string", "enum": ["fok", "ioc", "boc"]}, "CommissionType": { "type": "string", "enum": ["undefined", "per_lot_per_side", "per_lot_per_trade", "per_million_usd"] }, "OrderReason": { "type": "string", "enum": [ "undefined", "sl", "tp", "so", "margin_check_failed", "dealer", "close_by", "stock_split", "trading_server" ] }, "Candle": { "type": "object", "properties": { "time": {"type": "string", "format": "date-time"}, "open": {"type": "number", "format": "double"}, "high": {"type": "number", "format": "double"}, "low": {"type": "number", "format": "double"}, "close": {"type": "number", "format": "double"}, "volume": {"type": "number", "format": "double"} } }, "CandleHistoryResponse": { "type": "object", "properties": { "candles": { "type": "array", "items": { "oneOf": [{"$ref": "#/components/schemas/Candle"}, {"$ref": "#/components/schemas/CandleBidAsk"}] } } } }, "CandleBidAsk": { "type": "object", "properties": { "time": {"type": "string", "format": "date-time"}, "bid": {"$ref": "#/components/schemas/CandleSide"}, "ask": {"$ref": "#/components/schemas/CandleSide"}, "volume": {"type": "number", "format": "double"} } }, "CandleSide": { "type": "object", "properties": { "open": {"type": "number", "format": "double"}, "high": {"type": "number", "format": "double"}, "low": {"type": "number", "format": "double"}, "close": {"type": "number", "format": "double"} } }, "WSTick": { "type": "object", "properties": { "instrument": {"$ref": "#/components/schemas/InstrumentName"}, "bid": {"type": "number", "format": "double"}, "ask": {"type": "number", "format": "double"}, "timestamp": {"type": "string", "format": "date-time"} } }, "AccountState": { "type": "object", "required": ["balance", "equity", "used_margin"], "properties": { "balance": {"$ref": "#/components/schemas/DecimalString"}, "equity": {"$ref": "#/components/schemas/DecimalString", "x-formula": "equity = balance + unrealized_PNL"}, "used_margin": {"$ref": "#/components/schemas/DecimalString"} } }, "Order": { "type": "object", "required": ["order_id", "order_type", "state", "create_time"], "properties": { "order_id": {"allOf": [{"$ref": "#/components/schemas/UInt64String"}]}, "position_id": {"allOf": [{"$ref": "#/components/schemas/UInt64String"}]}, "order_type": {"type": "string", "enum": ["market", "stop", "limit", "sltp"]}, "state": {"type": "string", "enum": ["pending_new", "placed", "filled", "cancelled", "rejected"]}, "direction": {"type": "string", "enum": ["buy", "sell"]}, "instrument": {"$ref": "#/components/schemas/InstrumentName"}, "price": {"allOf": [{"$ref": "#/components/schemas/DecimalString"}]}, "stop_loss_price": {"allOf": [{"$ref": "#/components/schemas/DecimalString"}], "nullable": true}, "take_profit_price": {"allOf": [{"$ref": "#/components/schemas/DecimalString"}], "nullable": true}, "create_time": {"type": "string", "format": "date-time"}, "update_time": {"type": "string", "format": "date-time"}, "volume": {"allOf": [{"$ref": "#/components/schemas/DecimalString"}]}, "reason": {"$ref": "#/components/schemas/OrderReason"} } }, "Position": { "type": "object", "required": ["position_id", "direction", "instrument", "state", "create_time", "volume"], "properties": { "position_id": {"allOf": [{"$ref": "#/components/schemas/UInt64String"}]}, "direction": {"type": "string", "enum": ["buy", "sell"]}, "instrument": {"$ref": "#/components/schemas/InstrumentName"}, "initial_volume": {"$ref": "#/components/schemas/DecimalString"}, "volume": {"$ref": "#/components/schemas/DecimalString"}, "open_price": {"allOf": [{"$ref": "#/components/schemas/DecimalString"}]}, "state": {"type": "string", "enum": ["open", "closed"]}, "margin_rate": {"allOf": [{"$ref": "#/components/schemas/DecimalString"}]}, "create_time": {"type": "string", "format": "date-time"}, "commission": {"allOf": [{"$ref": "#/components/schemas/DecimalString"}]}, "swap": {"allOf": [{"$ref": "#/components/schemas/DecimalString"}]}, "rollover_time": {"type": "string", "format": "date-time"} } }, "ProfitAmount": { "type": "object", "properties": {"amount": {"$ref": "#/components/schemas/DecimalString"}, "currency": {"type": "string"}} }, "Deal": { "type": "object", "required": ["deal_id", "type", "create_time"], "properties": { "deal_id": {"allOf": [{"$ref": "#/components/schemas/UInt64String"}]}, "order_id": {"allOf": [{"$ref": "#/components/schemas/UInt64String"}]}, "position_id": {"allOf": [{"$ref": "#/components/schemas/UInt64String"}]}, "type": { "type": "string", "enum": [ "open", "close", "balance", "null_compensation", "swap_fee", "admin_fee", "dividend", "exness_dollar" ] }, "direction": {"type": "string", "enum": ["buy", "sell"]}, "instrument": {"$ref": "#/components/schemas/InstrumentName"}, "volume": {"allOf": [{"$ref": "#/components/schemas/DecimalString"}]}, "price": {"allOf": [{"$ref": "#/components/schemas/DecimalString"}]}, "profit": {"$ref": "#/components/schemas/ProfitAmount"}, "create_time": {"type": "string", "format": "date-time"}, "commission": {"allOf": [{"$ref": "#/components/schemas/DecimalString"}]} } }, "OpenPositionRequest": { "type": "object", "required": ["instrument", "side", "volume"], "properties": { "instrument": {"$ref": "#/components/schemas/InstrumentName"}, "side": {"type": "string", "enum": ["buy", "sell"]}, "volume": {"$ref": "#/components/schemas/InstrumentVolumeString"}, "price": {"$ref": "#/components/schemas/InstrumentPriceString"}, "deviation": {"allOf": [{"$ref": "#/components/schemas/DecimalString"}]}, "stop_loss_price": {"$ref": "#/components/schemas/InstrumentPriceString"}, "take_profit_price": {"$ref": "#/components/schemas/InstrumentPriceString"}, "comment": {"type": "string"} } }, "NewPendingOrderRequest": { "oneOf": [ {"$ref": "#/components/schemas/NewLimitOrderRequest"}, {"$ref": "#/components/schemas/NewStopOrderRequest"}, {"$ref": "#/components/schemas/NewSltpOrderRequest"} ] }, "NewLimitOrderRequest": { "type": "object", "required": ["instrument", "side", "type", "volume", "price"], "properties": { "instrument": {"$ref": "#/components/schemas/InstrumentName"}, "side": {"type": "string", "enum": ["buy", "sell"]}, "type": {"type": "string", "enum": ["limit"]}, "volume": {"$ref": "#/components/schemas/InstrumentVolumeString"}, "price": {"$ref": "#/components/schemas/InstrumentPriceString"}, "stop_loss_price": {"$ref": "#/components/schemas/InstrumentPriceString"}, "take_profit_price": {"$ref": "#/components/schemas/InstrumentPriceString"}, "comment": {"type": "string"} } }, "NewStopOrderRequest": { "type": "object", "required": ["instrument", "side", "type", "volume", "price"], "properties": { "instrument": {"$ref": "#/components/schemas/InstrumentName"}, "side": {"type": "string", "enum": ["buy", "sell"]}, "type": {"type": "string", "enum": ["stop"]}, "volume": {"$ref": "#/components/schemas/InstrumentVolumeString"}, "price": {"$ref": "#/components/schemas/InstrumentPriceString"}, "stop_loss_price": {"$ref": "#/components/schemas/InstrumentPriceString"}, "take_profit_price": {"$ref": "#/components/schemas/InstrumentPriceString"}, "comment": {"type": "string"} } }, "NewSltpOrderRequest": { "type": "object", "required": ["position_id", "type"], "properties": { "position_id": {"allOf": [{"$ref": "#/components/schemas/UInt64String"}]}, "type": {"type": "string", "enum": ["sltp"]}, "stop_loss_price": {"$ref": "#/components/schemas/InstrumentPriceString"}, "take_profit_price": {"$ref": "#/components/schemas/InstrumentPriceString"}, "comment": {"type": "string"} }, "anyOf": [{"required": ["stop_loss_price"]}, {"required": ["take_profit_price"]}] }, "ModifyOrderRequest": { "type": "object", "properties": { "price": {"$ref": "#/components/schemas/InstrumentPriceString"}, "stop_loss_price": {"allOf": [{"$ref": "#/components/schemas/InstrumentPriceString"}], "nullable": true}, "take_profit_price": {"allOf": [{"$ref": "#/components/schemas/InstrumentPriceString"}], "nullable": true}, "comment": {"type": "string"} }, "anyOf": [{"required": ["price"]}, {"required": ["stop_loss_price"]}, {"required": ["take_profit_price"]}] }, "OperationStatusResponse": { "type": "object", "required": ["operation_id", "status", "created_at", "updated_at"], "properties": { "operation_id": {"allOf": [{"$ref": "#/components/schemas/UInt64String"}]}, "status": {"type": "string", "enum": ["pending", "confirmed", "rejected", "failed"]}, "client_request_id": {"type": "string"}, "error_code": {"$ref": "#/components/schemas/PublicApiErrorCode"}, "error_message": {"type": "string"}, "created_at": {"type": "string", "format": "date-time"}, "updated_at": {"type": "string", "format": "date-time"} } }, "AckResponse": { "type": "object", "required": ["status"], "properties": { "operation_id": {"allOf": [{"$ref": "#/components/schemas/UInt64String"}]}, "client_request_id": {"type": "string"}, "status": {"type": "string", "enum": ["accepted"]} } }, "AccountDetailsResponse": { "type": "object", "required": ["account_id", "create_date"], "properties": { "account_id": {"allOf": [{"$ref": "#/components/schemas/UInt64String"}]}, "account_name": {"type": "string"}, "create_date": {"type": "string", "format": "date-time"}, "settings": {"$ref": "#/components/schemas/AccountSettings"} } }, "OrdersHistoryResponse": { "type": "object", "required": ["items"], "properties": { "items": {"type": "array", "items": {"$ref": "#/components/schemas/OrderHistoryItem"}}, "next_cursor": {"type": "string"}, "has_more": {"type": "boolean"}, "range": { "type": "object", "properties": { "from": {"type": "string", "format": "date-time"}, "to": {"type": "string", "format": "date-time"} } } } }, "OrderHistoryItem": { "type": "object", "required": ["event_time", "order"], "properties": { "event_time": {"type": "string", "format": "date-time"}, "order": {"$ref": "#/components/schemas/Order"} } }, "DealsHistoryResponse": { "type": "object", "required": ["items"], "properties": { "items": {"type": "array", "items": {"$ref": "#/components/schemas/DealHistoryItem"}}, "next_cursor": {"type": "string"}, "has_more": {"type": "boolean"}, "range": { "type": "object", "properties": { "from": {"type": "string", "format": "date-time"}, "to": {"type": "string", "format": "date-time"} } } } }, "DealHistoryItem": { "type": "object", "required": ["event_time", "deal"], "properties": { "event_time": {"type": "string", "format": "date-time"}, "deal": {"$ref": "#/components/schemas/Deal"} } }, "InstrumentNameListResponse": { "type": "object", "properties": {"instruments": {"type": "array", "items": {"$ref": "#/components/schemas/InstrumentName"}}} }, "InstrumentConditionResponse": { "type": "object", "required": ["instrument"], "properties": { "instrument": {"allOf": [{"$ref": "#/components/schemas/InstrumentName"}]}, "description": {"type": "string"}, "international_name": {"type": "string", "nullable": true}, "category": {"type": "string"}, "base_currency": {"type": "string"}, "quote_currency": {"type": "string"}, "margin_currency": {"type": "string"}, "point_digits": {"type": "integer", "format": "int32"}, "calc_mode": {"$ref": "#/components/schemas/CalculationMode"}, "exec_mode": {"$ref": "#/components/schemas/ExecutionMode"}, "margin_percent": {"allOf": [{"$ref": "#/components/schemas/DecimalString"}], "nullable": true}, "contract_size": {"allOf": [{"$ref": "#/components/schemas/DecimalString"}], "nullable": true}, "volume_min": {"allOf": [{"$ref": "#/components/schemas/DecimalString"}], "nullable": true}, "volume_max": {"allOf": [{"$ref": "#/components/schemas/DecimalString"}], "nullable": true}, "volume_step": {"allOf": [{"$ref": "#/components/schemas/DecimalString"}], "nullable": true}, "swap_long": {"allOf": [{"$ref": "#/components/schemas/DecimalString"}], "nullable": true}, "swap_short": {"allOf": [{"$ref": "#/components/schemas/DecimalString"}], "nullable": true}, "swap_multipliers": {"type": "array", "items": {"$ref": "#/components/schemas/SwapMultiplier"}}, "trade_mode": {"$ref": "#/components/schemas/TradeMode"}, "order_types": {"type": "array", "items": {"$ref": "#/components/schemas/InstrumentOrderType"}}, "filling_modes": {"type": "array", "items": {"$ref": "#/components/schemas/FillingMode"}}, "trade_sessions": {"type": "array", "items": {"$ref": "#/components/schemas/InstrumentSession"}}, "commission_settings": {"$ref": "#/components/schemas/CommissionSettings"} } }, "LimitsResponse": { "type": "object", "additionalProperties": false, "required": ["limits"], "properties": {"limits": {"$ref": "#/components/schemas/ApiLimits"}} }, "ApiLimits": { "type": "object", "additionalProperties": false, "required": ["rest", "websocket"], "properties": { "rest": {"$ref": "#/components/schemas/RestLimits"}, "websocket": {"$ref": "#/components/schemas/WebSocketLimits"} } }, "RestLimits": { "type": "object", "additionalProperties": false, "required": ["global_account_rate", "methods"], "properties": { "global_account_rate": {"$ref": "#/components/schemas/GlobalRestRateLimit"}, "methods": {"type": "array", "items": {"$ref": "#/components/schemas/RestMethodLimits"}} } }, "GlobalRestRateLimit": { "type": "object", "additionalProperties": false, "required": ["limit", "window_seconds"], "properties": { "limit": {"type": "integer", "minimum": 1}, "window_seconds": {"type": "integer", "minimum": 1} } }, "ApiRateLimit": { "type": "object", "additionalProperties": false, "required": ["limit", "window_seconds"], "properties": { "limit": {"type": "integer", "minimum": 1}, "window_seconds": {"type": "integer", "minimum": 1} } }, "RestMethodLimits": { "type": "object", "additionalProperties": false, "required": ["api_operation_id", "http_method", "path", "rate_limit"], "properties": { "api_operation_id": {"type": "string"}, "http_method": {"$ref": "#/components/schemas/HttpMethod"}, "path": {"type": "string"}, "rate_limit": {"$ref": "#/components/schemas/ApiRateLimit"}, "limits": {"$ref": "#/components/schemas/OperationRequestLimits"} } }, "HttpMethod": {"type": "string", "enum": ["GET", "POST", "PUT", "PATCH", "DELETE"]}, "OperationRequestLimits": { "type": "object", "additionalProperties": false, "properties": { "max_candles_per_request": {"type": "integer", "minimum": 1}, "max_candles_per_request_description": {"type": "string"}, "history_range_days": {"type": "integer", "minimum": 1}, "history_age_days": {"type": "integer", "minimum": 1} } }, "WebSocketLimits": { "type": "object", "additionalProperties": false, "required": ["global_account_limits", "endpoints"], "properties": { "global_account_limits": {"$ref": "#/components/schemas/WebSocketGlobalAccountLimits"}, "endpoints": {"type": "array", "items": {"$ref": "#/components/schemas/WebSocketEndpointLimits"}} } }, "WebSocketGlobalAccountLimits": { "type": "object", "additionalProperties": false, "required": [ "max_active_connections", "max_inbound_message_bytes", "connection_rate", "inbound_message_rate", "strikes" ], "properties": { "max_active_connections": {"type": "integer", "minimum": 1}, "max_inbound_message_bytes": {"type": "integer", "minimum": 1}, "connection_rate": {"$ref": "#/components/schemas/WebSocketTokenBucketLimit"}, "inbound_message_rate": {"$ref": "#/components/schemas/WebSocketTokenBucketLimit"}, "strikes": {"$ref": "#/components/schemas/WebSocketStrikeLimits"} } }, "WebSocketEndpointLimits": { "type": "object", "additionalProperties": false, "required": [ "api_operation_id", "http_method", "path", "connection_rate", "inbound_message_rate", "subscription_operation_rate" ], "properties": { "api_operation_id": {"type": "string"}, "http_method": {"$ref": "#/components/schemas/HttpMethod"}, "path": {"type": "string"}, "connection_rate": {"$ref": "#/components/schemas/WebSocketTokenBucketLimit"}, "inbound_message_rate": {"$ref": "#/components/schemas/WebSocketTokenBucketLimit"}, "subscription_operation_rate": { "type": "object", "additionalProperties": {"$ref": "#/components/schemas/WebSocketTokenBucketLimit"} } } }, "WebSocketTokenBucketLimit": { "type": "object", "additionalProperties": false, "required": ["limit", "window_seconds", "burst"], "properties": { "limit": {"type": "integer", "minimum": 1}, "window_seconds": {"type": "number", "format": "double", "exclusiveMinimum": 0}, "burst": {"type": "integer", "minimum": 1} } }, "WebSocketStrikeLimits": { "type": "object", "additionalProperties": false, "required": ["refill_amount", "threshold", "period_ms"], "properties": { "refill_amount": {"type": "integer", "minimum": 1}, "threshold": {"type": "integer", "minimum": 1}, "period_ms": {"type": "integer", "minimum": 1} } }, "WSEventsCommandRequestData": { "oneOf": [ {"$ref": "#/components/schemas/WSEventsSubscribeRequestData"}, {"$ref": "#/components/schemas/WSEventsUnsubscribeRequestData"} ] }, "WSEventsSubscribeRequestData": { "type": "object", "required": ["id", "subscribe"], "properties": { "id": {"type": "string"}, "subscribe": {"$ref": "#/components/schemas/TradingEventsSubscription"} } }, "WSEventsUnsubscribeRequestData": { "type": "object", "required": ["id", "unsubscribe"], "properties": { "id": {"type": "string"}, "unsubscribe": {"$ref": "#/components/schemas/TradingEventsSubscription"} } }, "TradingEventsSubscription": { "oneOf": [ {"$ref": "#/components/schemas/TradingTransactionsSubscription"}, {"$ref": "#/components/schemas/TradingAccountStateSubscription"}, {"$ref": "#/components/schemas/TradingInstrumentsSubscription"}, {"$ref": "#/components/schemas/TradingHmrSubscription"} ] }, "TradingTransactionsSubscription": { "type": "object", "required": ["event"], "properties": {"event": {"type": "string", "enum": ["transactions"]}} }, "TradingAccountStateSubscription": { "type": "object", "required": ["event"], "properties": {"event": {"type": "string", "enum": ["account_state"]}} }, "TradingHmrSubscription": { "type": "object", "required": ["event", "instruments"], "properties": { "event": {"type": "string", "enum": ["hmr"]}, "instruments": {"type": "array", "minItems": 1, "items": {"$ref": "#/components/schemas/InstrumentName"}} } }, "TradingInstrumentsSubscription": { "type": "object", "required": ["event", "instruments"], "properties": { "event": {"type": "string", "enum": ["instruments"]}, "instruments": {"type": "array", "minItems": 1, "items": {"$ref": "#/components/schemas/InstrumentName"}} } }, "WSTicksSubscribeRequestData": { "type": "object", "required": ["id", "subscribe"], "properties": { "id": {"type": "string"}, "subscribe": { "type": "object", "required": ["event", "instruments"], "properties": { "event": {"type": "string", "enum": ["ticks"]}, "instruments": {"type": "array", "items": {"$ref": "#/components/schemas/InstrumentName"}} } } } }, "AccountStateEventPayload": { "type": "object", "required": ["account_state"], "properties": {"account_state": {"$ref": "#/components/schemas/AccountState"}} }, "TradingStateSnapshot": { "type": "object", "required": ["account_state"], "properties": { "orders": {"type": "array", "items": {"$ref": "#/components/schemas/Order"}}, "positions": {"type": "array", "items": {"$ref": "#/components/schemas/Position"}}, "account_state": {"$ref": "#/components/schemas/AccountState"} } }, "TransactionAccountState": { "allOf": [ {"$ref": "#/components/schemas/AccountState"}, {"type": "object", "required": ["leverage"], "properties": {"leverage": {"type": "string"}}} ] }, "TransactionPayload": { "type": "object", "properties": { "orders": {"type": "array", "items": {"$ref": "#/components/schemas/Order"}}, "positions": {"type": "array", "items": {"$ref": "#/components/schemas/Position"}}, "deals": {"type": "array", "items": {"$ref": "#/components/schemas/Deal"}}, "account_state": {"$ref": "#/components/schemas/TransactionAccountState"} } }, "WSTradingEvent": { "oneOf": [ {"$ref": "#/components/schemas/WSTradingStateSnapshotEvent"}, {"$ref": "#/components/schemas/WSTradingTransactionEvent"}, {"$ref": "#/components/schemas/WSAccountStateEvent"}, {"$ref": "#/components/schemas/WSInstrumentEvent"}, {"$ref": "#/components/schemas/WSHmrSnapshotEvent"}, {"$ref": "#/components/schemas/WSHmrUpdateEvent"} ], "discriminator": { "propertyName": "event_type", "mapping": { "trading_state_snapshot": "#/components/schemas/WSTradingStateSnapshotEvent", "transaction_event": "#/components/schemas/WSTradingTransactionEvent", "account_state_event": "#/components/schemas/WSAccountStateEvent", "instrument_event": "#/components/schemas/WSInstrumentEvent", "hmr_snapshot": "#/components/schemas/WSHmrSnapshotEvent", "hmr_update": "#/components/schemas/WSHmrUpdateEvent" } } }, "WSTradingStateSnapshotEvent": { "type": "object", "required": ["event_type", "payload"], "properties": { "event_type": {"type": "string", "enum": ["trading_state_snapshot"]}, "payload": {"$ref": "#/components/schemas/TradingStateSnapshot"} } }, "WSTradingTransactionEvent": { "type": "object", "required": ["event_type", "payload"], "properties": { "event_type": {"type": "string", "enum": ["transaction_event"]}, "operation_id": {"allOf": [{"$ref": "#/components/schemas/UInt64String"}]}, "client_request_id": {"type": "string", "nullable": true}, "status": {"$ref": "#/components/schemas/TradingEventStatus"}, "error_code": {"$ref": "#/components/schemas/PublicApiErrorCode"}, "error_message": {"type": "string"}, "event_time": {"type": "string", "format": "date-time"}, "payload": {"$ref": "#/components/schemas/TransactionPayload"} } }, "WSAccountStateEvent": { "type": "object", "required": ["event_type", "event_time", "payload"], "properties": { "event_type": {"type": "string", "enum": ["account_state_event"]}, "event_time": {"type": "string", "format": "date-time"}, "payload": {"$ref": "#/components/schemas/AccountStateEventPayload"} } }, "WSInstrumentEvent": { "type": "object", "required": ["event_type", "event_time", "action", "payload"], "properties": { "event_type": {"type": "string", "enum": ["instrument_event"]}, "event_time": {"type": "string", "format": "date-time"}, "action": {"$ref": "#/components/schemas/InstrumentEventAction"}, "payload": {"$ref": "#/components/schemas/InstrumentConditionResponse"} } }, "WSHmrSnapshotEvent": { "type": "object", "required": ["event_type", "periods"], "properties": { "event_type": {"type": "string", "enum": ["hmr_snapshot"]}, "periods": {"type": "array", "items": {"$ref": "#/components/schemas/HmrPeriod"}} } }, "WSHmrUpdateEvent": { "type": "object", "required": ["event_type", "upserted_periods", "removed_period_ids"], "properties": { "event_type": {"type": "string", "enum": ["hmr_update"]}, "upserted_periods": {"type": "array", "items": {"$ref": "#/components/schemas/HmrPeriod"}}, "removed_period_ids": {"type": "array", "items": {"$ref": "#/components/schemas/UInt64String"}} } }, "HmrPeriod": { "type": "object", "required": ["period_id", "event_type", "instruments", "leverage", "start_time", "end_time"], "properties": { "period_id": {"$ref": "#/components/schemas/UInt64String"}, "event_type": {"$ref": "#/components/schemas/HmrPeriodEventType"}, "instruments": {"type": "array", "minItems": 1, "items": {"$ref": "#/components/schemas/InstrumentName"}}, "leverage": {"type": "string"}, "start_time": {"type": "string"}, "end_time": {"type": "string"} } }, "HmrPeriodEventType": {"type": "string", "enum": ["regular", "periodic"]}, "AccountSettings": { "type": "object", "required": ["currency", "leverage", "account_status", "trade_mode", "execution_mode"], "properties": { "currency": {"type": "string"}, "leverage": {"type": "string"}, "margin_call_level": {"$ref": "#/components/schemas/DecimalString"}, "stopout_level": {"$ref": "#/components/schemas/DecimalString"}, "trade_mode": {"$ref": "#/components/schemas/TradeMode"}, "account_status": {"$ref": "#/components/schemas/AccountTradingStatus"}, "execution_mode": {"$ref": "#/components/schemas/ExecutionMode"} } }, "SwapMultiplier": { "type": "object", "properties": {"day": {"type": "string"}, "multiplier": {"type": "integer", "format": "int32"}} }, "CommissionSettings": { "type": "object", "properties": { "commission_type": {"$ref": "#/components/schemas/CommissionType"}, "commission_value": {"$ref": "#/components/schemas/Money"} } }, "InstrumentSession": { "type": "object", "properties": { "trade_mode": {"$ref": "#/components/schemas/TradeMode"}, "week_start_time": {"type": "string"}, "week_end_time": {"type": "string"} } } } } } ``` ## Partnership API reference ### Exness Partner API API version `1.0.2` · OpenAPI `3.1.1`. Use the Partnership host provisioned for your account. Reads require `partnership.all:read` or `partnership.all`. Mutations require `partnership.all`. The signed idempotency field stays empty and the idempotency header is omitted. Report and business errors use string codes. Authentication and request processing use the numeric envelope. [Reference introduction](https://www.exness-api.com/reference/partnership/exness-partner-api) · [Official OpenAPI YAML](https://www.exness-api.com/openapi/partnership.public.yaml) ### Partner #### Check client affiliation `POST /v1/partnership/affiliation` · Operation ID `checkPartnerAffiliation`. This POST is read-only. Partnership Read-only scope suffices. [Operation reference](https://www.exness-api.com/reference/partnership/check-partner-affiliation) ```json { "tags": ["Partner"], "operationId": "checkPartnerAffiliation", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {"email": {"format": "email", "type": "string"}}, "required": ["email"] } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "required": ["affiliation", "accounts", "client_uid"], "properties": { "affiliation": {"type": "boolean"}, "accounts": {"type": "array", "items": {"type": "string"}}, "client_uid": {"type": ["string", "null"]} } } } } }, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "504": {"$ref": "#/components/responses/GatewayTimeout"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"} } } ``` #### Create custom partner code `POST /v1/partnership/partner/codes` · Operation ID `createPartnerCode`. [Operation reference](https://www.exness-api.com/reference/partnership/create-partner-code) ```json { "tags": ["Partner"], "operationId": "createPartnerCode", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError" ], "requestBody": {"$ref": "#/components/requestBodies/PartnerCodeCreateRequest"}, "responses": { "200": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/PartnerCodeCreateResponse"}}}}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "504": {"$ref": "#/components/responses/GatewayTimeout"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"} } } ``` #### Get default partner link `GET /v1/partnership/partner/default-link` · Operation ID `getDefaultPartnerLink`. [Operation reference](https://www.exness-api.com/reference/partnership/get-default-partner-link) ```json { "tags": ["Partner"], "operationId": "getDefaultPartnerLink", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError" ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "required": ["full_default_link", "domain", "code", "path", "url"], "properties": { "full_default_link": {"type": "string"}, "domain": {"type": "string"}, "code": {"type": "string"}, "path": {"type": "string"}, "url": {"type": "string"} } } } } }, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "504": {"$ref": "#/components/responses/GatewayTimeout"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"} } } ``` #### Get partner links list `GET /v1/partnership/partner/links` · Operation ID `listPartnerLinks`. [Operation reference](https://www.exness-api.com/reference/partnership/list-partner-links) ```json { "tags": ["Partner"], "operationId": "listPartnerLinks", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError" ], "parameters": [ {"name": "is_blocked", "required": false, "in": "query", "schema": {"type": "boolean"}}, {"name": "exclude_ra", "required": false, "in": "query", "schema": {"type": "boolean"}}, { "name": "reward_schema", "required": false, "in": "query", "schema": {"type": "string", "enum": ["revenue_share", "cpa"]} } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "required": ["data", "total"], "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "reward_schema", "link_code", "is_default", "is_blocked", "is_custom", "partner_account" ], "properties": { "reward_schema": {"type": "string"}, "link_code": {"type": "string"}, "is_default": {"type": "boolean"}, "is_blocked": {"type": "boolean"}, "is_custom": {"type": "boolean"}, "partner_account": {"type": ["string", "null"]} } } }, "total": {"type": "integer"} } } } } }, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "504": {"$ref": "#/components/responses/GatewayTimeout"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"} } } ``` #### Get partner tier status `GET /v1/partnership/partner-tier/partner-state` · Operation ID `getPartnerTierState`. [Operation reference](https://www.exness-api.com/reference/partnership/get-partner-tier-state) ```json { "tags": ["Partner"], "operationId": "getPartnerTierState", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError" ], "responses": { "200": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/PartnerTierState"}}}}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "504": {"$ref": "#/components/responses/GatewayTimeout"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"} } } ``` #### Get tier fixed-per-lot matrices `GET /v1/partnership/partner-tier/tier/{tier_id}/fix-per-lot-matrix` · Operation ID `getPartnerTierFixPerLotMatrix`. [Operation reference](https://www.exness-api.com/reference/partnership/get-partner-tier-fix-per-lot-matrix) ```json { "tags": ["Partner"], "operationId": "getPartnerTierFixPerLotMatrix", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError", "NotFound" ], "parameters": [{"name": "tier_id", "in": "path", "required": true, "schema": {"type": "integer"}}], "responses": { "200": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/FixPerLotMatrix"}}}}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/NotFound"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "504": {"$ref": "#/components/responses/GatewayTimeout"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"} } } ``` #### Get tier qualification requirements `GET /v1/partnership/partner-tier/tier-conditions` · Operation ID `getPartnerTierConditions`. [Operation reference](https://www.exness-api.com/reference/partnership/get-partner-tier-conditions) ```json { "tags": ["Partner"], "operationId": "getPartnerTierConditions", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError" ], "responses": { "200": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/TierConditionsResponse"}}}}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "504": {"$ref": "#/components/responses/GatewayTimeout"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"} }, "parameters": [ {"name": "page", "in": "query", "required": false, "schema": {"type": "integer", "default": 1, "minimum": 1}}, { "name": "page_size", "in": "query", "required": false, "schema": {"type": "integer", "default": 100, "minimum": 1, "maximum": 1000} } ] } ``` #### Get reward rates per lot `GET /v1/partnership/lot-commission` · Operation ID `getLotCommission`. [Operation reference](https://www.exness-api.com/reference/partnership/get-lot-commission) ```json { "tags": ["Partner"], "operationId": "getLotCommission", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError" ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "required": ["account_type", "symbol", "multipliers"], "properties": { "account_type": {"type": "string"}, "symbol": {"type": "string"}, "multipliers": {"type": "object", "additionalProperties": {"type": "number"}} } } } } }, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "504": {"$ref": "#/components/responses/GatewayTimeout"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"} }, "parameters": [ {"name": "symbol", "required": true, "in": "query", "schema": {"type": "string"}}, {"name": "account_type", "required": true, "in": "query", "schema": {"type": "string"}} ] } ``` #### Get partner summary `GET /v1/partnership/partner/summary` · Operation ID `getPartnerSummary`. [Operation reference](https://www.exness-api.com/reference/partnership/get-partner-summary) ```json { "tags": ["Partner"], "operationId": "getPartnerSummary", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError" ], "responses": { "200": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/PartnerSummary"}}}}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "504": {"$ref": "#/components/responses/GatewayTimeout"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"} } } ``` ### Campaigns #### Get campaign details `GET /v1/partnership/campaigns/{campaign_code}` · Operation ID `getCampaign`. [Operation reference](https://www.exness-api.com/reference/partnership/get-campaign) ```json { "tags": ["Campaigns"], "operationId": "getCampaign", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError", "NotFound" ], "parameters": [{"name": "campaign_code", "required": true, "in": "path", "schema": {"type": "string"}}], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "required": [ "campaign_code", "title", "link_count", "archived", "is_blocked", "base_link", "created", "links", "reward_schema" ], "properties": { "campaign_code": {"type": "string"}, "title": {"type": "string"}, "link_count": {"type": "integer"}, "archived": {"type": "boolean"}, "is_blocked": {"type": "boolean"}, "base_link": {"type": "string"}, "created": {"type": "string", "format": "date-time"}, "links": { "type": "array", "items": { "type": "object", "required": ["link", "platform", "os", "tags"], "properties": { "link": {"type": "string"}, "platform": {"type": "string"}, "os": {"type": "string"}, "tags": {"type": "array", "items": {"type": "string"}} } } }, "reward_schema": {"type": "string", "enum": ["revenue_share", "cpa"]} } } } } }, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/NotFound"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "504": {"$ref": "#/components/responses/GatewayTimeout"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"} } } ``` #### Update campaign `PATCH /v1/partnership/campaigns/{campaign_code}` · Operation ID `updateCampaign`. [Operation reference](https://www.exness-api.com/reference/partnership/update-campaign) ```json { "tags": ["Campaigns"], "operationId": "updateCampaign", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError", "NotFound", "NotUnique" ], "parameters": [{"name": "campaign_code", "required": true, "in": "path", "schema": {"type": "string"}}], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "title": {"type": "string", "maxLength": 100}, "description": {"type": "string"}, "archived": {"type": "boolean"} } } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "required": [ "campaign_code", "title", "link_count", "archived", "is_blocked", "base_link", "created", "links", "reward_schema" ], "properties": { "campaign_code": {"type": "string"}, "title": {"type": "string"}, "link_count": {"type": "integer"}, "archived": {"type": "boolean"}, "is_blocked": {"type": "boolean"}, "base_link": {"type": "string"}, "created": {"type": "string", "format": "date-time"}, "links": { "type": "array", "items": { "type": "object", "required": ["link", "platform", "os", "tags"], "properties": { "link": {"type": "string"}, "platform": {"type": "string"}, "os": {"type": "string"}, "tags": {"type": "array", "items": {"type": "string"}} } } }, "reward_schema": {"type": "string", "enum": ["revenue_share", "cpa"]} } } } } }, "400": {"$ref": "#/components/responses/CampaignUpdateBadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/NotFound"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "504": {"$ref": "#/components/responses/GatewayTimeout"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"} } } ``` #### Get campaigns list `GET /v1/partnership/campaigns` · Operation ID `listCampaigns`. [Operation reference](https://www.exness-api.com/reference/partnership/list-campaigns) ```json { "tags": ["Campaigns"], "operationId": "listCampaigns", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError" ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "required": ["data", "totals"], "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "campaign_code", "title", "link_count", "archived", "base_link", "link_code", "created", "links", "reward_schema" ], "properties": { "campaign_code": {"type": "string"}, "title": {"type": "string"}, "link_count": {"type": "integer"}, "archived": {"type": "boolean"}, "base_link": {"type": "string"}, "link_code": {"type": "string"}, "created": {"type": "string", "format": "date-time"}, "links": { "type": "array", "items": { "type": "object", "required": ["link", "platform", "os", "tags", "link_code", "is_blocked", "is_custom"], "properties": { "link": {"type": "string"}, "platform": {"type": "string"}, "os": {"type": "string"}, "tags": {"type": "array", "items": {"type": "string"}}, "link_code": {"type": ["string", "null"]}, "is_blocked": {"type": "boolean"}, "is_custom": {"type": "boolean"} } } }, "reward_schema": {"type": "string", "enum": ["revenue_share", "cpa"]} } } }, "totals": {"type": "object", "required": ["count"], "properties": {"count": {"type": "integer"}}} } } } } }, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "504": {"$ref": "#/components/responses/GatewayTimeout"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"} }, "parameters": [ { "name": "reward_schema", "in": "query", "required": false, "schema": {"type": "string", "enum": ["revenue_share", "cpa"], "default": "revenue_share"} }, {"name": "archived", "in": "query", "required": false, "schema": {"type": "boolean"}}, {"name": "is_blocked", "in": "query", "required": false, "schema": {"type": "boolean"}}, {"name": "is_custom", "in": "query", "required": false, "schema": {"type": "boolean"}}, { "name": "partner_code", "in": "query", "required": false, "schema": {"type": "array", "items": {"type": "string"}}, "style": "form", "explode": false } ] } ``` #### Create campaign `POST /v1/partnership/campaigns` · Operation ID `createCampaign`. [Operation reference](https://www.exness-api.com/reference/partnership/create-campaign) ```json { "tags": ["Campaigns"], "operationId": "createCampaign", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError", "NotFound", "NotUnique", "ManyItems" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "title": {"type": "string", "maxLength": 100, "minLength": 1, "pattern": "\\S"}, "description": {"type": "string"}, "reward_schema": {"type": "string", "enum": ["revenue_share", "cpa"], "default": "revenue_share"}, "partner_code": {"type": "string", "maxLength": 10} }, "required": ["title"] } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "required": [ "campaign_code", "title", "link_count", "archived", "base_link", "link_code", "created", "links", "reward_schema" ], "properties": { "campaign_code": {"type": "string"}, "title": {"type": "string"}, "link_count": {"type": "integer"}, "archived": {"type": "boolean"}, "base_link": {"type": "string"}, "link_code": {"type": "string"}, "created": {"type": "string", "format": "date-time"}, "links": { "type": "array", "items": { "type": "object", "required": ["link", "platform", "os", "tags", "link_code", "is_blocked", "is_custom"], "properties": { "link": {"type": "string"}, "platform": {"type": "string"}, "os": {"type": "string"}, "tags": {"type": "array", "items": {"type": "string"}}, "link_code": {"type": ["string", "null"]}, "is_blocked": {"type": "boolean"}, "is_custom": {"type": "boolean"} } } }, "reward_schema": {"type": "string", "enum": ["revenue_share", "cpa"]} } } } } }, "400": {"$ref": "#/components/responses/CampaignCreateBadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/NotFound"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "504": {"$ref": "#/components/responses/GatewayTimeout"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"} } } ``` #### Create campaign tracking link `POST /v1/partnership/campaigns/{campaign_code}/links` · Operation ID `createCampaignLink`. [Operation reference](https://www.exness-api.com/reference/partnership/create-campaign-link) ```json { "tags": ["Campaigns"], "operationId": "createCampaignLink", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError", "NotFound", "NotUnique", "ManyItems" ], "parameters": [{"name": "campaign_code", "required": true, "in": "path", "schema": {"type": "string"}}], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "domain": {"type": "string"}, "page": {"type": "string"}, "platform": {"type": "string", "enum": ["mobile"]}, "os": {"type": "string", "enum": ["ios", "android"]}, "tags": { "type": "array", "maxItems": 5, "items": {"type": "string", "minLength": 1, "maxLength": 16, "pattern": "^[A-Za-z0-9]+$"} }, "partner_code": {"type": "string", "maxLength": 10} }, "required": ["domain"] } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "required": ["link", "platform", "os", "tags", "link_code", "is_blocked", "is_custom"], "properties": { "link": {"type": "string"}, "platform": {"type": "string"}, "os": {"type": "string"}, "tags": {"type": "array", "items": {"type": "string"}}, "link_code": {"type": ["string", "null"]}, "is_blocked": {"type": "boolean"}, "is_custom": {"type": "boolean"} } } } } }, "400": {"$ref": "#/components/responses/CampaignCreateBadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/NotFound"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "504": {"$ref": "#/components/responses/GatewayTimeout"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"} } } ``` ### Reports #### Get clients report `GET /v1/partnership/reports/clients` · Operation ID `listReportClients`. [Operation reference](https://www.exness-api.com/reference/partnership/list-report-clients) ```json { "tags": ["Reports"], "operationId": "listReportClients", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError" ], "parameters": [ { "name": "limit", "required": false, "in": "query", "schema": {"type": "integer", "default": 100, "minimum": 0, "maximum": 1000} }, {"name": "offset", "required": false, "in": "query", "schema": {"type": "integer", "default": 0, "minimum": 0}}, { "name": "partner_account", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "client_uid", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "short_client_uid", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "client_country", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, {"name": "reg_date_from", "required": false, "in": "query", "schema": {"type": "string", "format": "date"}}, {"name": "reg_date_to", "required": false, "in": "query", "schema": {"type": "string", "format": "date"}}, {"name": "trade_fn_from", "required": false, "in": "query", "schema": {"type": "string", "format": "date"}}, {"name": "trade_fn_to", "required": false, "in": "query", "schema": {"type": "string", "format": "date"}}, { "name": "client_status", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "client_contact_sharing_status", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "contact_sharing_progress_status", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "last_client_contact_sharing_dt_from", "required": false, "in": "query", "schema": {"type": "string", "format": "date"} }, { "name": "last_client_contact_sharing_dt_to", "required": false, "in": "query", "schema": {"type": "string", "format": "date"} }, {"name": "ordering", "required": false, "in": "query", "schema": {"type": "string"}} ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "required": ["data", "totals"], "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "partner_account", "client_uid", "reg_date", "client_country", "volume_lots", "volume_mln_usd", "reward_usd", "trade_fn", "client_contact_sharing_status", "client_status", "last_partner_contact_sharing_dt", "comment", "rebate_amount_usd", "kyc_passed", "ftd_received", "ftt_made", "last_client_contact_sharing_dt", "client_balance", "client_equity", "deposit_amount", "ftd_amount", "last_week_failed_deposit_count" ], "properties": { "partner_account": {"type": "string"}, "client_uid": {"type": "string"}, "reg_date": {"type": "string", "format": "date"}, "client_country": {"type": "string"}, "volume_lots": {"type": "number"}, "volume_mln_usd": {"type": "number"}, "reward_usd": {"type": "string"}, "trade_fn": {"type": ["string", "null"], "format": "date"}, "client_contact_sharing_status": {"type": "string"}, "client_status": {"type": "string"}, "last_partner_contact_sharing_dt": {"type": ["string", "null"], "format": "date-time"}, "comment": {"type": ["string", "null"]}, "rebate_amount_usd": {"type": "number"}, "kyc_passed": {"type": "boolean"}, "ftd_received": {"type": "boolean"}, "ftt_made": {"type": "boolean"}, "last_client_contact_sharing_dt": {"type": ["string", "null"], "format": "date-time"}, "client_balance": {"type": "integer"}, "client_equity": {"type": "integer"}, "deposit_amount": {"type": "integer"}, "ftd_amount": {"type": "integer"}, "last_week_failed_deposit_count": {"type": "integer"} } } }, "totals": { "type": "object", "required": [ "count", "volume_lots", "volume_mln_usd", "reward_usd", "server_dt", "available_for_request" ], "properties": { "count": {"type": "integer"}, "volume_lots": {"type": "number"}, "volume_mln_usd": {"type": "number"}, "reward_usd": {"type": "string"}, "server_dt": {"type": ["string", "null"], "format": "date-time"}, "available_for_request": {"type": "integer"} } } } } } } }, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "504": {"$ref": "#/components/responses/GatewayTimeout"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"} } } ``` #### Get reward history `GET /v1/partnership/reports/rewards` · Operation ID `listRewardReports`. [Operation reference](https://www.exness-api.com/reference/partnership/list-reward-reports) ```json { "tags": ["Reports"], "operationId": "listRewardReports", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError" ], "parameters": [ { "name": "limit", "required": false, "in": "query", "schema": {"type": "integer", "default": 100, "minimum": 0, "maximum": 1000} }, {"name": "offset", "required": false, "in": "query", "schema": {"type": "integer", "default": 0, "minimum": 0}}, { "name": "aggregate_by", "required": true, "in": "query", "schema": { "type": "string", "enum": ["year", "quarter", "month", "week", "day", "hour", "minute", "second", "raw"] } }, { "name": "client_account", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "client_account_type", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "client_uid", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "country", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "platform", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, {"name": "currency", "required": false, "in": "query", "schema": {"type": "string"}}, { "name": "link_code", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "partner_account", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "partner_account_name", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, {"name": "reward_date_from", "required": false, "in": "query", "schema": {"type": "string", "format": "date"}}, {"name": "reward_date_to", "required": false, "in": "query", "schema": {"type": "string", "format": "date"}}, { "name": "subpartner_account", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, {"name": "ordering", "required": false, "in": "query", "schema": {"type": "string"}} ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "required": ["data", "totals"], "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "client_account", "client_account_type", "client_uid", "country", "platform", "currency", "link_code", "orders_count", "partner_account", "partner_account_name", "reward", "reward_date", "reward_usd", "subpartner_account", "volume_lots", "volume_mln_usd" ], "properties": { "client_account": {"type": ["string", "null"]}, "client_account_type": {"type": ["string", "null"]}, "client_uid": {"type": ["string", "null"]}, "country": {"type": ["string", "null"]}, "platform": {"type": ["string", "null"]}, "currency": {"type": "string"}, "link_code": {"type": ["string", "null"]}, "orders_count": {"type": "integer"}, "partner_account": {"type": "string"}, "partner_account_name": {"type": ["string", "null"]}, "reward": {"type": "string"}, "reward_date": {"type": "string", "format": "date-time"}, "reward_usd": {"type": "string"}, "subpartner_account": {"type": ["string", "null"]}, "volume_lots": {"type": "number"}, "volume_mln_usd": {"type": "number"} } } }, "totals": { "type": "object", "required": [ "count", "volume_mln_usd", "volume_lots", "reward", "reward_usd", "orders_count", "currency" ], "properties": { "count": {"type": "integer"}, "volume_mln_usd": {"type": "number"}, "volume_lots": {"type": "number"}, "reward": {"type": "string"}, "reward_usd": {"type": "string"}, "orders_count": {"type": "integer"}, "currency": {"type": "array", "items": {"type": "string"}} } } } } } } }, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "504": {"$ref": "#/components/responses/GatewayTimeout"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"} } } ``` #### Get second-level reward history `GET /v1/partnership/reports/rewards/secondlevel` · Operation ID `listSecondLevelRewardReports`. [Operation reference](https://www.exness-api.com/reference/partnership/list-second-level-reward-reports) ```json { "tags": ["Reports"], "operationId": "listSecondLevelRewardReports", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError" ], "parameters": [ { "name": "limit", "required": false, "in": "query", "schema": {"type": "integer", "default": 100, "minimum": 0, "maximum": 1000} }, {"name": "offset", "required": false, "in": "query", "schema": {"type": "integer", "default": 0, "minimum": 0}}, { "name": "aggregate_by", "required": true, "in": "query", "schema": { "type": "string", "enum": ["year", "quarter", "month", "week", "day", "hour", "minute", "second", "raw"] } }, { "name": "client_account", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "client_account_type", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "client_uid", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "country", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "platform", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, {"name": "currency", "required": false, "in": "query", "schema": {"type": "string"}}, { "name": "link_code", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "partner_account", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "partner_account_name", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, {"name": "reward_date_from", "required": false, "in": "query", "schema": {"type": "string", "format": "date"}}, {"name": "reward_date_to", "required": false, "in": "query", "schema": {"type": "string", "format": "date"}}, { "name": "subpartner_account", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, {"name": "ordering", "required": false, "in": "query", "schema": {"type": "string"}} ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "required": ["data", "totals"], "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "client_account", "client_account_type", "client_uid", "country", "platform", "currency", "link_code", "orders_count", "partner_account", "partner_account_name", "reward", "reward_date", "reward_usd", "subpartner_account", "volume_lots", "volume_mln_usd" ], "properties": { "client_account": {"type": ["string", "null"]}, "client_account_type": {"type": ["string", "null"]}, "client_uid": {"type": ["string", "null"]}, "country": {"type": ["string", "null"]}, "platform": {"type": ["string", "null"]}, "currency": {"type": "string"}, "link_code": {"type": ["string", "null"]}, "orders_count": {"type": "integer"}, "partner_account": {"type": "string"}, "partner_account_name": {"type": ["string", "null"]}, "reward": {"type": "string"}, "reward_date": {"type": "string", "format": "date-time"}, "reward_usd": {"type": "string"}, "subpartner_account": {"type": ["string", "null"]}, "volume_lots": {"type": "number"}, "volume_mln_usd": {"type": "number"} } } }, "totals": { "type": "object", "required": [ "count", "volume_mln_usd", "volume_lots", "reward", "reward_usd", "orders_count", "currency" ], "properties": { "count": {"type": "integer"}, "volume_mln_usd": {"type": "number"}, "volume_lots": {"type": "number"}, "reward": {"type": "string"}, "reward_usd": {"type": "string"}, "orders_count": {"type": "integer"}, "currency": {"type": "array", "items": {"type": "string"}} } } } } } } }, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "504": {"$ref": "#/components/responses/GatewayTimeout"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"} } } ``` #### Get client accounts report `GET /v1/partnership/reports/clients/accounts` · Operation ID `listReportClientAccounts`. [Operation reference](https://www.exness-api.com/reference/partnership/list-report-client-accounts) ```json { "tags": ["Reports"], "operationId": "listReportClientAccounts", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError" ], "parameters": [ { "name": "limit", "required": false, "in": "query", "schema": {"type": "integer", "default": 10, "minimum": 0, "maximum": 1000} }, {"name": "offset", "required": false, "in": "query", "schema": {"type": "integer", "default": 0, "minimum": 0}}, { "name": "partner_account_name", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "partner_account", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "partner_code", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "client_country", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "platform", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "client_uid", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "client_account", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "client_account_type", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "client_account_created_from", "required": false, "in": "query", "schema": {"type": "string", "format": "date"} }, { "name": "client_account_created_to", "required": false, "in": "query", "schema": {"type": "string", "format": "date"} }, { "name": "client_account_last_trade_from", "required": false, "in": "query", "schema": {"type": "string", "format": "date"} }, { "name": "client_account_last_trade_to", "required": false, "in": "query", "schema": {"type": "string", "format": "date"} }, {"name": "comment", "required": false, "in": "query", "schema": {"type": "string"}}, {"name": "ordering", "required": false, "in": "query", "schema": {"type": "string"}} ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "required": ["data", "totals"], "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "id", "partner_account", "partner_account_name", "partner_account_currency", "partner_code", "client_uid", "client_account", "client_account_type", "client_country", "platform", "client_account_created", "client_account_last_trade", "volume_lots", "volume_mln_usd", "reward", "reward_usd", "comment" ], "properties": { "id": {"type": "integer"}, "partner_account": {"type": "string"}, "partner_account_name": {"type": "string"}, "partner_account_currency": {"type": "string"}, "partner_code": {"type": ["string", "null"]}, "client_uid": {"type": ["string", "null"]}, "client_account": {"type": "string"}, "client_account_type": {"type": ["string", "null"]}, "client_country": {"type": "string"}, "platform": {"type": ["string", "null"]}, "client_account_created": {"type": "string", "format": "date"}, "client_account_last_trade": {"type": ["string", "null"], "format": "date"}, "volume_lots": {"type": "string"}, "volume_mln_usd": {"type": "string"}, "reward": {"type": "string"}, "reward_usd": {"type": "string"}, "comment": {"type": ["string", "null"]} } } }, "totals": { "type": "object", "required": [ "count", "clients_count", "volume_mln_usd", "volume_lots", "reward", "reward_usd", "partner_account_currency" ], "properties": { "count": {"type": "integer"}, "clients_count": {"type": "integer"}, "volume_mln_usd": {"type": "string"}, "volume_lots": {"type": "string"}, "reward": {"type": "string"}, "reward_usd": {"type": "string"}, "partner_account_currency": {"type": "array", "items": {"type": "string"}} } } } } } } }, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "504": {"$ref": "#/components/responses/GatewayTimeout"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"} } } ``` #### Get second-level client accounts report `GET /v1/partnership/reports/clients/accounts/second-level` · Operation ID `listSecondLevelReportClientAccounts`. [Operation reference](https://www.exness-api.com/reference/partnership/list-second-level-report-client-accounts) ```json { "tags": ["Reports"], "operationId": "listSecondLevelReportClientAccounts", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError" ], "parameters": [ { "name": "limit", "required": false, "in": "query", "schema": {"type": "integer", "default": 10, "minimum": 0, "maximum": 1000} }, {"name": "offset", "required": false, "in": "query", "schema": {"type": "integer", "default": 0, "minimum": 0}}, { "name": "partner_account_name", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "partner_account", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "subpartner_uid", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "subpartner_account", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "client_uid", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "client_country", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "platform", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "client_account_created_from", "required": false, "in": "query", "schema": {"type": "string", "format": "date"} }, { "name": "client_account_created_to", "required": false, "in": "query", "schema": {"type": "string", "format": "date"} }, { "name": "client_account_last_trade_from", "required": false, "in": "query", "schema": {"type": "string", "format": "date"} }, { "name": "client_account_last_trade_to", "required": false, "in": "query", "schema": {"type": "string", "format": "date"} }, {"name": "ordering", "required": false, "in": "query", "schema": {"type": "string"}} ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "required": ["data", "totals"], "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "id", "partner_account", "partner_account_name", "partner_account_currency", "subpartner_uid", "subpartner_account", "client_uid", "client_account", "client_country", "platform", "client_account_created", "client_account_last_trade", "volume_lots", "volume_mln_usd", "reward", "reward_usd", "comment" ], "properties": { "id": {"type": "integer"}, "partner_account": {"type": "string"}, "partner_account_name": {"type": "string"}, "partner_account_currency": {"type": "string"}, "subpartner_uid": {"type": ["string", "null"]}, "subpartner_account": {"type": ["string", "null"]}, "client_uid": {"type": ["string", "null"]}, "client_account": {"type": ["string", "null"]}, "client_country": {"type": "string"}, "platform": {"type": ["string", "null"]}, "client_account_created": {"type": "string", "format": "date"}, "client_account_last_trade": {"type": ["string", "null"], "format": "date"}, "volume_lots": {"type": "string"}, "volume_mln_usd": {"type": "string"}, "reward": {"type": "string"}, "reward_usd": {"type": "string"}, "comment": {"type": ["string", "null"]} } } }, "totals": { "type": "object", "required": [ "count", "clients_count", "volume_mln_usd", "volume_lots", "reward", "reward_usd", "partner_account_currency" ], "properties": { "count": {"type": "integer"}, "clients_count": {"type": "integer"}, "volume_mln_usd": {"type": "string"}, "volume_lots": {"type": "string"}, "reward": {"type": "string"}, "reward_usd": {"type": "string"}, "partner_account_currency": {"type": "array", "items": {"type": "string"}} } } } } } } }, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "504": {"$ref": "#/components/responses/GatewayTimeout"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"} } } ``` #### Set client account comment `POST /v1/partnership/reports/clients/comment` · Operation ID `createReportClientComment`. [Operation reference](https://www.exness-api.com/reference/partnership/create-report-client-comment) ```json { "tags": ["Reports"], "operationId": "createReportClientComment", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError", "NotFound" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "partner_account": {"type": "string"}, "client_account": {"type": "string"}, "comment": {"type": "string", "maxLength": 700}, "comment_type": {"type": "string", "enum": ["CLIENT", "SUBPARTNER"], "default": "CLIENT"} }, "required": ["partner_account", "client_account", "comment"] } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "required": ["status"], "properties": {"status": {"type": "string", "enum": ["OK"]}} } } } }, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/NotFound"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "504": {"$ref": "#/components/responses/GatewayTimeout"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"} } } ``` #### Get daily client registration counts `GET /v1/partnership/reports/clients/registrations/byday` · Operation ID `listDailyClientRegistrations`. [Operation reference](https://www.exness-api.com/reference/partnership/list-daily-client-registrations) ```json { "tags": ["Reports"], "operationId": "listDailyClientRegistrations", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError" ], "parameters": [ {"name": "reg_date_from", "required": true, "in": "query", "schema": {"type": "string", "format": "date"}}, {"name": "reg_date_to", "required": true, "in": "query", "schema": {"type": "string", "format": "date"}} ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "required": ["data", "totals"], "properties": { "data": { "type": "array", "items": { "type": "object", "required": ["amount", "reg_date"], "properties": {"amount": {"type": "integer"}, "reg_date": {"type": "string", "format": "date"}} } }, "totals": {"type": "object", "required": ["amount"], "properties": {"amount": {"type": "integer"}}} } } } } }, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "504": {"$ref": "#/components/responses/GatewayTimeout"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"} } } ``` #### Get subpartners report `GET /v1/partnership/reports/clients/subpartners` · Operation ID `listSubpartnerReports`. [Operation reference](https://www.exness-api.com/reference/partnership/list-subpartner-reports) ```json { "tags": ["Reports"], "operationId": "listSubpartnerReports", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError" ], "parameters": [ {"name": "limit", "required": false, "in": "query", "schema": {"type": "integer", "minimum": 0, "maximum": 1000}}, {"name": "offset", "required": false, "in": "query", "schema": {"type": "integer", "default": 0, "minimum": 0}}, { "name": "partner_account", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "partner_account_name", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, {"name": "reg_date", "required": false, "in": "query", "schema": {"type": "string", "format": "date"}}, {"name": "reg_date_from", "required": false, "in": "query", "schema": {"type": "string", "format": "date"}}, {"name": "reg_date_to", "required": false, "in": "query", "schema": {"type": "string", "format": "date"}}, { "name": "last_subclient_reward_dt_from", "required": false, "in": "query", "schema": {"type": "string", "format": "date"} }, { "name": "last_subclient_reward_dt_to", "required": false, "in": "query", "schema": {"type": "string", "format": "date"} }, { "name": "subpartner_uid", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "subpartner_account", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "subpartner_status", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, {"name": "comment", "required": false, "in": "query", "schema": {"type": "string"}}, {"name": "ordering", "required": false, "in": "query", "schema": {"type": "string"}} ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "required": ["data", "totals"], "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "partner_account", "reg_date", "subclients_count", "subclients_volume_lots", "subclients_volume_mln_usd", "last_subclient_reward_dt", "partner_account_name", "subpartner_uid", "subpartner_account", "subpartner_tier", "subpartner_tier_order", "subclient_commission_usd", "comment" ], "properties": { "partner_account": {"type": "string"}, "reg_date": {"type": "string", "format": "date"}, "subclients_count": {"type": "integer"}, "subclients_volume_lots": {"type": "number"}, "subclients_volume_mln_usd": {"type": "number"}, "last_subclient_reward_dt": {"type": ["string", "null"], "format": "date-time"}, "partner_account_name": {"type": ["string", "null"]}, "subpartner_uid": {"type": "string"}, "subpartner_account": {"type": "string"}, "subpartner_tier": {"type": "string"}, "subpartner_tier_order": {"type": "integer"}, "subclient_commission_usd": {"type": "number"}, "comment": {"type": ["string", "null"]} } } }, "totals": { "type": "object", "required": [ "count_subpartners", "count_subpartners_account", "subclients_count", "subclients_volume_lots", "subclients_volume_mln_usd" ], "properties": { "count_subpartners": {"type": "integer"}, "count_subpartners_account": {"type": "integer"}, "subclients_count": {"type": ["integer", "null"]}, "subclients_volume_lots": {"type": ["number", "null"]}, "subclients_volume_mln_usd": {"type": ["number", "null"]} } } } } } } }, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "504": {"$ref": "#/components/responses/GatewayTimeout"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"} } } ``` #### Get performance statistics (conversion) `GET /v1/partnership/reports/conversion` · Operation ID `listConversionReports`. Supply non-empty `ordering`. For an array of conversion tags, repeat the `tags` query key. Keep the exact transmitted query in the signature. [Operation reference](https://www.exness-api.com/reference/partnership/list-conversion-reports) ```json { "tags": ["Reports"], "operationId": "listConversionReports", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError" ], "parameters": [ { "name": "limit", "required": false, "in": "query", "schema": {"type": "integer", "default": 100, "minimum": 0, "maximum": 1000} }, {"name": "offset", "required": false, "in": "query", "schema": {"type": "integer", "default": 0, "minimum": 0}}, {"name": "date_from", "required": false, "in": "query", "schema": {"type": "string", "format": "date"}}, {"name": "date_to", "required": false, "in": "query", "schema": {"type": "string", "format": "date"}}, { "name": "country", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "campaign_code", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, {"name": "campaign_title", "required": false, "in": "query", "schema": {"type": "string"}}, { "name": "tags", "required": false, "in": "query", "style": "form", "explode": true, "schema": { "type": "array", "maxItems": 4, "items": {"type": "string", "minLength": 1, "maxLength": 16, "pattern": "^[\\d\\w_]+$"} } }, {"name": "referrer_domain", "required": false, "in": "query", "schema": {"type": "string"}}, { "name": "group_by", "required": true, "in": "query", "schema": { "type": "string", "enum": ["day", "week", "month", "year", "country", "link", "campaign", "referrer", "referrer_domain"] } }, {"name": "ordering", "required": true, "in": "query", "schema": {"type": "string", "minLength": 1}} ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "required": ["data", "totals"], "properties": { "data": { "type": "array", "items": { "type": "object", "required": ["group_fields"], "properties": { "group_fields": {"type": "array", "items": {"type": "object", "additionalProperties": true}} }, "additionalProperties": true } }, "totals": { "type": "object", "required": [ "count", "click_count", "registration_count", "deposit_count", "deposit_usd", "trade_starting_count", "volume_mln_usd", "reward_usd", "volume_lots", "conversion", "impression_count", "spend" ], "properties": { "count": {"type": "integer"}, "click_count": {"type": "integer"}, "registration_count": {"type": "integer"}, "deposit_count": {"type": "integer"}, "deposit_usd": {"type": "integer"}, "trade_starting_count": {"type": "integer"}, "volume_mln_usd": {"type": "number"}, "reward_usd": {"type": "number"}, "volume_lots": {"type": "number"}, "conversion": {"type": "number"}, "impression_count": {"type": "integer"}, "spend": {"type": "number"} } } } } } } }, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "504": {"$ref": "#/components/responses/GatewayTimeout"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"} } } ``` #### Get performance statistics (campaign) `GET /v1/partnership/reports/conversion/campaign/{campaign_code}` · Operation ID `getCampaignConversionReport`. [Operation reference](https://www.exness-api.com/reference/partnership/get-campaign-conversion-report) ```json { "tags": ["Reports"], "operationId": "getCampaignConversionReport", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError", "NotFound" ], "parameters": [ {"name": "campaign_code", "required": true, "in": "path", "schema": {"type": "string"}}, {"name": "date_from", "required": false, "in": "query", "schema": {"type": "string", "format": "date"}}, {"name": "date_to", "required": false, "in": "query", "schema": {"type": "string", "format": "date"}}, { "name": "country", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, {"name": "campaign_title", "required": false, "in": "query", "schema": {"type": "string", "maxLength": 100}}, { "name": "tags", "required": false, "in": "query", "style": "form", "explode": true, "schema": { "type": "array", "maxItems": 4, "items": {"type": "string", "minLength": 1, "maxLength": 16, "pattern": "^[\\d\\w_]+$"} } }, {"name": "referrer_domain", "required": false, "in": "query", "schema": {"type": "string"}} ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "required": ["data", "totals"], "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "click_count", "registration_count", "deposit_count", "deposit_usd", "trade_starting_count", "volume_mln_usd", "reward_usd", "volume_lots", "conversion", "impression_count", "spend", "ctr", "roi", "cpc", "cpr", "epc", "partner_link", "campaign" ], "properties": { "click_count": {"type": "integer"}, "registration_count": {"type": "integer"}, "deposit_count": {"type": "integer"}, "deposit_usd": {"type": "integer"}, "trade_starting_count": {"type": "integer"}, "volume_mln_usd": {"type": "number"}, "reward_usd": {"type": "number"}, "volume_lots": {"type": "number"}, "conversion": {"type": "number"}, "impression_count": {"type": "integer"}, "spend": {"type": "number"}, "ctr": {"type": "number"}, "roi": {"type": "number"}, "cpc": {"type": "number"}, "cpr": {"type": "number"}, "epc": {"type": "number"}, "partner_link": {"type": "string"}, "campaign": {"type": "string"} } } }, "totals": { "type": "object", "required": [ "count", "click_count", "registration_count", "deposit_count", "deposit_usd", "trade_starting_count", "volume_mln_usd", "reward_usd", "volume_lots", "conversion", "impression_count", "spend" ], "properties": { "count": {"type": "integer"}, "click_count": {"type": "integer"}, "registration_count": {"type": "integer"}, "deposit_count": {"type": "integer"}, "deposit_usd": {"type": "integer"}, "trade_starting_count": {"type": "integer"}, "volume_mln_usd": {"type": "number"}, "reward_usd": {"type": "number"}, "volume_lots": {"type": "number"}, "conversion": {"type": "number"}, "impression_count": {"type": "integer"}, "spend": {"type": "number"} } } } } } } }, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/NotFound"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "504": {"$ref": "#/components/responses/GatewayTimeout"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"} } } ``` #### Get performance statistics (IB) `GET /v1/partnership/reports/ib/performance` · Operation ID `getIbPerformanceReport`. Supply one or two documented `group_by` dimensions. The response identifies grouped dimensions via `group_fields`. [Operation reference](https://www.exness-api.com/reference/partnership/get-ib-performance-report) ```json { "tags": ["Reports"], "operationId": "getIbPerformanceReport", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError" ], "parameters": [ { "name": "limit", "required": false, "in": "query", "schema": {"type": "integer", "default": 100, "minimum": 0, "maximum": 1000} }, {"name": "offset", "required": false, "in": "query", "schema": {"type": "integer", "default": 0, "minimum": 0}}, { "name": "group_by", "required": true, "in": "query", "style": "form", "explode": false, "schema": { "type": "array", "minItems": 1, "maxItems": 2, "items": { "type": "string", "enum": [ "day", "week", "month", "year", "country", "campaign_title", "partner_code", "referrer_domain", "track1", "track2", "track3", "track4", "track5", "utm_source", "utm_medium", "utm_campaign", "utm_term", "utm_content" ] } } }, {"name": "link_clicked_from", "required": false, "in": "query", "schema": {"type": "string", "format": "date"}}, {"name": "link_clicked_to", "required": false, "in": "query", "schema": {"type": "string", "format": "date"}}, { "name": "country", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "partner_code", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "campaign_title", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, {"name": "ordering", "required": false, "in": "query", "schema": {"type": "string"}} ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "required": ["data", "totals"], "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "group_fields", "click_count", "registration_count", "kyc_passed", "first_deposit_count", "trade_starting_trial_count", "trade_starting_real_count", "volume_mln_usd", "volume_lots", "reward_usd" ], "properties": { "group_fields": {"type": "array", "items": {"type": "object", "additionalProperties": true}}, "click_count": {"type": "integer"}, "registration_count": {"type": "integer"}, "kyc_passed": {"type": "integer"}, "first_deposit_count": {"type": "integer"}, "trade_starting_trial_count": {"type": "integer"}, "trade_starting_real_count": {"type": "integer"}, "volume_mln_usd": {"type": "number"}, "volume_lots": {"type": "number"}, "reward_usd": {"type": "number"} } } }, "totals": { "type": "object", "required": [ "count", "click_count", "registration_count", "kyc_passed", "first_deposit_count", "deposit_usd", "trade_starting_real_count", "trade_starting_trial_count", "volume_mln_usd", "volume_lots", "reward_usd" ], "properties": { "count": {"type": "integer"}, "click_count": {"type": "integer"}, "registration_count": {"type": "integer"}, "kyc_passed": {"type": "integer"}, "first_deposit_count": {"type": "integer"}, "deposit_usd": {"type": "integer"}, "trade_starting_real_count": {"type": "integer"}, "trade_starting_trial_count": {"type": "integer"}, "volume_mln_usd": {"type": "number"}, "volume_lots": {"type": "number"}, "reward_usd": {"type": "number"} } } } } } } }, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "504": {"$ref": "#/components/responses/GatewayTimeout"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"} } } ``` #### Get client transactions `GET /v1/partnership/reports/orders` · Operation ID `listOrderReports`. This report is for closed client transactions. The guide documents a maximum date range of 32 days. [Operation reference](https://www.exness-api.com/reference/partnership/list-order-reports) ```json { "tags": ["Reports"], "operationId": "listOrderReports", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError" ], "parameters": [ { "name": "limit", "required": false, "in": "query", "schema": {"type": "integer", "default": 100, "minimum": 0, "maximum": 1000} }, {"name": "offset", "required": false, "in": "query", "schema": {"type": "integer", "default": 0, "minimum": 0}}, { "name": "client_account", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, {"name": "date_from", "required": true, "in": "query", "schema": {"type": "string", "format": "date"}}, {"name": "date_to", "required": true, "in": "query", "schema": {"type": "string", "format": "date"}}, {"name": "order_id", "required": false, "in": "query", "schema": {"type": "integer"}}, {"name": "ordering", "required": false, "in": "query", "schema": {"type": "string"}} ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "required": ["data", "totals"], "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "order_id", "symbol", "formula_code", "volume_lots", "volume_mln_usd", "reward_usd", "reward", "currency", "open_spread", "close_spread", "open_date", "close_date", "client_account_type", "avg_spread", "date", "partner_account", "client_account" ], "properties": { "symbol": {"type": "string"}, "formula_code": {"type": "string"}, "volume_lots": {"type": "number"}, "volume_mln_usd": {"type": "number"}, "reward_usd": {"type": "number"}, "reward": {"type": "number"}, "currency": {"type": "string"}, "open_spread": {"type": ["number", "null"]}, "close_spread": {"type": ["number", "null"]}, "open_date": {"type": ["string", "null"], "format": "date-time"}, "close_date": {"type": "string", "format": "date-time"}, "client_account_type": {"type": "string"}, "avg_spread": {"type": ["number", "null"]}, "date": {"type": "string", "format": "date"}, "partner_account": {"type": "string"}, "client_account": {"type": "string"}, "order_id": {"type": "string", "pattern": "^[^:]+:[0-9]+$"} } } }, "totals": { "type": "object", "required": [ "client_account_type", "count", "reward_usd", "volume_lots", "volume_mln_usd", "currency" ], "properties": { "client_account_type": {"type": "array", "items": {"type": "string"}}, "count": {"type": "integer"}, "reward_usd": {"type": "number"}, "volume_lots": {"type": "number"}, "volume_mln_usd": {"type": "number"}, "currency": {"type": "array", "items": {"type": "string"}} } } } } } } }, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "504": {"$ref": "#/components/responses/GatewayTimeout"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"} } } ``` #### Get transactions pending payment `GET /v1/partnership/reports/orders/pending` · Operation ID `listPendingOrderReports`. [Operation reference](https://www.exness-api.com/reference/partnership/list-pending-order-reports) ```json { "tags": ["Reports"], "operationId": "listPendingOrderReports", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError" ], "parameters": [ { "name": "limit", "required": false, "in": "query", "schema": {"type": "integer", "default": 100, "minimum": 0, "maximum": 1000} }, {"name": "offset", "required": false, "in": "query", "schema": {"type": "integer", "default": 0, "minimum": 0}}, { "name": "client_account", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, {"name": "ordering", "required": false, "in": "query", "schema": {"type": "string"}} ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "required": ["data", "totals"], "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "client_account", "client_account_type", "count_orders", "volume_lots", "volume_mln_usd", "currency" ], "properties": { "client_account": {"type": "string"}, "client_account_type": {"type": "string"}, "count_orders": {"type": "integer"}, "volume_lots": {"type": "number"}, "volume_mln_usd": {"type": "number"}, "currency": {"type": "string"} } } }, "totals": { "type": "object", "required": ["count", "count_orders", "volume_lots", "volume_mln_usd"], "properties": { "count": {"type": "integer"}, "count_orders": {"type": "integer"}, "volume_lots": {"type": "number"}, "volume_mln_usd": {"type": "number"} } } } } } } }, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "504": {"$ref": "#/components/responses/GatewayTimeout"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"} } } ``` #### Get progress rewards list `GET /v1/partnership/reports/progress-reward` · Operation ID `listProgressRewardReports`. [Operation reference](https://www.exness-api.com/reference/partnership/list-progress-reward-reports) ```json { "tags": ["Reports"], "operationId": "listProgressRewardReports", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError", "NotFound" ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "required": ["data", "totals"], "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "compensation_id", "payment_date", "compensation_period_start", "compensation_period_end", "old_tier_group_id", "new_tier_group_id", "compensation_amount", "commission_percentage" ], "properties": { "compensation_id": {"type": "integer"}, "payment_date": {"type": "string", "format": "date-time"}, "compensation_period_start": {"type": "string", "format": "date-time"}, "compensation_period_end": {"type": "string", "format": "date-time"}, "old_tier_group_id": {"type": "integer"}, "new_tier_group_id": {"type": "integer"}, "compensation_amount": {"type": "number"}, "commission_percentage": { "type": "object", "additionalProperties": { "type": "object", "required": ["old_tier", "new_tier"], "properties": {"old_tier": {"type": "number"}, "new_tier": {"type": "number"}} } } } } }, "totals": { "type": "object", "required": ["count", "ab_test_enabled"], "properties": {"count": {"type": "integer"}, "ab_test_enabled": {"type": "boolean"}} } } } } } }, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/NotFound"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "504": {"$ref": "#/components/responses/GatewayTimeout"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"} } } ``` #### Get progress reward calculation details `GET /v1/partnership/reports/progress-reward/{compensation_id}/detailed` · Operation ID `getProgressRewardDetails`. [Operation reference](https://www.exness-api.com/reference/partnership/get-progress-reward-details) ```json { "tags": ["Reports"], "operationId": "getProgressRewardDetails", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError", "NotFound" ], "parameters": [ {"name": "compensation_id", "required": true, "in": "path", "schema": {"type": "integer"}}, { "name": "limit", "required": false, "in": "query", "schema": {"type": "integer", "default": 20, "minimum": 0, "maximum": 1000} }, {"name": "offset", "required": false, "in": "query", "schema": {"type": "integer", "default": 0, "minimum": 0}}, {"name": "ordering", "required": false, "in": "query", "schema": {"type": "string"}} ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "required": ["data", "totals"], "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "id", "client_account", "reward_date", "account_type", "order_id", "progress_reward_amount_usd", "initial_reward_usd", "initial_reward_size", "old_reward_size", "new_reward_size" ], "properties": { "id": {"type": "integer"}, "client_account": {"type": "string"}, "reward_date": {"type": "string", "format": "date-time"}, "account_type": {"type": "string"}, "order_id": {"type": "integer"}, "progress_reward_amount_usd": {"type": "number"}, "initial_reward_usd": {"type": "number"}, "initial_reward_size": {"type": "number"}, "old_reward_size": {"type": "number"}, "new_reward_size": {"type": "number"} } } }, "totals": { "type": "object", "required": [ "count", "progress_reward_amount_usd", "progress_reward_period_start", "progress_reward_period_end" ], "properties": { "count": {"type": "integer"}, "progress_reward_amount_usd": {"type": "number"}, "progress_reward_period_start": {"type": "string", "format": "date-time"}, "progress_reward_period_end": {"type": "string", "format": "date-time"} } } } } } } }, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/NotFound"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "504": {"$ref": "#/components/responses/GatewayTimeout"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"} } } ``` ### Rebates #### Get rebate batches list `GET /v1/partnership/autorebates` · Operation ID `listRebates`. [Operation reference](https://www.exness-api.com/reference/partnership/list-rebates) ```json { "tags": ["Rebates"], "operationId": "listRebates", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError" ], "parameters": [ { "name": "limit", "required": false, "in": "query", "schema": {"type": "integer", "default": 100, "minimum": 0, "maximum": 1000} }, {"name": "offset", "required": false, "in": "query", "schema": {"type": "integer", "default": 0, "minimum": 0}}, {"name": "date_from", "required": false, "in": "query", "schema": {"type": "string", "format": "date"}}, {"name": "date_to", "required": false, "in": "query", "schema": {"type": "string", "format": "date"}}, { "name": "group_id", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "integer"}} }, { "name": "status", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "rebate_period", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, {"name": "ordering", "required": false, "in": "query", "schema": {"type": "string"}} ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "required": ["data", "totals"], "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "id", "clients_count", "clients_approved_count", "clients_rejected_count", "reward_usd", "topay_rebate_usd", "status", "rejected_rebate_usd", "error_rebate_usd", "processed_rebate_usd", "group_id", "group_name", "clients_pending_count", "pending_reward_usd", "clients_accounts_count", "period_start_date", "period_end_date" ], "properties": { "id": {"type": "integer"}, "clients_count": {"type": "integer"}, "clients_approved_count": {"type": "integer"}, "clients_rejected_count": {"type": "integer"}, "reward_usd": {"type": "number"}, "topay_rebate_usd": {"type": "number"}, "status": {"type": "string"}, "rejected_rebate_usd": {"type": "number"}, "error_rebate_usd": {"type": "number"}, "processed_rebate_usd": {"type": "number"}, "group_id": {"type": ["integer", "null"]}, "group_name": {"type": ["string", "null"]}, "clients_pending_count": {"type": "integer"}, "pending_reward_usd": {"type": "number"}, "clients_accounts_count": {"type": "integer"}, "period_start_date": {"type": ["string", "null"], "format": "date"}, "period_end_date": {"type": ["string", "null"], "format": "date"}, "rebate_period": {"type": "string"} } } }, "totals": { "type": "object", "required": [ "count", "clients_pending_count", "topay_rebate_usd", "pending_rebate_usd", "pending_reward_usd", "reward_usd" ], "properties": { "count": {"type": "integer"}, "clients_pending_count": {"type": ["integer", "null"]}, "topay_rebate_usd": {"type": "number"}, "pending_rebate_usd": {"type": "number"}, "pending_reward_usd": {"type": "number"}, "reward_usd": {"type": "number"} } } } } } } }, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "504": {"$ref": "#/components/responses/GatewayTimeout"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"} } } ``` #### Get rebate client accounts list `GET /v1/partnership/autorebates/clients` · Operation ID `listRebateClients`. [Operation reference](https://www.exness-api.com/reference/partnership/list-rebate-clients) ```json { "tags": ["Rebates"], "operationId": "listRebateClients", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError" ], "parameters": [ { "name": "limit", "required": false, "in": "query", "schema": {"type": "integer", "default": 100, "minimum": 0, "maximum": 1000} }, {"name": "offset", "required": false, "in": "query", "schema": {"type": "integer", "default": 0, "minimum": 0}}, { "name": "client_account_type", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "partner_account", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "partner_code", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "group_id", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "integer"}} }, { "name": "country", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "client_account", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "client_uid", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, {"name": "date_from", "required": false, "in": "query", "schema": {"type": "string", "format": "date"}}, {"name": "date_to", "required": false, "in": "query", "schema": {"type": "string", "format": "date"}}, {"name": "ordering", "required": false, "in": "query", "schema": {"type": "string"}} ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "required": ["data", "totals"], "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "id", "client_uid", "partner_account", "client_account", "group_id", "volume_lots", "volume_usd", "reward", "reward_usd", "processed_rebate", "processed_rebate_usd", "rebate_percent", "rebate_group_percent", "group_title", "client_account_type", "country", "partner_currency", "partner_code", "reg_date", "destination_client_account", "rebate_size" ], "properties": { "id": {"type": "integer"}, "client_uid": {"type": ["string", "null"]}, "partner_account": {"type": "string"}, "client_account": {"type": "string"}, "group_id": {"type": ["integer", "null"]}, "volume_lots": {"type": ["number", "null"]}, "volume_usd": {"type": ["number", "null"]}, "reward": {"type": ["number", "null"]}, "reward_usd": {"type": ["number", "null"]}, "processed_rebate": {"type": "number"}, "processed_rebate_usd": {"type": "number"}, "rebate_percent": {"type": "number"}, "rebate_group_percent": {"type": ["integer", "null"]}, "group_title": {"type": ["string", "null"]}, "client_account_type": {"type": "string"}, "country": {"type": "string"}, "partner_currency": {"type": "string"}, "partner_code": {"type": ["string", "null"]}, "reg_date": {"type": "string", "format": "date"}, "destination_client_account": {"type": ["string", "null"]}, "rebate_size": { "type": ["object", "null"], "required": ["min", "max"], "properties": {"min": {"type": "number"}, "max": {"type": "number"}} } } } }, "totals": { "type": "object", "required": ["count", "group_title", "assign_clients_count"], "properties": { "count": {"type": "integer"}, "group_title": {"type": ["string", "null"]}, "assign_clients_count": {"type": "integer"} } } } } } } }, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "504": {"$ref": "#/components/responses/GatewayTimeout"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"} } } ``` #### Set rebate percentage for client accounts `PATCH /v1/partnership/autorebates/clients` · Operation ID `updateRebateClients`. [Operation reference](https://www.exness-api.com/reference/partnership/update-rebate-clients) ```json { "tags": ["Rebates"], "operationId": "updateRebateClients", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["client_account", "rebate_percent"], "properties": { "client_account": {"type": "array", "items": {"type": "integer"}}, "rebate_percent": {"type": "number", "minimum": 0, "maximum": 100, "multipleOf": 0.1} } } } } }, "responses": { "200": {}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"}, "504": {"$ref": "#/components/responses/GatewayTimeout"} } } ``` #### Update rebate settings for a client account `PATCH /v1/partnership/autorebates/clients/{client_account}` · Operation ID `updateRebateClient`. [Operation reference](https://www.exness-api.com/reference/partnership/update-rebate-client) ```json { "tags": ["Rebates"], "operationId": "updateRebateClient", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError", "NotFound" ], "parameters": [{"name": "client_account", "in": "path", "required": true, "schema": {"type": "integer"}}], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "minProperties": 1, "properties": { "rebate_percent": {"type": ["number", "null"], "minimum": 0, "maximum": 100, "multipleOf": 0.1}, "destination_client_account": {"type": ["integer", "null"]} } } } } }, "responses": { "200": {}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/NotFound"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"}, "504": {"$ref": "#/components/responses/GatewayTimeout"} } } ``` #### Get rebate groups list `GET /v1/partnership/autorebates/groups` · Operation ID `listRebateGroups`. [Operation reference](https://www.exness-api.com/reference/partnership/list-rebate-groups) ```json { "tags": ["Rebates"], "operationId": "listRebateGroups", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError" ], "parameters": [ { "name": "limit", "required": false, "in": "query", "schema": {"type": "integer", "default": 100, "minimum": 0, "maximum": 1000} }, {"name": "offset", "required": false, "in": "query", "schema": {"type": "integer", "default": 0, "minimum": 0}}, { "name": "group_type", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "group_id", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "integer"}} }, { "name": "rebate_period", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "link_code", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, {"name": "ordering", "required": false, "in": "query", "schema": {"type": "string"}} ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "required": ["data", "totals"], "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "id", "partner_uid", "group_title", "group_type", "clients_count", "rebate_percent", "created", "is_default", "rebate_size", "rebate_period", "rebate_period_value", "rebate_period_start", "rebate_period_end", "link_code" ], "properties": { "id": {"type": "integer"}, "partner_uid": {"type": "string"}, "group_title": {"type": "string"}, "group_type": {"type": "string"}, "clients_count": {"type": ["integer", "null"]}, "rebate_percent": {"type": ["number", "null"]}, "created": {"type": "string", "format": "date-time"}, "is_default": {"type": "boolean"}, "rebate_size": { "type": "object", "required": ["min", "max"], "properties": {"min": {"type": "number"}, "max": {"type": "number"}} }, "rebate_period": {"type": "string"}, "rebate_period_value": {"type": ["integer", "null"]}, "rebate_period_start": {"type": ["string", "null"]}, "rebate_period_end": {"type": ["string", "null"]}, "link_code": {"type": ["string", "null"]} } } }, "totals": { "type": "object", "required": ["count", "clients"], "properties": {"count": {"type": "integer"}, "clients": {"type": "integer"}} } } } } } }, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "504": {"$ref": "#/components/responses/GatewayTimeout"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"} } } ``` #### Create rebate group `POST /v1/partnership/autorebates/groups` · Operation ID `createRebateGroup`. [Operation reference](https://www.exness-api.com/reference/partnership/create-rebate-group) ```json { "tags": ["Rebates"], "operationId": "createRebateGroup", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["group_title"], "properties": { "group_title": {"type": "string", "minLength": 1, "maxLength": 256}, "rebate_percent": {"type": "number", "minimum": 0, "maximum": 100, "multipleOf": 0.1}, "group_type": {"type": "string", "enum": ["MANUAL", "AUTO"]}, "is_default": {"type": "boolean"} } } } } }, "responses": { "200": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/RebateGroup"}}}}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"}, "504": {"$ref": "#/components/responses/GatewayTimeout"} } } ``` #### Get rebate group details `GET /v1/partnership/autorebates/groups/{group_id}` · Operation ID `getRebateGroup`. [Operation reference](https://www.exness-api.com/reference/partnership/get-rebate-group) ```json { "tags": ["Rebates"], "operationId": "getRebateGroup", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError", "NotFound" ], "parameters": [{"name": "group_id", "required": true, "in": "path", "schema": {"type": "integer"}}], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "partner_uid", "group_title", "group_type", "clients_count", "rebate_percent", "created", "is_default", "rebate_size", "rebate_period", "rebate_period_value", "rebate_period_start", "rebate_period_end", "link_code" ], "properties": { "id": {"type": "integer"}, "partner_uid": {"type": "string"}, "group_title": {"type": "string"}, "group_type": {"type": "string"}, "clients_count": {"type": ["integer", "null"]}, "rebate_percent": {"type": ["number", "null"]}, "created": {"type": "string", "format": "date-time"}, "is_default": {"type": "boolean"}, "rebate_size": { "type": "object", "required": ["min", "max"], "properties": {"min": {"type": "number"}, "max": {"type": "number"}} }, "rebate_period": {"type": "string"}, "rebate_period_value": {"type": ["integer", "null"]}, "rebate_period_start": {"type": ["string", "null"]}, "rebate_period_end": {"type": ["string", "null"]}, "link_code": {"type": ["string", "null"]} } } } } }, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/NotFound"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "504": {"$ref": "#/components/responses/GatewayTimeout"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"} } } ``` #### Update rebate group `PATCH /v1/partnership/autorebates/groups/{group_id}` · Operation ID `updateRebateGroup`. [Operation reference](https://www.exness-api.com/reference/partnership/update-rebate-group) ```json { "tags": ["Rebates"], "operationId": "updateRebateGroup", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError", "NotFound" ], "parameters": [{"name": "group_id", "in": "path", "required": true, "schema": {"type": "integer"}}], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["rebate_percent"], "properties": { "group_title": {"type": "string", "minLength": 1, "maxLength": 256}, "rebate_percent": {"type": "number", "minimum": 0, "maximum": 100, "multipleOf": 0.1}, "group_type": {"type": "string", "enum": ["MANUAL"]}, "is_default": {"type": "boolean"}, "rebate_period": {"type": "string", "enum": ["DAILY", "WEEKLY", "MONTHLY"]}, "rebate_period_value": {"type": ["integer", "null"]}, "link_code": {"type": ["string", "null"], "minLength": 3, "maxLength": 12} } } } } }, "responses": { "200": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/RebateGroupUpdate"}}}}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/NotFound"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"}, "504": {"$ref": "#/components/responses/GatewayTimeout"} } } ``` #### Delete rebate group `DELETE /v1/partnership/autorebates/groups/{group_id}` · Operation ID `deleteRebateGroup`. [Operation reference](https://www.exness-api.com/reference/partnership/delete-rebate-group) ```json { "tags": ["Rebates"], "operationId": "deleteRebateGroup", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError", "NotFound" ], "parameters": [{"name": "group_id", "in": "path", "required": true, "schema": {"type": "integer"}}], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "required": ["status"], "properties": {"status": {"type": "string", "const": "OK"}} } } } }, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/NotFound"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"}, "504": {"$ref": "#/components/responses/GatewayTimeout"} } } ``` #### Get rebate group client accounts list `GET /v1/partnership/autorebates/groups/{group_id}/clients` · Operation ID `listRebateGroupClients`. [Operation reference](https://www.exness-api.com/reference/partnership/list-rebate-group-clients) ```json { "tags": ["Rebates"], "operationId": "listRebateGroupClients", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError", "NotFound" ], "parameters": [ {"name": "group_id", "required": true, "in": "path", "schema": {"type": "integer"}}, { "name": "limit", "required": false, "in": "query", "schema": {"type": "integer", "default": 100, "minimum": 0, "maximum": 1000} }, {"name": "offset", "required": false, "in": "query", "schema": {"type": "integer", "default": 0, "minimum": 0}}, { "name": "client_account_type", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "partner_account", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "group_id", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "integer"}} }, { "name": "client_account", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "destination_client_account", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "client_uid", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, {"name": "date_from", "required": false, "in": "query", "schema": {"type": "string", "format": "date"}}, {"name": "date_to", "required": false, "in": "query", "schema": {"type": "string", "format": "date"}}, {"name": "ordering", "required": false, "in": "query", "schema": {"type": "string"}} ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "required": ["data", "totals"], "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "id", "client_uid", "partner_account", "client_account", "group_id", "volume_lots", "volume_usd", "reward", "reward_usd", "processed_rebate", "processed_rebate_usd", "rebate_percent", "rebate_group_percent", "group_title", "client_account_type", "country", "partner_currency", "partner_code", "reg_date", "destination_client_account", "rebate_size" ], "properties": { "id": {"type": "integer"}, "client_uid": {"type": ["string", "null"]}, "partner_account": {"type": "string"}, "client_account": {"type": "string"}, "group_id": {"type": ["integer", "null"]}, "volume_lots": {"type": ["number", "null"]}, "volume_usd": {"type": ["number", "null"]}, "reward": {"type": ["number", "null"]}, "reward_usd": {"type": ["number", "null"]}, "processed_rebate": {"type": "number"}, "processed_rebate_usd": {"type": "number"}, "rebate_percent": {"type": "number"}, "rebate_group_percent": {"type": ["integer", "null"]}, "group_title": {"type": ["string", "null"]}, "client_account_type": {"type": "string"}, "country": {"type": "string"}, "partner_currency": {"type": "string"}, "partner_code": {"type": ["string", "null"]}, "reg_date": {"type": "string", "format": "date"}, "destination_client_account": {"type": ["string", "null"]}, "rebate_size": { "type": ["object", "null"], "required": ["min", "max"], "properties": {"min": {"type": "number"}, "max": {"type": "number"}} } } } }, "totals": { "type": "object", "required": ["count", "group_title", "assign_clients_count"], "properties": { "count": {"type": "integer"}, "group_title": {"type": ["string", "null"]}, "assign_clients_count": {"type": "integer"} } } } } } } }, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/NotFound"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "504": {"$ref": "#/components/responses/GatewayTimeout"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"} } } ``` #### Add clients to rebate group `POST /v1/partnership/autorebates/groups/{group_id}/clients` · Operation ID `addRebateGroupClients`. [Operation reference](https://www.exness-api.com/reference/partnership/add-rebate-group-clients) ```json { "tags": ["Rebates"], "operationId": "addRebateGroupClients", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError", "NotFound" ], "parameters": [{"name": "group_id", "in": "path", "required": true, "schema": {"type": "integer"}}], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["client_account"], "properties": {"client_account": {"type": "array", "items": {"type": "integer"}}} } } } }, "responses": { "200": {}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/NotFound"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"}, "504": {"$ref": "#/components/responses/GatewayTimeout"} } } ``` #### Remove clients from rebate group `DELETE /v1/partnership/autorebates/groups/{group_id}/clients` · Operation ID `removeRebateGroupClients`. [Operation reference](https://www.exness-api.com/reference/partnership/remove-rebate-group-clients) ```json { "tags": ["Rebates"], "operationId": "removeRebateGroupClients", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError", "NotFound" ], "parameters": [{"name": "group_id", "in": "path", "required": true, "schema": {"type": "integer"}}], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["client_account"], "properties": {"client_account": {"type": "array", "items": {"type": "integer"}}} } } } }, "responses": { "200": {}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/NotFound"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"}, "504": {"$ref": "#/components/responses/GatewayTimeout"} } } ``` #### Get rebate group rules `GET /v1/partnership/autorebates/groups/{group_id}/rules` · Operation ID `listRebateGroupRules`. [Operation reference](https://www.exness-api.com/reference/partnership/list-rebate-group-rules) ```json { "tags": ["Rebates"], "operationId": "listRebateGroupRules", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError", "NotFound" ], "parameters": [{"name": "group_id", "required": true, "in": "path", "schema": {"type": "integer"}}], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "required": ["totals", "data"], "properties": { "totals": {"type": "object", "required": ["count"], "properties": {"count": {"type": "integer"}}}, "data": { "type": "array", "items": { "type": "object", "required": [ "id", "group_id", "name", "is_default", "is_active", "priority", "rebate_size", "account_types", "min_reward_tv_usd", "max_reward_tv_usd", "min_reward_tv_lots", "max_reward_tv_lots", "created", "updated" ], "properties": { "id": {"type": "integer"}, "group_id": {"type": "integer"}, "name": {"type": "string"}, "is_default": {"type": "boolean"}, "is_active": {"type": "boolean"}, "priority": {"type": ["integer", "null"]}, "rebate_size": {"type": "number"}, "account_types": {"type": ["array", "null"], "items": {"type": "string"}}, "min_reward_tv_usd": {"type": ["number", "null"]}, "max_reward_tv_usd": {"type": ["number", "null"]}, "min_reward_tv_lots": {"type": ["number", "null"]}, "max_reward_tv_lots": {"type": ["number", "null"]}, "created": {"type": "string", "format": "date-time"}, "updated": {"type": "string", "format": "date-time"} } } } } } } } }, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/NotFound"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "504": {"$ref": "#/components/responses/GatewayTimeout"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"} } } ``` #### Create rebate group rule `POST /v1/partnership/autorebates/groups/{group_id}/rules` · Operation ID `createRebateGroupRule`. [Operation reference](https://www.exness-api.com/reference/partnership/create-rebate-group-rule) ```json { "tags": ["Rebates"], "operationId": "createRebateGroupRule", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError", "NotFound" ], "parameters": [{"name": "group_id", "in": "path", "required": true, "schema": {"type": "integer"}}], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["name"], "properties": {"name": {"type": "string", "minLength": 1, "maxLength": 100}} } } } }, "responses": { "200": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/RebateRule"}}}}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/NotFound"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"}, "504": {"$ref": "#/components/responses/GatewayTimeout"} } } ``` #### Update rebate group rule `PATCH /v1/partnership/autorebates/groups/rules/{rule_id}` · Operation ID `updateRebateGroupRule`. [Operation reference](https://www.exness-api.com/reference/partnership/update-rebate-group-rule) ```json { "tags": ["Rebates"], "operationId": "updateRebateGroupRule", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError", "NotFound" ], "parameters": [{"name": "rule_id", "in": "path", "required": true, "schema": {"type": "integer"}}], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "minProperties": 1, "properties": { "name": {"type": "string", "minLength": 1, "maxLength": 100}, "rebate_size": {"type": "number", "minimum": 0, "maximum": 100, "multipleOf": 0.1}, "account_types": {"type": "array", "items": {"type": "string"}}, "min_reward_tv_usd": {"type": ["number", "null"]}, "max_reward_tv_usd": {"type": ["number", "null"]}, "min_reward_tv_lots": {"type": ["number", "null"]}, "max_reward_tv_lots": {"type": ["number", "null"]}, "priority": {"type": "integer"} } } } } }, "responses": { "200": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/RebateRule"}}}}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/NotFound"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"}, "504": {"$ref": "#/components/responses/GatewayTimeout"} } } ``` #### Delete rebate group rule `DELETE /v1/partnership/autorebates/groups/rules/{rule_id}` · Operation ID `deleteRebateGroupRule`. [Operation reference](https://www.exness-api.com/reference/partnership/delete-rebate-group-rule) ```json { "tags": ["Rebates"], "operationId": "deleteRebateGroupRule", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError", "NotFound" ], "parameters": [{"name": "rule_id", "in": "path", "required": true, "schema": {"type": "integer"}}], "responses": { "204": {}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/NotFound"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"}, "504": {"$ref": "#/components/responses/GatewayTimeout"} } } ``` #### Get rebate history `GET /v1/partnership/autorebates/history` · Operation ID `listRebateHistory`. [Operation reference](https://www.exness-api.com/reference/partnership/list-rebate-history) ```json { "tags": ["Rebates"], "operationId": "listRebateHistory", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError" ], "parameters": [ { "name": "limit", "required": false, "in": "query", "schema": {"type": "integer", "default": 100, "minimum": 0, "maximum": 1000} }, {"name": "offset", "required": false, "in": "query", "schema": {"type": "integer", "default": 0, "minimum": 0}}, {"name": "ordering", "required": false, "in": "query", "schema": {"type": "string"}} ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "required": ["data", "totals"], "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "id", "partner_account", "client_account", "client_account_type", "rebate_group_title", "volume_lots", "reward", "reward_usd", "rebate", "rebate_usd", "rebate_percent", "status", "error_code", "destination_client_account", "processed_date", "reward_date", "group_id" ], "properties": { "id": {"type": "integer"}, "partner_account": {"type": "string"}, "client_account": {"type": "string"}, "client_account_type": {"type": ["string", "null"]}, "rebate_group_title": {"type": ["string", "null"]}, "volume_lots": {"type": "number"}, "reward": {"type": "number"}, "reward_usd": {"type": "number"}, "rebate": {"type": "number"}, "rebate_usd": {"type": "number"}, "rebate_percent": {"type": "number"}, "status": {"type": "string"}, "error_code": {"type": ["string", "null"]}, "destination_client_account": {"type": ["string", "null"]}, "processed_date": {"type": ["string", "null"], "format": "date"}, "reward_date": {"type": "string", "format": "date"}, "group_id": {"type": ["integer", "null"]} }, "title": "RebateRow" } }, "totals": { "type": "object", "required": [ "id", "date", "clients_count", "clients_approved_count", "clients_rejected_count", "reward_usd", "topay_rebate_usd", "status", "rejected_rebate_usd", "error_rebate_usd", "processed_rebate_usd", "group_id", "group_name", "clients_pending_count", "pending_reward_usd" ], "properties": { "id": {"type": ["integer", "null"]}, "date": {"type": ["string", "null"], "format": "date"}, "clients_count": {"type": "integer"}, "clients_approved_count": {"type": ["integer", "null"]}, "clients_rejected_count": {"type": ["integer", "null"]}, "reward_usd": {"type": "number"}, "topay_rebate_usd": {"type": "number"}, "status": {"type": ["string", "null"]}, "rejected_rebate_usd": {"type": ["number", "null"]}, "error_rebate_usd": {"type": ["number", "null"]}, "processed_rebate_usd": {"type": ["number", "null"]}, "group_id": {"type": ["integer", "null"]}, "group_name": {"type": ["string", "null"]}, "clients_pending_count": {"type": ["integer", "null"]}, "pending_reward_usd": {"type": "number"} } } } } } } }, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "504": {"$ref": "#/components/responses/GatewayTimeout"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"} } } ``` #### Get rebate payments list `GET /v1/partnership/autorebates/payments` · Operation ID `listRebatePayments`. [Operation reference](https://www.exness-api.com/reference/partnership/list-rebate-payments) ```json { "tags": ["Rebates"], "operationId": "listRebatePayments", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError" ], "parameters": [ { "name": "limit", "required": false, "in": "query", "schema": {"type": "integer", "default": 100, "minimum": 0, "maximum": 1000} }, {"name": "offset", "required": false, "in": "query", "schema": {"type": "integer", "default": 0, "minimum": 0}}, {"name": "ordering", "required": false, "in": "query", "schema": {"type": "string"}} ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "required": ["data", "totals"], "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "id", "partner_account", "status", "client_account", "client_account_type", "destination_client_account", "reward", "reward_usd", "volume_lots", "rebate", "rebate_usd", "processed_date", "error_code" ], "properties": { "id": {"type": "integer"}, "partner_account": {"type": "string"}, "status": {"type": "string"}, "client_account": {"type": "string"}, "client_account_type": {"type": ["string", "null"]}, "destination_client_account": {"type": ["string", "null"]}, "reward": {"type": "number"}, "reward_usd": {"type": "number"}, "volume_lots": {"type": "number"}, "rebate": {"type": "number"}, "rebate_usd": {"type": "number"}, "processed_date": {"type": ["string", "null"], "format": "date"}, "error_code": {"type": ["string", "null"]} }, "title": "RebatePayment" } }, "totals": { "type": "object", "required": [ "count", "reward", "reward_usd", "volume_lots", "processed_rebate", "processed_rebate_usd", "rejected_rebate_usd", "error_rebate_usd" ], "properties": { "count": {"type": "integer"}, "reward": {"type": "number"}, "reward_usd": {"type": "number"}, "volume_lots": {"type": "number"}, "processed_rebate": {"type": "number"}, "processed_rebate_usd": {"type": "number"}, "rejected_rebate_usd": {"type": "number"}, "error_rebate_usd": {"type": "number"} } } } } } } }, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "504": {"$ref": "#/components/responses/GatewayTimeout"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"} } } ``` #### Get rebate payment rows `GET /v1/partnership/autorebates/payments/{payment_id}/rebate-rows` · Operation ID `listRebatePaymentRebateRows`. [Operation reference](https://www.exness-api.com/reference/partnership/list-rebate-payment-rebate-rows) ```json { "tags": ["Rebates"], "operationId": "listRebatePaymentRebateRows", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError", "NotFound" ], "parameters": [ {"name": "payment_id", "required": true, "in": "path", "schema": {"type": "integer"}}, { "name": "limit", "required": false, "in": "query", "schema": {"type": "integer", "default": 100, "minimum": 0, "maximum": 1000} }, {"name": "offset", "required": false, "in": "query", "schema": {"type": "integer", "default": 0, "minimum": 0}}, {"name": "ordering", "required": false, "in": "query", "schema": {"type": "string"}} ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "required": ["data", "totals"], "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "id", "partner_account", "client_account", "client_account_type", "rebate_group_title", "volume_lots", "reward", "reward_usd", "rebate", "rebate_usd", "rebate_percent", "status", "error_code", "destination_client_account", "processed_date", "reward_date", "group_id" ], "properties": { "id": {"type": "integer"}, "partner_account": {"type": "string"}, "client_account": {"type": "string"}, "client_account_type": {"type": ["string", "null"]}, "rebate_group_title": {"type": ["string", "null"]}, "volume_lots": {"type": "number"}, "reward": {"type": "number"}, "reward_usd": {"type": "number"}, "rebate": {"type": "number"}, "rebate_usd": {"type": "number"}, "rebate_percent": {"type": "number"}, "status": {"type": "string"}, "error_code": {"type": ["string", "null"]}, "destination_client_account": {"type": ["string", "null"]}, "processed_date": {"type": ["string", "null"], "format": "date"}, "reward_date": {"type": "string", "format": "date"}, "group_id": {"type": ["integer", "null"]} }, "title": "RebateRow" } }, "totals": { "type": "object", "required": [ "status", "error_code", "partner_account", "client_account", "destination_client_account", "processed_date", "volume_lots", "reward_usd", "topay_rebate_usd", "rejected_rebate_usd", "error_rebate_usd", "processed_rebate_usd", "total_rebate_usd", "clients_count" ], "properties": { "status": {"type": ["string", "null"]}, "error_code": {"type": ["string", "null"]}, "partner_account": {"type": ["string", "null"]}, "client_account": {"type": ["string", "null"]}, "destination_client_account": {"type": ["string", "null"]}, "processed_date": {"type": ["string", "null"], "format": "date"}, "volume_lots": {"type": "number"}, "reward_usd": {"type": "number"}, "topay_rebate_usd": {"type": "number"}, "rejected_rebate_usd": {"type": "number"}, "error_rebate_usd": {"type": "number"}, "processed_rebate_usd": {"type": "number"}, "total_rebate_usd": {"type": "number"}, "clients_count": {"type": "integer"} } } } } } } }, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/NotFound"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "504": {"$ref": "#/components/responses/GatewayTimeout"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"} } } ``` #### Get grouped rebate batch totals `GET /v1/partnership/autorebates/{rebate_id}/aggregates` · Operation ID `listRebateAggregates`. [Operation reference](https://www.exness-api.com/reference/partnership/list-rebate-aggregates) ```json { "tags": ["Rebates"], "operationId": "listRebateAggregates", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError", "NotFound" ], "parameters": [ {"name": "rebate_id", "required": true, "in": "path", "schema": {"type": "integer"}}, { "name": "limit", "required": false, "in": "query", "schema": {"type": "integer", "default": 100, "minimum": 0, "maximum": 1000} }, {"name": "offset", "required": false, "in": "query", "schema": {"type": "integer", "default": 0, "minimum": 0}}, { "name": "client_account", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, { "name": "status", "required": false, "in": "query", "style": "form", "explode": false, "schema": {"type": "array", "items": {"type": "string"}} }, {"name": "ordering", "required": false, "in": "query", "schema": {"type": "string"}} ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "required": ["data", "totals"], "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "rebate_rows_ids", "partner_account", "client_account", "client_account_type", "destination_client_account", "volume_lots", "rebate_percent", "reward", "reward_usd", "rebate", "rebate_usd", "status", "error_code" ], "properties": { "rebate_rows_ids": {"type": "array", "items": {"type": "integer"}}, "partner_account": {"type": "string"}, "client_account": {"type": "string"}, "client_account_type": {"type": ["string", "null"]}, "destination_client_account": {"type": ["string", "null"]}, "volume_lots": {"type": "number"}, "rebate_percent": {"type": "number"}, "reward": {"type": "number"}, "reward_usd": {"type": "number"}, "rebate": {"type": "number"}, "rebate_usd": {"type": "number"}, "status": {"type": "string"}, "error_code": {"type": ["string", "null"]} } } }, "totals": { "type": "object", "required": [ "id", "date", "clients_count", "clients_approved_count", "clients_rejected_count", "reward_usd", "topay_rebate_usd", "status", "rejected_rebate_usd", "error_rebate_usd", "processed_rebate_usd", "group_id", "group_name", "clients_pending_count", "pending_reward_usd" ], "properties": { "id": {"type": ["integer", "null"]}, "date": {"type": ["string", "null"], "format": "date"}, "clients_count": {"type": "integer"}, "clients_approved_count": {"type": ["integer", "null"]}, "clients_rejected_count": {"type": ["integer", "null"]}, "reward_usd": {"type": ["number", "null"]}, "topay_rebate_usd": {"type": ["number", "null"]}, "status": {"type": ["string", "null"]}, "rejected_rebate_usd": {"type": ["number", "null"]}, "error_rebate_usd": {"type": ["number", "null"]}, "processed_rebate_usd": {"type": ["number", "null"]}, "group_id": {"type": ["integer", "null"]}, "group_name": {"type": ["string", "null"]}, "clients_pending_count": {"type": ["integer", "null"]}, "pending_reward_usd": {"type": ["number", "null"]} } } } } } } }, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/NotFound"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "504": {"$ref": "#/components/responses/GatewayTimeout"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"} } } ``` #### Get rebate batch account rows `GET /v1/partnership/autorebates/{rebate_id}/clients` · Operation ID `listRebateClientsByRebate`. [Operation reference](https://www.exness-api.com/reference/partnership/list-rebate-clients-by-rebate) ```json { "tags": ["Rebates"], "operationId": "listRebateClientsByRebate", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError", "NotFound" ], "parameters": [ {"name": "rebate_id", "required": true, "in": "path", "schema": {"type": "integer"}}, { "name": "limit", "required": false, "in": "query", "schema": {"type": "integer", "default": 100, "minimum": 0, "maximum": 1000} }, {"name": "offset", "required": false, "in": "query", "schema": {"type": "integer", "default": 0, "minimum": 0}}, {"name": "ordering", "required": false, "in": "query", "schema": {"type": "string"}} ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "required": ["data", "totals"], "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "id", "partner_account", "client_account", "client_account_type", "rebate_group_title", "volume_lots", "reward", "reward_usd", "rebate", "rebate_usd", "rebate_percent", "status", "error_code", "destination_client_account", "processed_date", "reward_date", "group_id" ], "properties": { "id": {"type": "integer"}, "partner_account": {"type": "string"}, "client_account": {"type": "string"}, "client_account_type": {"type": ["string", "null"]}, "rebate_group_title": {"type": ["string", "null"]}, "volume_lots": {"type": "number"}, "reward": {"type": "number"}, "reward_usd": {"type": "number"}, "rebate": {"type": "number"}, "rebate_usd": {"type": "number"}, "rebate_percent": {"type": "number"}, "status": {"type": "string"}, "error_code": {"type": ["string", "null"]}, "destination_client_account": {"type": ["string", "null"]}, "processed_date": {"type": ["string", "null"], "format": "date"}, "reward_date": {"type": "string", "format": "date"}, "group_id": {"type": ["integer", "null"]} }, "title": "RebateRow" } }, "totals": { "type": "object", "required": [ "id", "date", "clients_count", "clients_approved_count", "clients_rejected_count", "reward_usd", "topay_rebate_usd", "status", "rejected_rebate_usd", "error_rebate_usd", "processed_rebate_usd", "group_id", "group_name", "clients_pending_count", "pending_reward_usd" ], "properties": { "id": {"type": "integer"}, "date": {"type": "string", "format": "date"}, "clients_count": {"type": "integer"}, "clients_approved_count": {"type": "integer"}, "clients_rejected_count": {"type": "integer"}, "reward_usd": {"type": "number"}, "topay_rebate_usd": {"type": "number"}, "status": {"type": "string"}, "rejected_rebate_usd": {"type": "number"}, "error_rebate_usd": {"type": "number"}, "processed_rebate_usd": {"type": "number"}, "group_id": {"type": ["integer", "null"]}, "group_name": {"type": ["string", "null"]}, "clients_pending_count": {"type": "integer"}, "pending_reward_usd": {"type": "number"} } } } } } } }, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/NotFound"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "504": {"$ref": "#/components/responses/GatewayTimeout"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"} } } ``` #### Update rebate row destinations `PATCH /v1/partnership/autorebates/{rebate_id}/clients` · Operation ID `updateRebateRowDestinations`. [Operation reference](https://www.exness-api.com/reference/partnership/update-rebate-row-destinations) ```json { "tags": ["Rebates"], "operationId": "updateRebateRowDestinations", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError", "NotFound" ], "parameters": [{"name": "rebate_id", "in": "path", "required": true, "schema": {"type": "integer"}}], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["destination_client_account"], "properties": { "rebate_row_id": {"type": "integer"}, "rebate_row_ids": {"type": "array", "items": {"type": "integer"}}, "destination_client_account": {"type": "integer"} }, "anyOf": [{"required": ["rebate_row_id"]}, {"required": ["rebate_row_ids"]}] } } } }, "responses": { "200": {}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/NotFound"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"}, "504": {"$ref": "#/components/responses/GatewayTimeout"} } } ``` ### Referral Agents #### Get referral-agent links list `GET /v1/partnership/referral-agent-links` · Operation ID `listReferralAgentLinks`. [Operation reference](https://www.exness-api.com/reference/partnership/list-referral-agent-links) ```json { "tags": ["Referral Agents"], "operationId": "listReferralAgentLinks", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError" ], "responses": { "200": { "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ReferralAgentLinkListResponse"}}} }, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "504": {"$ref": "#/components/responses/GatewayTimeout"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"} }, "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "default": 100, "minimum": 0, "maximum": 1000} }, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "default": 0, "minimum": 0}} ] } ``` #### Add referral agent `POST /v1/partnership/referral-agent-links` · Operation ID `createReferralAgentLink`. [Operation reference](https://www.exness-api.com/reference/partnership/create-referral-agent-link) ```json { "tags": ["Referral Agents"], "operationId": "createReferralAgentLink", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "alias": {"type": "string", "maxLength": 50, "minLength": 1, "pattern": "\\S"}, "email": {"type": "string", "format": "email"} }, "required": ["alias", "email"] } } }, "required": true }, "responses": { "200": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ReferralAgentLinkDetails"}}}}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "504": {"$ref": "#/components/responses/GatewayTimeout"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"} } } ``` #### Get referral-agent details `GET /v1/partnership/referral-agent-links/{agent_link_id}` · Operation ID `getReferralAgentLink`. [Operation reference](https://www.exness-api.com/reference/partnership/get-referral-agent-link) ```json { "tags": ["Referral Agents"], "operationId": "getReferralAgentLink", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError", "NotFound" ], "parameters": [{"name": "agent_link_id", "required": true, "in": "path", "schema": {"type": "integer"}}], "responses": { "200": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ReferralAgentLinkDetails"}}}}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/NotFound"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "504": {"$ref": "#/components/responses/GatewayTimeout"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"} } } ``` #### Rename referral-agent link `PATCH /v1/partnership/referral-agent-links/{agent_link_id}` · Operation ID `updateReferralAgentLink`. [Operation reference](https://www.exness-api.com/reference/partnership/update-referral-agent-link) ```json { "tags": ["Referral Agents"], "operationId": "updateReferralAgentLink", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError", "NotFound" ], "parameters": [{"name": "agent_link_id", "required": true, "in": "path", "schema": {"type": "integer"}}], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": {"alias": {"type": "string", "minLength": 1, "maxLength": 50, "pattern": "\\S"}}, "required": ["alias"] } } }, "required": true }, "responses": { "200": { "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ReferralAgentLinkUpdateResult"}}} }, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/NotFound"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "504": {"$ref": "#/components/responses/GatewayTimeout"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"} } } ``` #### Archive referral-agent link `POST /v1/partnership/referral-agent-links/{agent_link_id}/archive` · Operation ID `archiveReferralAgentLink`. [Operation reference](https://www.exness-api.com/reference/partnership/archive-referral-agent-link) ```json { "tags": ["Referral Agents"], "operationId": "archiveReferralAgentLink", "x-public-error-codes": [ "Throttled", "ServiceTransportError", "Error", "AuthenticationFailed", "PermissionDenied", "ValidationError", "NotFound" ], "parameters": [{"name": "agent_link_id", "required": true, "in": "path", "schema": {"type": "integer"}}], "responses": { "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/NotFound"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "504": {"$ref": "#/components/responses/GatewayTimeout"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "502": {"$ref": "#/components/responses/BadGateway"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"}, "204": {} } } ``` ### Partnership public error codes | HTTP status | Code | Error name | | --- | --- | --- | | 400 | `ValidationError` | `ValidationError` | | 400 | `NotUnique` | `NotUnique` | | 400 | `ManyItems` | `ManyItems` | | 401 | `AuthenticationFailed` | `AuthenticationFailed` | | 403 | `PermissionDenied` | `PermissionDenied` | | 404 | `NotFound` | `NotFound` | | 429 | `Throttled` | `Throttled` | | 500 | `Error` | `Error` | | 504 | `ServiceTransportError` | `ServiceTransportError` | | 502 | `1` | `SYSTEM_BAD_GATEWAY` | | 503 | `2` | `SYSTEM_TEMPORARY_UNAVAILABLE` | | 500 | `3` | `SYSTEM_INTERNAL_ERROR` | | 401 | `1000` | `AUTH_INVALID_API_KEY` | | 401 | `1001` | `AUTH_INVALID_SIGNATURE` | | 403 | `1002` | `AUTH_FORBIDDEN` | | 429 | `1003` | `AUTH_RATE_LIMIT` | | 400 | `3001` | `REQUEST_INVALID_PARAMETERS` | [Troubleshooting and retry guidance](https://www.exness-api.com/partnership/guides/troubleshooting) ### Partnership OpenAPI components ```json { "security": [ {"ExnApiKeyAuth": [], "ExnTimestampAuth": [], "ExnDataAuth": [], "ExnSignatureAuth": [], "ExnSignVersionAuth": []} ], "components": { "securitySchemes": { "ExnApiKeyAuth": {"type": "apiKey", "in": "header", "name": "EXN-API-KEY"}, "ExnTimestampAuth": {"type": "apiKey", "in": "header", "name": "EXN-TIMESTAMP"}, "ExnDataAuth": {"type": "apiKey", "in": "header", "name": "EXN-DATA"}, "ExnSignatureAuth": {"type": "apiKey", "in": "header", "name": "EXN-SIGN"}, "ExnSignVersionAuth": {"type": "apiKey", "in": "header", "name": "EXN-SIGN-VERSION"} }, "responses": { "BadRequest": { "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequestErrorResponse"}}} }, "AuthorizationFailed": { "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AuthorizationFailedErrorResponse"}}} }, "Forbidden": { "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ForbiddenErrorResponse"}}} }, "NotFound": { "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFoundErrorResponse"}}} }, "TooManyRequests": { "headers": {"Retry-After": {"schema": {"type": "integer", "minimum": 0}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TooManyRequestsErrorResponse"}}} }, "GatewayTimeout": { "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GatewayTimeoutErrorResponse"}}} }, "InternalServerError": { "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalServerErrorResponse"}}} }, "BadGateway": { "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadGatewayErrorResponse"}}} }, "ServiceUnavailable": { "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ServiceUnavailableErrorResponse"}}} }, "CampaignUpdateBadRequest": { "content": { "application/json": {"schema": {"$ref": "#/components/schemas/CampaignUpdateBadRequestErrorResponse"}} } }, "CampaignCreateBadRequest": { "content": { "application/json": {"schema": {"$ref": "#/components/schemas/CampaignCreateBadRequestErrorResponse"}} } } }, "schemas": { "RebateGroup": { "type": "object", "required": [ "id", "partner_uid", "group_title", "group_type", "clients_count", "rebate_percent", "created", "is_default", "rebate_size", "rebate_period", "rebate_period_value", "rebate_period_start", "rebate_period_end", "link_code" ], "properties": { "id": {"type": "integer"}, "partner_uid": {"type": "string"}, "group_title": {"type": "string"}, "group_type": {"type": "string"}, "clients_count": {"type": ["integer", "null"]}, "rebate_percent": {"type": ["number", "null"]}, "created": {"type": "string", "format": "date-time"}, "is_default": {"type": "boolean"}, "rebate_size": { "type": "object", "required": ["min", "max"], "properties": {"min": {"type": "number"}, "max": {"type": "number"}} }, "rebate_period": {"type": "string"}, "rebate_period_value": {"type": ["integer", "null"]}, "rebate_period_start": {"type": ["string", "null"]}, "rebate_period_end": {"type": ["string", "null"]}, "link_code": {"type": ["string", "null"]} } }, "RebateGroupUpdate": { "type": "object", "required": [ "id", "partner_uid", "group_title", "group_type", "clients_count", "rebate_percent", "created", "is_default", "rebate_size", "rebate_period", "rebate_period_value", "rebate_period_start", "rebate_period_end", "link_code", "need_approve" ], "properties": { "id": {"type": "integer"}, "partner_uid": {"type": "string"}, "group_title": {"type": "string"}, "group_type": {"type": "string"}, "clients_count": {"type": ["integer", "null"]}, "rebate_percent": {"type": ["number", "null"]}, "created": {"type": "string", "format": "date-time"}, "is_default": {"type": "boolean"}, "rebate_size": { "type": "object", "required": ["min", "max"], "properties": {"min": {"type": "number"}, "max": {"type": "number"}} }, "rebate_period": {"type": "string"}, "rebate_period_value": {"type": ["integer", "null"]}, "rebate_period_start": {"type": ["string", "null"]}, "rebate_period_end": {"type": ["string", "null"]}, "link_code": {"type": ["string", "null"]}, "need_approve": {"type": "boolean"} } }, "RebateRule": { "type": "object", "required": [ "id", "group_id", "name", "is_default", "is_active", "priority", "rebate_size", "account_types", "min_reward_tv_usd", "max_reward_tv_usd", "min_reward_tv_lots", "max_reward_tv_lots", "created", "updated" ], "properties": { "id": {"type": "integer"}, "group_id": {"type": "integer"}, "name": {"type": "string"}, "is_default": {"type": "boolean"}, "is_active": {"type": "boolean"}, "priority": {"type": ["integer", "null"]}, "rebate_size": {"type": "number"}, "account_types": {"type": ["array", "null"], "items": {"type": "string"}}, "min_reward_tv_usd": {"type": ["number", "null"]}, "max_reward_tv_usd": {"type": ["number", "null"]}, "min_reward_tv_lots": {"type": ["number", "null"]}, "max_reward_tv_lots": {"type": ["number", "null"]}, "created": {"type": "string", "format": "date-time"}, "updated": {"type": "string", "format": "date-time"} } }, "BadRequestErrorResponse": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": ["code", "error_message"], "properties": { "code": {"type": "integer", "enum": [3001]}, "error_message": {"type": "string", "enum": ["REQUEST_INVALID_PARAMETERS"]}, "retry_after": {"type": "string", "format": "date-time"}, "description": {"type": "string"} }, "title": "Request validation error" }, { "type": "object", "additionalProperties": false, "required": ["code", "message"], "properties": { "code": {"type": "string", "enum": ["ValidationError"]}, "message": {"type": "string"}, "details": { "oneOf": [ {"type": "array", "items": {"$ref": "#/components/schemas/ErrorDetail"}}, {"type": "object", "additionalProperties": true}, {"type": "string"} ] } }, "title": "Partnership validation error" } ] }, "AuthorizationFailedErrorResponse": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": ["code", "error_message"], "properties": { "code": {"type": "integer", "enum": [1000]}, "error_message": {"type": "string", "enum": ["AUTH_INVALID_API_KEY"]}, "retry_after": {"type": "string", "format": "date-time"}, "description": {"type": "string"} }, "title": "API key error" }, { "type": "object", "additionalProperties": false, "required": ["code", "error_message"], "properties": { "code": {"type": "integer", "enum": [1001]}, "error_message": {"type": "string", "enum": ["AUTH_INVALID_SIGNATURE"]}, "retry_after": {"type": "string", "format": "date-time"}, "description": {"type": "string"} }, "title": "Signature error" }, { "type": "object", "additionalProperties": false, "required": ["code", "message"], "properties": { "code": {"type": "string", "enum": ["AuthenticationFailed"]}, "message": {"type": "string"}, "details": { "oneOf": [ {"type": "array", "items": {"$ref": "#/components/schemas/ErrorDetail"}}, {"type": "object", "additionalProperties": true}, {"type": "string"} ] } }, "title": "Partnership authentication error" } ] }, "ForbiddenErrorResponse": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": ["code", "error_message"], "properties": { "code": {"type": "integer", "enum": [1002]}, "error_message": {"type": "string", "enum": ["AUTH_FORBIDDEN"]}, "retry_after": {"type": "string", "format": "date-time"}, "description": {"type": "string"} }, "title": "Access error" }, { "type": "object", "additionalProperties": false, "required": ["code", "message"], "properties": { "code": {"type": "string", "enum": ["PermissionDenied"]}, "message": {"type": "string"}, "details": { "oneOf": [ {"type": "array", "items": {"$ref": "#/components/schemas/ErrorDetail"}}, {"type": "object", "additionalProperties": true}, {"type": "string"} ] } }, "title": "Partnership access error" } ] }, "NotFoundErrorResponse": { "type": "object", "additionalProperties": false, "required": ["code", "message"], "properties": { "code": {"type": "string", "enum": ["NotFound"]}, "message": {"type": "string"}, "details": { "oneOf": [ {"type": "array", "items": {"$ref": "#/components/schemas/ErrorDetail"}}, {"type": "object", "additionalProperties": true}, {"type": "string"} ] } }, "title": "Resource not found" }, "TooManyRequestsErrorResponse": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": ["code", "error_message"], "properties": { "code": {"type": "integer", "enum": [1003]}, "error_message": {"type": "string", "enum": ["AUTH_RATE_LIMIT"]}, "retry_after": {"type": "string", "format": "date-time"}, "description": {"type": "string"} }, "title": "Authentication rate-limit error" }, { "type": "object", "additionalProperties": false, "required": ["code", "message"], "properties": { "code": {"type": "string", "enum": ["Throttled"]}, "message": {"type": "string"}, "details": { "oneOf": [ {"type": "array", "items": {"$ref": "#/components/schemas/ErrorDetail"}}, {"type": "object", "additionalProperties": true}, {"type": "string"} ] } }, "title": "Partnership rate-limit error" } ] }, "GatewayTimeoutErrorResponse": { "type": "object", "additionalProperties": false, "required": ["code", "message"], "properties": { "code": {"type": "string", "enum": ["ServiceTransportError"]}, "message": {"type": "string"}, "details": { "oneOf": [ {"type": "array", "items": {"$ref": "#/components/schemas/ErrorDetail"}}, {"type": "object", "additionalProperties": true}, {"type": "string"} ] } }, "title": "Partnership timeout error" }, "InternalServerErrorResponse": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": ["code", "error_message"], "properties": { "code": {"type": "integer", "enum": [3]}, "error_message": {"type": "string", "enum": ["SYSTEM_INTERNAL_ERROR"]}, "retry_after": {"type": "string", "format": "date-time"}, "description": {"type": "string"} }, "title": "Request-processing error: internal error" }, { "type": "object", "additionalProperties": false, "required": ["code", "message"], "properties": { "code": {"type": "string", "enum": ["Error"]}, "message": {"type": "string"}, "details": { "oneOf": [ {"type": "array", "items": {"$ref": "#/components/schemas/ErrorDetail"}}, {"type": "object", "additionalProperties": true}, {"type": "string"} ] } }, "title": "Partnership service error" } ] }, "BadGatewayErrorResponse": { "type": "object", "additionalProperties": false, "required": ["code", "error_message"], "properties": { "code": {"type": "integer", "enum": [1]}, "error_message": {"type": "string", "enum": ["SYSTEM_BAD_GATEWAY"]}, "retry_after": {"type": "string", "format": "date-time"}, "description": {"type": "string"} }, "title": "Request-processing error: bad gateway" }, "ServiceUnavailableErrorResponse": { "type": "object", "additionalProperties": false, "required": ["code", "error_message"], "properties": { "code": {"type": "integer", "enum": [2]}, "error_message": {"type": "string", "enum": ["SYSTEM_TEMPORARY_UNAVAILABLE"]}, "retry_after": {"type": "string", "format": "date-time"}, "description": {"type": "string"} }, "title": "Request-processing error: service unavailable" }, "CampaignUpdateBadRequestErrorResponse": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": ["code", "error_message"], "properties": { "code": {"type": "integer", "enum": [3001]}, "error_message": {"type": "string", "enum": ["REQUEST_INVALID_PARAMETERS"]}, "retry_after": {"type": "string", "format": "date-time"}, "description": {"type": "string"} }, "title": "Request validation error" }, { "type": "object", "additionalProperties": false, "required": ["code", "message"], "properties": { "code": {"type": "string", "enum": ["ValidationError", "NotUnique"]}, "message": {"type": "string"}, "details": { "oneOf": [ {"type": "array", "items": {"$ref": "#/components/schemas/ErrorDetail"}}, {"type": "object", "additionalProperties": true}, {"type": "string"} ] } }, "title": "Campaign validation error" } ] }, "CampaignCreateBadRequestErrorResponse": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": ["code", "error_message"], "properties": { "code": {"type": "integer", "enum": [3001]}, "error_message": {"type": "string", "enum": ["REQUEST_INVALID_PARAMETERS"]}, "retry_after": {"type": "string", "format": "date-time"}, "description": {"type": "string"} }, "title": "Request validation error" }, { "type": "object", "additionalProperties": false, "required": ["code", "message"], "properties": { "code": {"type": "string", "enum": ["ValidationError", "NotUnique", "ManyItems"]}, "message": {"type": "string"}, "details": { "oneOf": [ {"type": "array", "items": {"$ref": "#/components/schemas/ErrorDetail"}}, {"type": "object", "additionalProperties": true}, {"type": "string"} ] } }, "title": "Campaign validation error" } ] }, "PartnershipErrorResponse": { "type": "object", "additionalProperties": false, "required": ["code", "message"], "properties": { "code": {"$ref": "#/components/schemas/PublicApiErrorCode"}, "message": {"type": "string"}, "details": { "oneOf": [ {"type": "array", "items": {"$ref": "#/components/schemas/ErrorDetail"}}, {"type": "object", "additionalProperties": true}, {"type": "string"} ] } } }, "RequestProcessingErrorResponse": { "type": "object", "additionalProperties": false, "required": ["code", "error_message"], "properties": { "code": {"type": "integer"}, "error_message": {"type": "string"}, "retry_after": {"type": "string", "format": "date-time"}, "description": {"type": "string"} }, "allOf": [ { "oneOf": [ { "properties": {"code": {"const": 1}, "error_message": {"const": "SYSTEM_BAD_GATEWAY"}}, "required": ["code", "error_message"] }, { "properties": {"code": {"const": 2}, "error_message": {"const": "SYSTEM_TEMPORARY_UNAVAILABLE"}}, "required": ["code", "error_message"] }, { "properties": {"code": {"const": 3}, "error_message": {"const": "SYSTEM_INTERNAL_ERROR"}}, "required": ["code", "error_message"] }, { "properties": {"code": {"const": 1000}, "error_message": {"const": "AUTH_INVALID_API_KEY"}}, "required": ["code", "error_message"] }, { "properties": {"code": {"const": 1001}, "error_message": {"const": "AUTH_INVALID_SIGNATURE"}}, "required": ["code", "error_message"] }, { "properties": {"code": {"const": 1002}, "error_message": {"const": "AUTH_FORBIDDEN"}}, "required": ["code", "error_message"] }, { "properties": {"code": {"const": 1003}, "error_message": {"const": "AUTH_RATE_LIMIT"}}, "required": ["code", "error_message"] }, { "properties": {"code": {"const": 3001}, "error_message": {"const": "REQUEST_INVALID_PARAMETERS"}}, "required": ["code", "error_message"] } ] } ] }, "PublicApiErrorCode": { "type": "string", "enum": [ "ValidationError", "NotUnique", "ManyItems", "AuthenticationFailed", "PermissionDenied", "NotFound", "Throttled", "Error", "ServiceTransportError" ] }, "DecimalString": {"type": "string", "pattern": "^[+-]?[0-9]+(?:\\.[0-9]+)?$"}, "PartnerLink": { "type": "object", "additionalProperties": false, "properties": { "reward_schema": {"type": "string"}, "link_code": {"type": "string"}, "is_default": {"type": "boolean"}, "is_blocked": {"type": "boolean"}, "is_custom": {"type": "boolean"}, "partner_account": {"type": ["string", "null"]} }, "required": ["reward_schema", "link_code", "is_default", "is_blocked", "is_custom"] }, "Money": { "type": "object", "additionalProperties": false, "properties": { "amount": {"allOf": [{"$ref": "#/components/schemas/DecimalString"}]}, "currency": {"type": "string"} }, "required": ["amount", "currency"] }, "PartnerAccount": { "type": "object", "additionalProperties": false, "properties": { "account": {"type": "string"}, "account_type": {"type": "string"}, "account_platform": {"type": "string"}, "equity": {"$ref": "#/components/schemas/Money"}, "archived": {"type": "boolean"}, "is_hidden": {"type": "boolean"}, "created": {"type": "string", "format": "date-time"} }, "required": ["account", "account_type", "equity", "archived", "is_hidden", "created"] }, "PartnerSummary": { "type": "object", "additionalProperties": false, "properties": { "uid": {"type": "string", "format": "uuid"}, "entity_id": {"type": "string", "format": "uuid"}, "entity": {"type": ["string", "null"]}, "name": {"type": "string"}, "country": {"type": "string"}, "summary_reward": {"oneOf": [{"$ref": "#/components/schemas/Money"}, {"type": "null"}]}, "cpa_reward_pending": {"$ref": "#/components/schemas/Money"}, "cpa_reward_rejected": {"$ref": "#/components/schemas/Money"}, "clients_count": {"type": "integer"}, "summary_equity": {"$ref": "#/components/schemas/Money"}, "accounts": {"type": "array", "items": {"$ref": "#/components/schemas/PartnerAccount"}}, "reg_date": {"type": "string", "format": "date-time"}, "permissions": {"type": "object", "additionalProperties": {"type": "string"}}, "has_shared_report": {"type": "boolean"}, "fake_email": {"type": ["string", "null"]}, "is_blocked": {"type": "boolean"}, "reward_schemas": {"type": "array", "items": {"type": "string"}}, "default_link": {"type": "string"}, "kyc_grace_period_status": {"type": ["string", "null"]} }, "required": [ "uid", "entity", "name", "country", "clients_count", "accounts", "reg_date", "permissions", "has_shared_report", "is_blocked", "reward_schemas", "default_link" ] }, "IBCandidate": { "type": "object", "additionalProperties": false, "properties": { "kyc_passed": {"type": "boolean"}, "clients": {"type": "boolean"}, "ready_for_promotion": {"type": "boolean"}, "promoted": {"type": "boolean"} }, "required": ["kyc_passed", "clients", "ready_for_promotion", "promoted"] }, "PartnerTierState": { "type": "object", "additionalProperties": true, "properties": { "clients_count": {"type": "integer"}, "usd_volume": {"type": "number"}, "subpartners_count": {"type": "integer"}, "subpartners_usd_volume": {"type": "number"}, "registered_dt": {"type": "string", "format": "date-time"}, "tier_id": {"type": "integer"}, "tier_name": {"type": "string"}, "tier_group": {"type": "string"}, "tier_order": {"type": "integer"}, "grace_period_start_dt": {"type": ["string", "null"], "format": "date-time"}, "grace_period_finish_dt": {"type": ["string", "null"], "format": "date-time"}, "is_second_lvl": {"type": "boolean"}, "ib_candidate": {"oneOf": [{"$ref": "#/components/schemas/IBCandidate"}, {"type": "null"}]}, "commission": { "type": "object", "additionalProperties": {"type": "array", "items": {"type": ["integer", "null"]}} }, "is_ib": {"type": "boolean"}, "qualification_tier": { "type": ["object", "null"], "additionalProperties": false, "properties": { "id": {"type": "integer"}, "name": {"type": "string"}, "group": {"type": "string"}, "order": {"type": "integer"} } }, "last_grace_period_status": {"type": ["string", "null"]} }, "required": [ "clients_count", "usd_volume", "subpartners_count", "subpartners_usd_volume", "registered_dt", "tier_id", "tier_name", "tier_group", "tier_order", "is_second_lvl" ] }, "TierConditionsRow": { "type": "object", "additionalProperties": false, "properties": { "id": {"type": "integer"}, "name": {"type": "string"}, "group": {"type": "string"}, "order": {"type": "integer"}, "commission": { "type": "object", "additionalProperties": false, "properties": { "formula_forex": {"type": "array", "minItems": 2, "maxItems": 2, "items": {"type": ["integer", "null"]}}, "formula_classic_v2": { "type": "array", "minItems": 2, "maxItems": 2, "items": {"type": ["integer", "null"]} } }, "required": ["formula_forex", "formula_classic_v2"] }, "conditions": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": {"type": "integer"}, "usd_volume": {"type": "number"}, "subpartners_usd_volume": {"type": "number"}, "clients_count": {"type": "integer"}, "subpartners_count": {"type": "integer"}, "is_discretionary": {"type": "boolean"}, "is_ib": {"type": "boolean"}, "is_second_level": {"type": "boolean"} }, "required": [ "id", "usd_volume", "subpartners_usd_volume", "clients_count", "subpartners_count", "is_discretionary", "is_ib", "is_second_level" ] } } }, "required": ["id", "name", "group", "order", "conditions"] }, "TierConditionsResponse": { "type": "object", "additionalProperties": false, "properties": { "data": {"type": "array", "items": {"$ref": "#/components/schemas/TierConditionsRow"}}, "meta": {"$ref": "#/components/schemas/TierConditionsMeta"} }, "required": ["data", "meta"] }, "TierConditionsMeta": { "type": "object", "additionalProperties": false, "properties": {"count": {"type": "integer"}}, "required": ["count"] }, "CountTotals": { "type": "object", "additionalProperties": false, "properties": {"count": {"type": "integer"}}, "required": ["count"] }, "FixPerLotTierReward": { "type": "object", "additionalProperties": false, "properties": { "tier_id": {"type": "integer"}, "tier_name": {"type": "string"}, "first_level": {"type": "number"}, "second_level": {"type": ["number", "null"]} }, "required": ["tier_id", "tier_name", "first_level"] }, "FixPerLotGroup": { "type": "object", "additionalProperties": false, "properties": { "name": {"type": "string"}, "symbols": {"type": "array", "items": {"type": "string"}}, "tiers": {"type": "array", "items": {"$ref": "#/components/schemas/FixPerLotTierReward"}} }, "required": ["name", "symbols", "tiers"] }, "FixPerLotMatrix": { "type": "object", "additionalProperties": true, "properties": { "raw": {"type": "array", "items": {"$ref": "#/components/schemas/FixPerLotGroup"}}, "zero": {"type": "array", "items": {"$ref": "#/components/schemas/FixPerLotGroup"}} } }, "ReferralAgentLinkListResponse": { "type": "object", "additionalProperties": false, "required": ["data", "totals"], "properties": { "data": {"type": "array", "items": {"$ref": "#/components/schemas/ReferralAgentListItem"}}, "totals": {"$ref": "#/components/schemas/CountTotals"} } }, "PartnerCodeCreateResponse": {"$ref": "#/components/schemas/PartnerLink"}, "ReferralAgentListItem": { "type": "object", "additionalProperties": false, "required": [ "id", "uid", "alias", "account", "partner_account", "link_code", "status", "share_perc", "clients", "shared_reports", "created" ], "properties": { "id": {"type": "integer"}, "uid": {"type": "string", "format": "uuid"}, "alias": {"type": "string"}, "account": {"type": "string"}, "partner_account": {"type": "string"}, "link_code": {"type": "string"}, "status": {"type": "string", "enum": ["ACTIVE", "ARCHIVED", "BLOCKED", "COMMISSION_RESTRICTED"]}, "share_perc": {"type": "number"}, "clients": {"type": "integer"}, "shared_reports": { "type": "array", "items": {"type": "string", "enum": ["REWARD_HISTORY", "CLIENT_ACC_LIST"]} }, "agent_commission_usd": {"type": ["number", "null"]}, "reward_usd": {"type": ["number", "null"]}, "created": {"type": "string", "format": "date-time"} } }, "ReferralAgentLinkDetails": { "type": "object", "additionalProperties": false, "required": [ "id", "alias", "link_code", "account", "partner_account", "status", "share_perc", "shared_reports" ], "properties": { "id": {"type": "integer"}, "alias": {"type": "string"}, "link_code": {"type": "string"}, "email": {"type": ["string", "null"], "format": "email"}, "account": {"type": "string"}, "partner_account": {"type": "string"}, "status": {"type": "string", "enum": ["ACTIVE", "ARCHIVED", "BLOCKED", "COMMISSION_RESTRICTED"]}, "share_perc": {"type": "number"}, "shared_reports": { "type": "array", "items": {"type": "string", "enum": ["REWARD_HISTORY", "CLIENT_ACC_LIST"]} } } }, "ReferralAgentLinkUpdateResult": { "type": "object", "additionalProperties": false, "required": ["id", "alias"], "properties": {"id": {"type": "integer"}, "alias": {"type": "string"}} }, "ErrorDetail": { "type": "object", "properties": {"field": {"type": "string"}, "code": {"type": "string"}, "message": {"type": "string"}}, "additionalProperties": true } }, "requestBodies": { "PartnerCodeCreateRequest": { "content": { "application/json": { "schema": { "type": "object", "required": ["partner_code"], "properties": { "partner_code": {"type": "string", "minLength": 3, "maxLength": 10, "pattern": "^[a-z0-9_-]+$"}, "account": {"type": "integer"} } } } }, "required": true } } } } ``` ## Payments API reference ### Exness Payments API API version `1.0.0` · OpenAPI `3.1.1`. Use the Payments host provisioned during onboarding. A signed GET includes an empty idempotency header. Transfer creation uses a canonical UUID and returns HTTP 201 on creation. Track processing separately by transfer ID. Error names and their numeric codes form the public machine-readable contract. [Reference introduction](https://www.exness-api.com/reference/payments/exness-payments-api) · [Official OpenAPI YAML](https://www.exness-api.com/openapi/payments.public.yaml) ### Transfers #### Create a transfer `POST /v1/transfers` · Operation ID `createTransfer`. A valid 201 with a readable `transfer_id` confirms creation. Store the ID and track status. For an ambiguous response, resend the identical request with the same UUID according to the recovery guide. [Operation reference](https://www.exness-api.com/reference/payments/create-transfer) ```json { "tags": ["Transfers"], "operationId": "createTransfer", "x-public-error-codes": [ "REQUEST_INVALID", "REQUEST_INVALID_PARAMETERS", "AUTH_INVALID_API_KEY", "AUTH_INVALID_SIGNATURE", "AUTH_PERMISSION_DENIED", "ACCOUNT_NOT_FOUND", "REQUEST_IDEMPOTENCY_KEY_REUSED", "TRANSFER_NOT_SUPPORTED", "TRANSFER_DESTINATION_NOT_SUPPORTED", "TRANSFER_SOURCE_NOT_ALLOWED", "OPERATION_NOT_ALLOWED", "TRANSFER_INSUFFICIENT_FUNDS", "TRANSFER_AMOUNT_TOO_SMALL", "TRANSFER_AMOUNT_TOO_LARGE", "TRANSFER_LIMIT_REACHED", "TRANSFER_MT_ACCOUNT_NOT_SUPPORTED", "TRANSFER_OUTCOME_UNKNOWN", "REQUEST_RATE_LIMIT", "SYSTEM_TEMPORARY_UNAVAILABLE", "SYSTEM_INTERNAL_ERROR" ], "requestBody": { "required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TransferRequest"}}} }, "responses": { "201": {"$ref": "#/components/responses/TransferCreated"}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/TransferForbidden"}, "404": {"$ref": "#/components/responses/TransferAccountNotFound"}, "409": {"$ref": "#/components/responses/Conflict"}, "422": {"$ref": "#/components/responses/ValidationFailed"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "500": {"$ref": "#/components/responses/TransferCreationInternalError"}, "503": {"$ref": "#/components/responses/TransferServiceUnavailable"} } } ``` #### Get a transfer `GET /v1/transfers/{transfer_id}` · Operation ID `getTransfer`. Status is `processing`, `done` or `rejected`. The last two are final. Access requires a key of the sender or recipient scoped to the transfer type. [Operation reference](https://www.exness-api.com/reference/payments/get-transfer) ```json { "tags": ["Transfers"], "operationId": "getTransfer", "x-public-error-codes": [ "REQUEST_INVALID", "REQUEST_INVALID_PARAMETERS", "AUTH_INVALID_API_KEY", "AUTH_INVALID_SIGNATURE", "AUTH_PERMISSION_DENIED", "TRANSFER_NOT_FOUND", "REQUEST_RATE_LIMIT", "SYSTEM_TEMPORARY_UNAVAILABLE", "SYSTEM_INTERNAL_ERROR" ], "parameters": [{"$ref": "#/components/parameters/TransferIdPath"}], "responses": { "200": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/Transfer"}}}}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/TransferNotFound"}, "422": {"$ref": "#/components/responses/InvalidParameters"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"} } } ``` ### Accounts #### Get account balance `GET /v1/accounts/{account_id}/balance` · Operation ID `getAccountBalance`. The balance is the amount available for transfers. Preserve the account identifier and balance as strings. [Operation reference](https://www.exness-api.com/reference/payments/get-account-balance) ```json { "tags": ["Accounts"], "operationId": "getAccountBalance", "x-public-error-codes": [ "REQUEST_INVALID", "REQUEST_INVALID_PARAMETERS", "AUTH_INVALID_API_KEY", "AUTH_INVALID_SIGNATURE", "AUTH_PERMISSION_DENIED", "ACCOUNT_NOT_FOUND", "REQUEST_RATE_LIMIT", "SYSTEM_TEMPORARY_UNAVAILABLE", "SYSTEM_INTERNAL_ERROR" ], "parameters": [{"$ref": "#/components/parameters/AccountIdPath"}], "responses": { "200": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/AccountBalance"}}}}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/AuthorizationFailed"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/AccountNotFound"}, "422": {"$ref": "#/components/responses/InvalidParameters"}, "429": {"$ref": "#/components/responses/TooManyRequests"}, "500": {"$ref": "#/components/responses/InternalServerError"}, "503": {"$ref": "#/components/responses/ServiceUnavailable"} } } ``` ### Payments public error codes | HTTP status | Code | Error name | | --- | --- | --- | | 400 | `3000` | `REQUEST_INVALID` | | 401 | `1000` | `AUTH_INVALID_API_KEY` | | 401 | `1001` | `AUTH_INVALID_SIGNATURE` | | 403 | `1002` | `AUTH_PERMISSION_DENIED` | | 403 | `7002` | `TRANSFER_SOURCE_NOT_ALLOWED` | | 404 | `2000` | `ACCOUNT_NOT_FOUND` | | 404 | `7010` | `TRANSFER_NOT_FOUND` | | 409 | `3016` | `REQUEST_IDEMPOTENCY_KEY_REUSED` | | 409 | `7004` | `TRANSFER_INSUFFICIENT_FUNDS` | | 422 | `3001` | `REQUEST_INVALID_PARAMETERS` | | 422 | `7000` | `TRANSFER_NOT_SUPPORTED` | | 422 | `7001` | `TRANSFER_DESTINATION_NOT_SUPPORTED` | | 422 | `7003` | `OPERATION_NOT_ALLOWED` | | 422 | `7005` | `TRANSFER_AMOUNT_TOO_SMALL` | | 422 | `7006` | `TRANSFER_AMOUNT_TOO_LARGE` | | 422 | `7007` | `TRANSFER_LIMIT_REACHED` | | 422 | `7009` | `TRANSFER_MT_ACCOUNT_NOT_SUPPORTED` | | 429 | `3015` | `REQUEST_RATE_LIMIT` | | 500 | `3` | `SYSTEM_INTERNAL_ERROR` | | 500 | `7008` | `TRANSFER_OUTCOME_UNKNOWN` | | 503 | `2` | `SYSTEM_TEMPORARY_UNAVAILABLE` | [Troubleshooting and retry guidance](https://www.exness-api.com/payments/guides/troubleshooting) ### Payments OpenAPI components ```json { "security": [ { "ExnApiKeyAuth": [], "ExnTimestampAuth": [], "ExnDataAuth": [], "ExnSignatureAuth": [], "ExnSignVersionAuth": [], "ExnIdempotencyKeyAuth": [] } ], "components": { "securitySchemes": { "ExnApiKeyAuth": {"type": "apiKey", "in": "header", "name": "EXN-API-KEY"}, "ExnTimestampAuth": {"type": "apiKey", "in": "header", "name": "EXN-TIMESTAMP"}, "ExnDataAuth": {"type": "apiKey", "in": "header", "name": "EXN-DATA"}, "ExnSignatureAuth": {"type": "apiKey", "in": "header", "name": "EXN-SIGN"}, "ExnSignVersionAuth": {"type": "apiKey", "in": "header", "name": "EXN-SIGN-VERSION"}, "ExnIdempotencyKeyAuth": {"type": "apiKey", "in": "header", "name": "EXN-IDEMPOTENCY-KEY"} }, "parameters": { "AccountIdPath": { "name": "account_id", "in": "path", "required": true, "schema": {"$ref": "#/components/schemas/AccountId"} }, "TransferIdPath": { "name": "transfer_id", "in": "path", "required": true, "schema": {"$ref": "#/components/schemas/TransferId"} } }, "responses": { "TransferCreated": { "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TransferCreated"}}} }, "BadRequest": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorResponse"}}}}, "AuthorizationFailed": { "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorResponse"}}} }, "Forbidden": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorResponse"}}}}, "TransferForbidden": { "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorResponse"}}} }, "AccountNotFound": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorResponse"}}}}, "TransferAccountNotFound": { "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorResponse"}}} }, "TransferNotFound": { "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorResponse"}}} }, "Conflict": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorResponse"}}}}, "ValidationFailed": { "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorResponse"}}} }, "InvalidParameters": { "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorResponse"}}} }, "TooManyRequests": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorResponse"}}}}, "ServiceUnavailable": { "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorResponse"}}} }, "TransferServiceUnavailable": { "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorResponse"}}} }, "InternalServerError": { "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorResponse"}}} }, "TransferCreationInternalError": { "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorResponse"}}} } }, "schemas": { "SignedRequestData": { "type": "object", "additionalProperties": false, "required": ["api_key", "idempotency_key", "timestamp", "sign_version", "method", "path", "body_hash"], "properties": { "api_key": {"type": "string", "minLength": 1}, "idempotency_key": {"type": "string"}, "timestamp": {"type": "integer", "format": "int64"}, "sign_version": {"type": "integer", "const": 1}, "method": {"type": "string", "enum": ["GET", "POST"]}, "path": {"type": "string", "minLength": 1}, "body_hash": {"type": "string", "pattern": "^[A-Za-z0-9_-]+$"} } }, "AccountId": {"type": "string", "minLength": 1}, "TransferId": {"type": "string", "pattern": "^[0-9]+$", "minLength": 1}, "Amount": {"type": "string", "minLength": 1, "maxLength": 29, "pattern": "^[0-9]+(\\.[0-9]+)?$"}, "TransferDestinationType": {"type": "string", "enum": ["own_account", "another_client"]}, "TransferRequest": { "type": "object", "additionalProperties": false, "required": ["destination_type", "source_account", "destination_account", "amount"], "properties": { "destination_type": {"$ref": "#/components/schemas/TransferDestinationType"}, "source_account": {"$ref": "#/components/schemas/AccountId"}, "destination_account": {"$ref": "#/components/schemas/AccountId"}, "amount": {"$ref": "#/components/schemas/Amount"} } }, "Money": { "type": "object", "additionalProperties": false, "required": ["amount", "currency"], "properties": { "amount": {"type": "string", "pattern": "^[0-9]+(\\.[0-9]+)?$"}, "currency": {"type": "string", "minLength": 1} } }, "TransferCreated": { "type": "object", "additionalProperties": false, "required": ["transfer_id", "source", "destination"], "properties": { "transfer_id": {"$ref": "#/components/schemas/TransferId"}, "source": {"$ref": "#/components/schemas/Money"}, "destination": {"$ref": "#/components/schemas/Money"} } }, "AccountBalance": { "type": "object", "additionalProperties": false, "required": ["account_id", "balance", "currency"], "properties": { "account_id": {"$ref": "#/components/schemas/AccountId"}, "balance": {"type": "string", "pattern": "^[0-9]+(\\.[0-9]+)?$"}, "currency": {"type": "string", "minLength": 1} } }, "Transfer": { "type": "object", "additionalProperties": false, "required": ["transfer_id", "status"], "properties": { "transfer_id": {"$ref": "#/components/schemas/TransferId"}, "status": {"type": "string", "enum": ["processing", "done", "rejected"]} } }, "ErrorResponse": { "type": "object", "additionalProperties": false, "required": ["code", "error_message", "description"], "properties": { "code": {"$ref": "#/components/schemas/PublicApiErrorCode"}, "error_message": {"type": "string", "pattern": "^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$"}, "description": {"type": "string", "minLength": 1} } }, "PublicApiErrorCode": { "type": "integer", "format": "int32", "enum": [ 2, 3, 1000, 1001, 1002, 2000, 3000, 3001, 3015, 3016, 7000, 7001, 7002, 7003, 7004, 7005, 7006, 7007, 7008, 7009, 7010 ] } } } } ```