Skip to main content

List OTC Order Rules

Lists OTC order rules, ordered by priority (lowest first) and then newest first. This is the only rule listing: it replaced /otc-order-rules/nodes/{node_id} and /otc-order-rules/nodes/{node_id}/tokens/{token_id}.

  • With node_id only: every rule of the node, node-wide and token-specific alike.
  • With token_id as well: the rules limited to that token.

The node must be inside your API key's node subtree; with token_id, so must the token's node. How rules are applied to incoming offers is described on Create OTC Order Rule.

Required permission: otc:view

Request​

GET /v2/admin/otc-order-rules?node_id={node_id}&page={page}&per_page={per_page}

Parameters​

NameTypeInDescription
node_idstringqueryRequired. Node whose rules are listed (24-character hex)
token_idstringqueryOnly rules limited to this token (24-character hex)
pageintegerqueryRequired. Page number, starting at 1
per_pageintegerqueryRequired. Items per page, 1–100

Headers​

NameDescription
AuthorizationRequired. Bearer <access_token>

Example​

curl --request GET \
--url '{{baseUrl}}/v2/admin/otc-order-rules?node_id=6901350deb7ed8c1c38de4e9&page=1&per_page=20' \
--header 'Authorization: Bearer <access_token>'

Response​

{
"data": [
{
"id": "6910a6ab5f635dd4dc251581",
"node_id": "6901350deb7ed8c1c38de4e9",
"token_id": "6904f0899d5be71059bf7845",
"side": 1,
"rule_type": 2,
"match_action": 1,
"above_percent": "2.5",
"below_percent": "1",
"min_offer_quantity": 2,
"max_offer_quantity": 111,
"consume_on_match": true,
"priority": 3,
"status": 2,
"valid_from": "2025-11-12T01:04:12Z",
"valid_until": "2025-11-19T01:04:24Z",
"name": "First Rule",
"created_by": "000000000000000000000000",
"created_at": "2025-11-09T14:35:23.19Z",
"updated_at": "2025-11-09T19:32:15.618Z",
"is_api": true
}
],
"total": 1,
"page": 1,
"per_page": 20
}

Response Fields​

FieldTypeDescription
dataarrayRules on this page
data[].idstringRule ID
data[].node_idstringNode the rule governs
data[].token_idstring or nullToken the rule is limited to. null for a node-wide rule
data[].sideinteger1 both, 2 buy, 3 sell
data[].rule_typeinteger1 unconditional, 2 percent, 3 absolute
data[].match_actioninteger1 accept, 2 reject
data[].above_percentstringPercent rule: highest accepted price, as a percentage above the token's price. Omitted when unset
data[].below_percentstringPercent rule: lowest accepted price, as a percentage below the token's price. Omitted when unset
data[].above_amountstringAbsolute rule: highest accepted price, as an amount above the token's price. Omitted when unset
data[].below_amountstringAbsolute rule: lowest accepted price, as an amount below the token's price. Omitted when unset
data[].min_offer_quantityintegerSmallest matching offer quantity. Omitted when unset
data[].max_offer_quantityintegerLargest matching offer quantity. Omitted when unset
data[].consume_on_matchbooleanStored with the rule; not used when offers are evaluated at present
data[].priorityintegerLower values are tried first
data[].statusinteger1 inactive, 2 active
data[].valid_fromstringStart of the validity window. Omitted when unset
data[].valid_untilstringEnd of the validity window. Omitted when unset
data[].namestringRule name
data[].created_bystringSupervisor who created the rule. 000000000000000000000000 for a rule created through this API
data[].created_atstringCreation time
data[].updated_atstringLast update time
data[].is_apibooleantrue when the rule was created through this API
totalintegerNumber of matching rules
pageintegerCurrent page
per_pageintegerItems per page

Errors​

StatusCodeDescription
40010015Validation failed — see details. Includes a malformed node_id or token_id
40010001 (domain 2)Node not found
40010001 (domain 5)Token not found
40310005 (domain 2)The node, or the token's node, is outside your API key's node subtree
50010000Unexpected server error

See Errors for the error format and common codes.