> This page is for Trading.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.immix.xyz/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.immix.xyz/_mcp/server.

# Propose an account's risk limit

POST /risk/limits
Content-Type: application/json

Proposes an account's first row (`risk:propose`). Judged against what governs the account now: a row that only tightens is in force at once; one that loosens any threshold collects the organisation's `risk` approvals. Takes no `If-Match`. Answers 201 with the row.

Reference: https://docs.immix.xyz/trading/api-reference/rest-api/risk/create-limit

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Query parameters

- `minGlobalSequence` (string, optional) — A position you hold — an `X-Immix-Global-Sequence` you read, or a 202's `commandGlobalSequence`: this member answers only once it has folded the platform's stream through it, waiting up to its deadline, then 503 `PROJECTION_BEHIND` with `Retry-After`. Within that stream a read is never older than what you have seen; drop your positions after an announced stream cut. A retry stating its 202's position attaches to or replays that operation while the journal holds its key, never publishing twice. Stated once: one to nineteen digits, at most 9223372036854775807; else 400 `MALFORMED_REQUEST`.

### Headers

- `Idempotency-Key` (string, required) — Required on every write: a URL-safe string of 1 to 64 characters from `[A-Za-z0-9._~-]` (a UUID fits), scoped to you. It names one operation on one record, ever: a retry replays the stored outcome (`Idempotent-Replay: true`) or attaches to the live one, and reuse on another record refuses 409 `IDEMPOTENCY_KEY_REUSED`. Missing or malformed, 400.
- `X-Request-Id` (string, optional) — Your own id for the request: 8 to 128 of `[A-Za-z0-9._-]`. It becomes the request's id and is echoed on the response. A value off that grammar is replaced with a fresh id, never refused.

### Body (application/json)

This endpoint expects an object.

- `accountId` (integer, required) — The account the row governs. Every organisation already holds its default row (`0`): amend that one rather than creating another.
- `grossLeverageNoSpotSoft` (string, optional, nullable) — money (a decimal string, at most eight places): Gross leverage over derivatives and their resting orders past which the account is held to reducing its risk, as a ratio to the margin equity (`"3"` is 3x). A decimal string of at most eight places; `"0"` is no cap; omitted or `null` is not stated: on an account's row the default's value applies, and on the default row it is no cap, as `"0"` is.
- `grossLeverageNoSpotHard` (string, optional, nullable) — money (a decimal string, at most eight places): Gross leverage over derivatives and their resting orders past which the account is blocked. A decimal string of at most eight places; `"0"` is no cap; omitted or `null` is not stated: on an account's row the default's value applies, and on the default row it is no cap, as `"0"` is.
- `netLeverageNoSpotSoft` (string, optional, nullable) — money (a decimal string, at most eight places): Net leverage over derivatives and their resting orders past which the account is held to reducing its risk. A decimal string of at most eight places; `"0"` is no cap; omitted or `null` is not stated: on an account's row the default's value applies, and on the default row it is no cap, as `"0"` is.
- `netLeverageNoSpotHard` (string, optional, nullable) — money (a decimal string, at most eight places): Net leverage over derivatives and their resting orders past which the account is blocked. A decimal string of at most eight places; `"0"` is no cap; omitted or `null` is not stated: on an account's row the default's value applies, and on the default row it is no cap, as `"0"` is.
- `grossLeverageWithSpotSoft` (string, optional, nullable) — money (a decimal string, at most eight places): Gross leverage with the coins held and every resting order past which the account is held to reducing its risk. A decimal string of at most eight places; `"0"` is no cap; omitted or `null` is not stated: on an account's row the default's value applies, and on the default row it is no cap, as `"0"` is.
- `grossLeverageWithSpotHard` (string, optional, nullable) — money (a decimal string, at most eight places): Gross leverage with the coins held and every resting order past which the account is blocked. A decimal string of at most eight places; `"0"` is no cap; omitted or `null` is not stated: on an account's row the default's value applies, and on the default row it is no cap, as `"0"` is.
- `marginEquityFloorUsd` (string, optional, nullable) — money (a decimal string, at most eight places): The margin equity in USD (`marginEquityUsd` on the risk record: the equity of the account's margin wallets — at Binance the spot and USD-M wallets together — not the account's whole NLV) at or under which the account is blocked. A decimal string of at most eight places; `"0"` is no cap; omitted or `null` is not stated: on an account's row the default's value applies, and on the default row it is no cap, as `"0"` is.
- `remark` (string, optional) — A note for the approvers; US-ASCII, at most 256 bytes. Absent reads as empty.

## Response

### 201

The row exists: in force when its first proposal only tightens, `PENDING_APPROVAL` when it collects approvals — with the answering change's position, the row's `ETag` and, on a replayed key, `Idempotent-Replay`.

- `riskLimitId` (integer, required) — The row's id.
- `version` (string, required) — The row's version as a decimal string, bumped by every change, the `ETag` an entity write's `If-Match` takes.
- `accountId` (integer, required) — The account the row governs (`GET /accounts`); `0` is the organisation-wide default row, which governs every account without a row of its own and every threshold such a row leaves unstated.
- `status` (enum, required) — `PENDING_APPROVAL`: a first proposal not yet approved, or withdrawn — it governs nothing. `ACTIVE`: in force. `RETIRED`: retired, the default governs again. The value set is append-only: read an unknown value as `UNKNOWN`.
  - Allowed values: `UNKNOWN`, `PENDING_APPROVAL`, `ACTIVE`, `RETIRED`
- `grossLeverageNoSpotSoft` (string, required, nullable) — money (an exact decimal string at the scale the row holds it, trailing zeros included): Gross leverage over derivatives and their resting orders past which the account is held to reducing its risk, as a ratio to the margin equity (`"3"` is 3x). `"0"` is no cap; `null` is not stated, which on an account's row means the organisation-wide default's value applies.
- `grossLeverageNoSpotHard` (string, required, nullable) — money (an exact decimal string at the scale the row holds it, trailing zeros included): Gross leverage over derivatives and their resting orders past which the account is blocked. `"0"` is no cap; `null` is not stated, which on an account's row means the organisation-wide default's value applies.
- `netLeverageNoSpotSoft` (string, required, nullable) — money (an exact decimal string at the scale the row holds it, trailing zeros included): Net leverage over derivatives and their resting orders past which the account is held to reducing its risk. `"0"` is no cap; `null` is not stated, which on an account's row means the organisation-wide default's value applies.
- `netLeverageNoSpotHard` (string, required, nullable) — money (an exact decimal string at the scale the row holds it, trailing zeros included): Net leverage over derivatives and their resting orders past which the account is blocked. `"0"` is no cap; `null` is not stated, which on an account's row means the organisation-wide default's value applies.
- `grossLeverageWithSpotSoft` (string, required, nullable) — money (an exact decimal string at the scale the row holds it, trailing zeros included): Gross leverage with the coins held and every resting order past which the account is held to reducing its risk. `"0"` is no cap; `null` is not stated, which on an account's row means the organisation-wide default's value applies.
- `grossLeverageWithSpotHard` (string, required, nullable) — money (an exact decimal string at the scale the row holds it, trailing zeros included): Gross leverage with the coins held and every resting order past which the account is blocked. `"0"` is no cap; `null` is not stated, which on an account's row means the organisation-wide default's value applies.
- `marginEquityFloorUsd` (string, required, nullable) — money (an exact decimal string at the scale the row holds it, trailing zeros included): The margin equity in USD (`marginEquityUsd` on the risk record: the equity of the account's margin wallets — at Binance the spot and USD-M wallets together — not the account's whole NLV) at or under which the account is blocked. `"0"` is no cap; `null` is not stated, which on an account's row means the organisation-wide default's value applies.
- `proposedBy` (Actor, required, nullable) — The maker of the row's last proposal — an actor, kept on the record once it concludes or is withdrawn; `null` when the row has had none (the organisation-wide default the platform creates). Always a member's: only members write risk. `pendingTransition` alone says whether a proposal is pending.
- `pendingTransition` (enum, required) — What the pending proposal proposes: `ACTIVATE` a first row, `AMEND` new thresholds on an active row, `RETIRE` its retirement; `NONE` when nothing is pending. On `view=latest` the thresholds are the proposed ones while it is pending; `view=approved` shows those in force.
  - Allowed values: `NONE`, `ACTIVATE`, `AMEND`, `RETIRE`
- `proposedAtNs` (string, required, nullable) — When the row's last proposal was made, epoch nanoseconds as a decimal string; `null` when none was.
- `concludedAtNs` (string, required, nullable) — When the row's last proposal concluded, epoch nanoseconds as a decimal string — equal to `proposedAtNs` on one that only tightened and so concluded as it was submitted; `null` while it is pending, after a withdrawal, and on a row that has had none.
- `concludedBy` (Actor, required, nullable) — Who concluded it — the approver whose approval met the organisation's `risk` rule in force, or the maker where nothing needed approving; `null` when `concludedAtNs` is.
- `concludedTransition` (enum, required) — What the row's last proposal proposed, kept once it concluded — `ACTIVATE`, `AMEND` or `RETIRE`, however the row's `status` has moved on since; `NONE` while it is pending, after a withdrawal, and on a row that has had none. The value set is append-only: treat an unknown name as unknown, never as an error.
  - Allowed values: `NONE`, `ACTIVATE`, `AMEND`, `RETIRE`
- `approvals` (list of RiskLimitRowApprovalsItem, required) — Who approved the row's last proposal and when, in approval order; empty until the first approval and after a withdrawal. It concludes when they number the organisation's `risk` rule in force at that approval (`GET /approval-rules?family=RISK`).
- `remark` (string, required) — The maker's note on the last proposal; empty when none.
- `lastWithdrawalProposedBy` (Actor, required, nullable) — Who made the last withdrawn proposal; `null` when none was.
- `lastWithdrawalWithdrawnBy` (Actor, required, nullable) — Who withdrew it — its maker, or an approver returning it; `null` when none was.
- `lastWithdrawalAtNs` (string, required, nullable) — When it was withdrawn, epoch nanoseconds as a decimal string; `null` when none was.
- `lastWithdrawalReason` (string, required) — Why it was withdrawn, as the withdrawer stated it; empty when none.
- `updatedAtNs` (string, required) — When this version was written, epoch nanoseconds as a decimal string.
- `updatedBy` (Actor, required) — Who wrote this version, never `null`: a member, or the platform itself — `MACHINE` with id `0` — on the default row every organisation is given, every threshold `"0"`.
- `globalSequence` (string, optional) — The position as a decimal string — the last change this member had applied, orders, balance readings and algo instances included.

## Errors

### 400 Create Limit Risk Request Bad Request Error

Refused at the door — nothing reached the platform and the key was not journaled: a missing or malformed `Idempotency-Key`, a malformed `If-Match` (an absent one is 428 `PRECONDITION_REQUIRED`), malformed JSON, a body `actor` (or `userId`, its spelling before the actor), a body restating the path or `If-Match` differently, a money string off its `pattern` (an exponent, a plus sign, a bare point, surrounding whitespace) or past its `maxLength`, or one no value here can state (over 18 fractional digits, or past a 64-bit integer at its own scale), or any other value outside the schema.

- `error` (ErrorBody, required) — What a refusal states. Since `0.12.0` every refusal carries all four members; a member below it sends `code`, sometimes `message`, and neither of the others.
- `currentVersion` (string, optional) — On 412 `VERSION_CONFLICT`, or `CONFIG_SEQ_CONFLICT` on an algo instance's config write: the row's current version (the `ETag` carries the same token) — re-read, reapply, retry.

### 401 Create Limit Risk Request Unauthorized Error

No bearer token, or one that does not verify.

- `error` (ErrorBody, required) — What a refusal states. Since `0.12.0` every refusal carries all four members; a member below it sends `code`, sometimes `message`, and neither of the others.
- `currentVersion` (string, optional) — On 412 `VERSION_CONFLICT`, or `CONFIG_SEQ_CONFLICT` on an algo instance's config write: the row's current version (the `ETag` carries the same token) — re-read, reapply, retry.

### 403 Create Limit Risk Request Forbidden Error

`CAPABILITY_DENIED`: a read your capabilities do not cover, or a staging route without its propose bit (`accounts:propose`). `NOT_REGISTERED`: no row or open invitation at your verified address, an unknown organisation, or an unclaimed row (an administrator admits it). `EMAIL_UNVERIFIED`: verify, then sign in again. `INVITATION_EXPIRED`: an administrator re-invites. `FORBIDDEN_PRINCIPAL`: no `org_id`, a non-ASCII ref, a disabled user, a binding with no user. `ORG_NOT_ACTIVE`: disabled, pending or deleted. Owners' 403s carry the position header and `Idempotent-Replay`.

- `error` (ErrorBody, required) — What a refusal states. Since `0.12.0` every refusal carries all four members; a member below it sends `code`, sometimes `message`, and neither of the others.
- `currentVersion` (string, optional) — On 412 `VERSION_CONFLICT`, or `CONFIG_SEQ_CONFLICT` on an algo instance's config write: the row's current version (the `ETag` carries the same token) — re-read, reapply, retry.

### 409 Create Limit Risk Request Conflict Error

The record owner's refusal, 409 for state or uniqueness and 422 for a field or reference, is a fact on the stream: it carries the position header and a retried key replays it. Door refusals ride the same statuses without the header, never journaled, so a retry takes fresh: 409 `IDEMPOTENCY_KEY_REUSED`; 422 `INSTRUMENT_NOT_LIVE` or `ACCOUNT_NOT_ACTIVE` on `POST /orders`, `REFERENCE_UNKNOWN_INSTRUMENT`, `REFERENCE_INSTRUMENT_NOT_LIVE` or `REFERENCE_UNKNOWN_ACCOUNT` in an algo document (every one answers a held key as its retry).

- `error` (ErrorBody, required) — What a refusal states. Since `0.12.0` every refusal carries all four members; a member below it sends `code`, sometimes `message`, and neither of the others.
- `currentVersion` (string, optional) — On 412 `VERSION_CONFLICT`, or `CONFIG_SEQ_CONFLICT` on an algo instance's config write: the row's current version (the `ETag` carries the same token) — re-read, reapply, retry.

### 413 Create Limit Risk Request Content Too Large Error

The request is too large: a body declared past 1 MB (`PAYLOAD_TOO_LARGE`), or a command past the platform's own bound (`TOO_LARGE`, not expected for any route here). Nothing was submitted; a retry takes fresh.

- `error` (ErrorBody, required) — What a refusal states. Since `0.12.0` every refusal carries all four members; a member below it sends `code`, sometimes `message`, and neither of the others.
- `currentVersion` (string, optional) — On 412 `VERSION_CONFLICT`, or `CONFIG_SEQ_CONFLICT` on an algo instance's config write: the row's current version (the `ETag` carries the same token) — re-read, reapply, retry.

### 422 Create Limit Risk Request Unprocessable Entity Error

The record owner's refusal, 409 for state or uniqueness and 422 for a field or reference, is a fact on the stream: it carries the position header and a retried key replays it. Door refusals ride the same statuses without the header, never journaled, so a retry takes fresh: 409 `IDEMPOTENCY_KEY_REUSED`; 422 `INSTRUMENT_NOT_LIVE` or `ACCOUNT_NOT_ACTIVE` on `POST /orders`, `REFERENCE_UNKNOWN_INSTRUMENT`, `REFERENCE_INSTRUMENT_NOT_LIVE` or `REFERENCE_UNKNOWN_ACCOUNT` in an algo document (every one answers a held key as its retry).

- `error` (ErrorBody, required) — What a refusal states. Since `0.12.0` every refusal carries all four members; a member below it sends `code`, sometimes `message`, and neither of the others.
- `currentVersion` (string, optional) — On 412 `VERSION_CONFLICT`, or `CONFIG_SEQ_CONFLICT` on an algo instance's config write: the row's current version (the `ETag` carries the same token) — re-read, reapply, retry.

### 429 Create Limit Risk Request Too Many Requests Error

Shed at once: `INBOX_FULL` or `IN_FLIGHT_FULL` (this member's bounds; nothing queued, the key not journaled), the intake's or the ticket route's `RATE_LIMITED`, or the orders owner's `RATE_CEILING` (the organisation's per-minute ceiling — a refusal on the stream, replayed like any, so its `retryable` is `false` and the order goes again under a fresh key). `Retry-After` says when.

- `error` (ErrorBody, required) — What a refusal states. Since `0.12.0` every refusal carries all four members; a member below it sends `code`, sometimes `message`, and neither of the others.
- `currentVersion` (string, optional) — On 412 `VERSION_CONFLICT`, or `CONFIG_SEQ_CONFLICT` on an algo instance's config write: the row's current version (the `ETag` carries the same token) — re-read, reapply, retry.

### 500 Create Limit Risk Request Internal Server Error

The gateway failed to serve (`INTERRUPTED`, `INTERNAL_ERROR`, `PROJECTION_MISS`); the operation record, if one exists, is still readable.

- `error` (ErrorBody, required) — What a refusal states. Since `0.12.0` every refusal carries all four members; a member below it sends `code`, sometimes `message`, and neither of the others.
- `currentVersion` (string, optional) — On 412 `VERSION_CONFLICT`, or `CONFIG_SEQ_CONFLICT` on an algo instance's config write: the row's current version (the `ETag` carries the same token) — re-read, reapply, retry.

### 503 Create Limit Risk Request Service Unavailable Error

This member cannot serve the risk reads now: `NOT_PRIMED` — still catching up; retry shortly — `PROJECTION_BEHIND` — behind your `minGlobalSequence`; retry after `Retry-After` — or `RISK_UNAVAILABLE` — deployed without the reads the route serves (the limits, the postures or the adjustments), so a retry here changes nothing; every other route is unaffected. A limit or adjustment write can also meet the door's 503s every write can: `NOT_SERVING`, `OWNER_ABSENT`, or a command lost in transit — nothing was journaled; retry against a serving member.

- `error` (ErrorBody, required) — What a refusal states. Since `0.12.0` every refusal carries all four members; a member below it sends `code`, sometimes `message`, and neither of the others.
- `currentVersion` (string, optional) — On 412 `VERSION_CONFLICT`, or `CONFIG_SEQ_CONFLICT` on an algo instance's config write: the row's current version (the `ETag` carries the same token) — re-read, reapply, retry.

## Types

### Actor

Who acted — the principal behind a command, a row's maker or its concluder: a member (USER, id = the user id), an API key the organisation issued (API_KEY, id = the API key id), or the platform itself (MACHINE, id 0 — a connector's report, an algo instance's order, the door's own write). The kind's value set is append-only: a consumer READING an unknown kind treats the actor as unknown, never as an error.

- `kind` (enum, required) — The kind of principal; which id space `id` names.
  - Allowed values: `USER`, `API_KEY`, `MACHINE`
- `id` (integer, required) — The principal's id in its kind's space: a user id, an API key id, or 0 for the platform itself.

### RiskLimitRowApprovalsItem

- `userId` (integer, required) — An approving user.
- `approvedAtNs` (string, required, nullable) — When this approval was given, platform time in epoch nanoseconds as a decimal string.

### ErrorBody

What a refusal states. Since `0.12.0` every refusal carries all four members; a member below it sends `code`, sometimes `message`, and neither of the others.

- `code` (string, required) — The code to branch on — stable and open (before 1.0.0 a minor may remove one, its changelog naming it): treat one you do not know by its HTTP status. The gateway's: - 400: `MALFORMED_REQUEST`, `MISSING_IDEMPOTENCY_KEY`, `INVALID_IDEMPOTENCY_KEY`, `INVALID_IF_MATCH`, `INVALID_CURSOR` - 401: `UNAUTHENTICATED` - 403: `FORBIDDEN_PRINCIPAL`, `NOT_REGISTERED`, `INVITATION_EXPIRED`, `EMAIL_UNVERIFIED`, `ORG_NOT_ACTIVE`, `CAPABILITY_DENIED` - 404: `NOT_FOUND`, `UNKNOWN_OPERATION`, `ROUTE_NOT_FOUND` (no route answers the path) - 405: `METHOD_NOT_ALLOWED` - 409: `IDEMPOTENCY_KEY_REUSED`, `INTAKE_KEY_REUSED`, `KEY_ALREADY_REGISTERED`, `CONNECTION_DOWN` (`POST /transfers`), `EXCEEDS_MARGIN_HEADROOM`, `HEADROOM_UNKNOWN` (a transfer's submit and its approval) - 413: `TOO_LARGE`, `PAYLOAD_TOO_LARGE`, `DOCUMENT_TOO_LARGE` - 422: a reference this member will not send: `INSTRUMENT_NOT_LIVE`, `ACCOUNT_NOT_ACTIVE` (`POST /orders`), `REFERENCE_UNKNOWN_INSTRUMENT`, `REFERENCE_INSTRUMENT_NOT_LIVE`, `REFERENCE_UNKNOWN_ACCOUNT` (an algo document); `VENUE_UNSUPPORTED`, `DEDICATED_KEY`, `DESTINATION_NOT_ALLOWED` - 428: `PRECONDITION_REQUIRED` - 429: `INBOX_FULL`, `IN_FLIGHT_FULL`, `RATE_LIMITED` - 500: `INTERRUPTED`, `INTERNAL_ERROR`, `PROJECTION_MISS` - 503: `NOT_PRIMED`, `NOT_SERVING`, `OWNER_ABSENT`, `INTAKE_UNAVAILABLE`, `BALANCES_UNAVAILABLE`, `POSITIONS_UNAVAILABLE`, `RISK_UNAVAILABLE`, `TRANSFERS_UNAVAILABLE`, `ALGOS_UNAVAILABLE`, `NOTIFICATIONS_UNAVAILABLE`, `TICKETS_UNAVAILABLE`, `REGISTRATION_PENDING`, `PROJECTION_BEHIND`, `LOST`, `REJECTED_NOT_REGISTERED`, `REJECTED_NOT_ACTIVE` The record owners' refusals ride verbatim — `OrgRegisterRejected.reason`, `OrderRejected.reason`, `AlgoRejected.reason`, `RiskLimitRejectReason`, `RiskAdjustmentRejectReason`, `ManualExecutionRejectReason`, `TransferRejectReason` and `NotificationEndpointRejected.reason` list them; the guide maps each to its status.
- `message` (string, required) — For display only; its wording may change at any time.
- `requestId` (string, required) — The request's id, also sent as X-Request-Id; quote it to support.
- `retryable` (boolean, required) — Whether sending the identical request again, its `Idempotency-Key` included, after `Retry-After` or a short pause, can succeed with nothing else changed. `false` where something must change first: the request, its key, its precondition, the caller's standing, or the platform's own records or deployment. A refusal the record owner judged is always `false`: it is the recorded answer to its key, which replays it.

## Examples

**Request**

```json
{
  "accountId": 1
}
```

**Response**

```json
{
  "riskLimitId": 1,
  "version": "version",
  "accountId": 1,
  "status": "UNKNOWN",
  "grossLeverageNoSpotSoft": "grossLeverageNoSpotSoft",
  "grossLeverageNoSpotHard": "grossLeverageNoSpotHard",
  "netLeverageNoSpotSoft": "netLeverageNoSpotSoft",
  "netLeverageNoSpotHard": "netLeverageNoSpotHard",
  "grossLeverageWithSpotSoft": "grossLeverageWithSpotSoft",
  "grossLeverageWithSpotHard": "grossLeverageWithSpotHard",
  "marginEquityFloorUsd": "marginEquityFloorUsd",
  "proposedBy": {
    "kind": "USER",
    "id": 1
  },
  "pendingTransition": "NONE",
  "proposedAtNs": "proposedAtNs",
  "concludedAtNs": "concludedAtNs",
  "concludedBy": {
    "kind": "USER",
    "id": 1
  },
  "concludedTransition": "NONE",
  "approvals": [
    {
      "userId": 1,
      "approvedAtNs": "approvedAtNs"
    }
  ],
  "remark": "remark",
  "lastWithdrawalProposedBy": {
    "kind": "USER",
    "id": 1
  },
  "lastWithdrawalWithdrawnBy": {
    "kind": "USER",
    "id": 1
  },
  "lastWithdrawalAtNs": "lastWithdrawalAtNs",
  "lastWithdrawalReason": "lastWithdrawalReason",
  "updatedAtNs": "updatedAtNs",
  "updatedBy": {
    "kind": "USER",
    "id": 1
  },
  "globalSequence": "globalSequence"
}
```

**SDK Code**

```python
import requests

url = "https://api.example.com/risk/limits"

payload = { "accountId": 1 }
headers = {
    "Idempotency-Key": "Idempotency-Key",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.example.com/risk/limits';
const options = {
  method: 'POST',
  headers: {
    'Idempotency-Key': 'Idempotency-Key',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: '{"accountId":1}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.example.com/risk/limits"

	payload := strings.NewReader("{\n  \"accountId\": 1\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Idempotency-Key", "Idempotency-Key")
	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.example.com/risk/limits")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = 'Idempotency-Key'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"accountId\": 1\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.example.com/risk/limits")
  .header("Idempotency-Key", "Idempotency-Key")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"accountId\": 1\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.example.com/risk/limits', [
  'body' => '{
  "accountId": 1
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'Idempotency-Key' => 'Idempotency-Key',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.example.com/risk/limits");
var request = new RestRequest(Method.POST);
request.AddHeader("Idempotency-Key", "Idempotency-Key");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"accountId\": 1\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Idempotency-Key": "Idempotency-Key",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["accountId": 1] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.example.com/risk/limits")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```