> 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.

# List venue key specs

GET /venue-key-specs

Lists the key spec of every venue the platform takes a key for — its legs as a JSON Schema with form hints, the roles its connectors fill, what to grant — each marked `enabled` when this deployment serves it, beside the egress addresses to allowlist. Served to every admitted member as one document, never a page. The venues as reference data are the data API's `GET /venues`, under the same ids.

Reference: https://docs.immix.xyz/trading/api-reference/rest-api/venue-keys/list-specs

## 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

- `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.

## Response

### 200

The deployment's venue key specs: its egress addresses, and every venue the platform takes a key for, with the ones it serves marked `enabled`. The position it was served at rides the two position headers, as on every read; the document does not move with it.

- `egressAddresses` (list of string, required) — The addresses this deployment's connectors reach venues from — IP addresses, or CIDR blocks — the ones to allowlist on a key at the venue; the key check judges a pasted key's allowlist against the same list. Empty while the deployment has no fixed egress address: nothing can be allowlisted yet, and the check reads `UNKNOWN`.
- `venues` (list of VenueKeySpec, required) — Every venue the platform takes a key for, in the platform's order — the enabled ones and the rest alike, so a client can name a venue it cannot yet offer.

## Errors

### 400 List Specs Venue Keys Request Bad Request Error

The request's shape is wrong: a non-positive id, an unknown `view` or filter value, a query string that does not decode, a query parameter the operation does not take, or a cursor that does not decode or came from another query (`INVALID_CURSOR`). No position rides a refusal that consulted no state.

- `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 List Specs Venue Keys 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 List Specs Venue Keys 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.

### 503 List Specs Venue Keys Request Service Unavailable Error

This member is still catching up (`NOT_PRIMED`; retry shortly), or had not folded through the `minGlobalSequence` you sent by the deadline (`PROJECTION_BEHIND`; retry after `Retry-After`).

- `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

### VenueKeySpec

One venue's key spec: the venue's identity, whether this deployment serves it, the roles its connectors fill and whether a key is checked before approval, its key's legs as a JSON Schema with form hints, and what to grant at the venue.

- `exchangeId` (integer, required) — The venue's id — the `exchangeId` a credential body names, and the data gateway's venue id: one id space across the two APIs.
- `exchangeName` (string, required) — The venue's name as reference data spells it (`okx`, `binance_spot`).
- `providerKind` (enum, required) — What the venue is, and so what a credential body for it states as `providerKind`: `EXCHANGE`, or `CUSTODIAN` for a custodian (`anchorage`), which takes a balances key and never a trading one. A body whose `providerKind` is not its venue's is 422 `VENUE_UNSUPPORTED`.
  - Allowed values: `EXCHANGE`, `CUSTODIAN`
- `brand` (string, required) — The brand slug the venue's markets share (`binance` for `binance_spot` and `binance_usd-m`): what a client keys icons and colours by, never parsed out of the name.
- `displayName` (string, required) — The name a client shows (`Binance Spot`), as reference data spells it.
- `enabled` (boolean, required) — Whether this deployment serves the venue — its connectors run here. A venue not enabled is still described, so a client can name it, but a key for it would idle: offer the enabled venues.
- `roles` (VenueKeyRoles, required) — The roles the venue's connectors fill: `balances` (an account connector reads balances and checks keys), `trading` (an order-entry connector places orders). A key's `canReadBalances` needs the balances role, `canTrade` the trading role. Transfers join here once a venue's connector executes them.
- `probes` (boolean, required) — Whether a pasted key is checked at the venue before approval — its permissions and IP allowlist read back onto the pending credential (`observedPermissions`, `observedAllowlist`, `probeOutcome`). True exactly when the venue has an account connector.
- `materialSchema` (string, required) — The name of the venue's material schema in this document — the `CredentialMaterial` variant a credential body for the venue carries (`OkxCredentialMaterial`).
- `keyIdLeg` (string, required, nullable) — The leg that is the venue's public key id, served back on the credential as `venueKeyId`; `null` when no leg is — the key has no public half (a custodian's bearer access key), every leg is a secret and the credential's `venueKeyId` is empty.
- `material` (map from string to any, required) — The key's legs as a JSON Schema document: the same closed object schema `materialSchema` names — every leg required, `minLength` 1 and a `pattern` requiring one non-space character (non-blank), `writeOnly`, its `format` where one is checked (`pkcs8-ed25519`) — with form hints under `x-immix-ui`: on each leg its `label`, whether it is `secret` (masked) and `multiline` (a PEM block), the `patternMessage` to show when the pattern fails; on the object the `order` to ask the legs in. The schema is the whole validation contract; a refusal names the leg (`material.<leg>`).
- `guidance` (VenueKeyGuidance, required) — What to do at the venue, in its own words: the permissions to grant a key for each role, and where the venue documents its keys.

### 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.

### VenueKeyRoles

The roles the venue's connectors fill: `balances` (an account connector reads balances and checks keys), `trading` (an order-entry connector places orders). A key's `canReadBalances` needs the balances role, `canTrade` the trading role. Transfers join here once a venue's connector executes them.

- `balances` (boolean, required) — Whether an account connector serves the venue: balances read, keys checked before approval.
- `trading` (boolean, required) — Whether an order-entry connector serves the venue: a `canTrade` key places orders.

### VenueKeyGuidance

What to do at the venue, in its own words: the permissions to grant a key for each role, and where the venue documents its keys.

- `balancesPermissions` (string, required) — The permissions a balances-only key needs (`Read`).
- `tradingPermissions` (string, required) — The permissions a trading key needs — read and trade, never withdraw.
- `docsUrl` (string, required) — The venue's own page on creating and scoping API keys.

## Examples

**Response**

```json
{
  "egressAddresses": [
    "203.0.113.17",
    "203.0.113.18"
  ],
  "venues": [
    {
      "exchangeId": 300,
      "exchangeName": "okx",
      "providerKind": "EXCHANGE",
      "brand": "okx",
      "displayName": "OKX",
      "enabled": true,
      "roles": {
        "balances": true,
        "trading": true
      },
      "probes": true,
      "materialSchema": "OkxCredentialMaterial",
      "keyIdLeg": "key",
      "material": {
        "additionalProperties": false,
        "description": "An OKX API key's three legs.",
        "properties": {
          "key": {
            "description": "The API key id — the venue's public leg; becomes the row's `venueKeyId`.",
            "minLength": 1,
            "pattern": "^\\s*\\S[\\s\\S]*$",
            "type": "string",
            "writeOnly": true,
            "x-immix-ui": {
              "label": "API key",
              "multiline": false,
              "patternMessage": "must not be blank",
              "secret": false
            }
          },
          "passphrase": {
            "description": "The passphrase chosen when the key was created.",
            "minLength": 1,
            "pattern": "^\\s*\\S[\\s\\S]*$",
            "type": "string",
            "writeOnly": true,
            "x-immix-ui": {
              "label": "Passphrase",
              "multiline": false,
              "patternMessage": "must not be blank",
              "secret": true
            }
          },
          "secret": {
            "description": "The signing secret.",
            "minLength": 1,
            "pattern": "^\\s*\\S[\\s\\S]*$",
            "type": "string",
            "writeOnly": true,
            "x-immix-ui": {
              "label": "Secret key",
              "multiline": false,
              "patternMessage": "must not be blank",
              "secret": true
            }
          }
        },
        "required": [
          "key",
          "secret",
          "passphrase"
        ],
        "title": "OKX (exchangeId 300)",
        "type": "object",
        "x-immix-ui": {
          "order": [
            "key",
            "secret",
            "passphrase"
          ]
        }
      },
      "guidance": {
        "balancesPermissions": "Read",
        "tradingPermissions": "Read and Trade — never Withdraw",
        "docsUrl": "https://www.okx.com/help/how-do-i-set-up-an-api-key"
      }
    },
    {
      "exchangeId": 100,
      "exchangeName": "binance_spot",
      "providerKind": "EXCHANGE",
      "brand": "binance",
      "displayName": "Binance Spot",
      "enabled": false,
      "roles": {
        "balances": true,
        "trading": true
      },
      "probes": true,
      "materialSchema": "BinanceSpotCredentialMaterial",
      "keyIdLeg": "key",
      "material": {
        "additionalProperties": false,
        "description": "A Binance Ed25519 API key's two legs. One key trades the account's spot and USD-M futures markets. Binance's order-entry session signs in only with an Ed25519 key, so the intake reads `privateKey` as one and refuses any other key type — an HMAC secret, an RSA key — with 400 `MALFORMED_REQUEST`.",
        "properties": {
          "key": {
            "description": "The API key Binance issued for the registered public key — the venue's public leg; becomes the row's `venueKeyId`.",
            "minLength": 1,
            "pattern": "^\\s*\\S[\\s\\S]*$",
            "type": "string",
            "writeOnly": true,
            "x-immix-ui": {
              "label": "API key",
              "multiline": false,
              "patternMessage": "must not be blank",
              "secret": false
            }
          },
          "privateKey": {
            "description": "The Ed25519 private key the API key was registered for, in PKCS 8 form — PEM, or the base64 body without its header lines.",
            "format": "pkcs8-ed25519",
            "minLength": 1,
            "pattern": "^\\s*\\S[\\s\\S]*$",
            "type": "string",
            "writeOnly": true,
            "x-immix-ui": {
              "label": "Ed25519 private key",
              "multiline": true,
              "patternMessage": "must not be blank",
              "secret": true
            }
          }
        },
        "required": [
          "key",
          "privateKey"
        ],
        "title": "Binance Spot (exchangeId 100)",
        "type": "object",
        "x-immix-ui": {
          "order": [
            "key",
            "privateKey"
          ]
        }
      },
      "guidance": {
        "balancesPermissions": "Enable Reading",
        "tradingPermissions": "Enable Reading, Enable Spot & Margin Trading and Enable Futures — never Enable Withdrawals",
        "docsUrl": "https://www.binance.com/en/support/faq/how-to-create-api-keys-on-binance-360002502072"
      }
    },
    {
      "exchangeId": 166,
      "exchangeName": "bybit",
      "providerKind": "EXCHANGE",
      "brand": "bybit",
      "displayName": "Bybit",
      "enabled": false,
      "roles": {
        "balances": true,
        "trading": true
      },
      "probes": true,
      "materialSchema": "BybitCredentialMaterial",
      "keyIdLeg": "key",
      "material": {
        "additionalProperties": false,
        "description": "A Bybit HMAC API key's two legs (the system-generated type; RSA keys are not accepted). A Unified Trading Account's key serves spot and USDT linear through the one `bybit-oe` connector. A key without an IP allowlist expires 90 days after creation: the connector reads its expiry at each session's readiness probe and raises an operator ticket 14 days ahead; rotate it. A key bound to the platform's egress IP (ask the operator for it) escapes that expiry, though a password change can still set one; bound to any other address, every call is refused (`10010`).",
        "properties": {
          "key": {
            "description": "The API key id — the venue's public leg; becomes the row's `venueKeyId`.",
            "minLength": 1,
            "pattern": "^\\s*\\S[\\s\\S]*$",
            "type": "string",
            "writeOnly": true,
            "x-immix-ui": {
              "label": "API key",
              "multiline": false,
              "patternMessage": "must not be blank",
              "secret": false
            }
          },
          "secret": {
            "description": "The HMAC signing secret.",
            "minLength": 1,
            "pattern": "^\\s*\\S[\\s\\S]*$",
            "type": "string",
            "writeOnly": true,
            "x-immix-ui": {
              "label": "API secret",
              "multiline": false,
              "patternMessage": "must not be blank",
              "secret": true
            }
          }
        },
        "required": [
          "key",
          "secret"
        ],
        "title": "Bybit (exchangeId 166)",
        "type": "object",
        "x-immix-ui": {
          "order": [
            "key",
            "secret"
          ]
        }
      },
      "guidance": {
        "balancesPermissions": "Read-Only",
        "tradingPermissions": "Read-Write with the Spot and Contract (Orders, Positions) trade grants — never Withdraw",
        "docsUrl": "https://bybit-exchange.github.io/docs/v5/guide"
      }
    },
    {
      "exchangeId": 700,
      "exchangeName": "anchorage",
      "providerKind": "CUSTODIAN",
      "brand": "anchorage",
      "displayName": "Anchorage Digital",
      "enabled": false,
      "roles": {
        "balances": true,
        "trading": false
      },
      "probes": true,
      "materialSchema": "AnchorageCredentialMaterial",
      "keyIdLeg": null,
      "material": {
        "additionalProperties": false,
        "description": "An Anchorage Digital API key's two legs: the access key the venue issued and the Ed25519 private key it signs with — both secrets, so the key has no public id and its row's `venueKeyId` is empty. A key belongs to a permission group that names one vault — the account — and the venue's own quorum approves the group where it asks to. The intake reads `signingKey` as an Ed25519 key and refuses any other key type with 400 `MALFORMED_REQUEST`.",
        "properties": {
          "accessKey": {
            "description": "The API access key the venue issued, sent on every request. A secret: it alone reads the vault, so it is never served back and is not the row's `venueKeyId`, which stays empty for this venue.",
            "minLength": 1,
            "pattern": "^\\s*\\S[\\s\\S]*$",
            "type": "string",
            "writeOnly": true,
            "x-immix-ui": {
              "label": "API access key",
              "multiline": false,
              "patternMessage": "must not be blank",
              "secret": true
            }
          },
          "signingKey": {
            "description": "The Ed25519 private key whose public half was registered in the venue's dashboard, in PKCS 8 form — PEM, or the base64 body without its header lines; it signs every transfer and withdrawal request.",
            "format": "pkcs8-ed25519",
            "minLength": 1,
            "pattern": "^\\s*\\S[\\s\\S]*$",
            "type": "string",
            "writeOnly": true,
            "x-immix-ui": {
              "label": "Ed25519 signing key",
              "multiline": true,
              "patternMessage": "must not be blank",
              "secret": true
            }
          }
        },
        "required": [
          "accessKey",
          "signingKey"
        ],
        "title": "Anchorage Digital (exchangeId 700)",
        "type": "object",
        "x-immix-ui": {
          "order": [
            "accessKey",
            "signingKey"
          ]
        }
      },
      "guidance": {
        "balancesPermissions": "READ on the vault's permission group",
        "tradingPermissions": "none — a custodian takes no trading key; a transfers key holds the vault's transfer-initiating permission, never READ alone",
        "docsUrl": "https://docs.anchorage.com/"
      }
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.example.com/venue-key-specs"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.example.com/venue-key-specs';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

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"
	"net/http"
	"io"
)

func main() {

	url := "https://api.example.com/venue-key-specs"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	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/venue-key-specs")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

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.get("https://api.example.com/venue-key-specs")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.example.com/venue-key-specs', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.example.com/venue-key-specs");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.example.com/venue-key-specs")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

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()
```