Open OTC Token
Controls whether a token is open to OTC (Over-The-Counter) trading, allowing or restricting OTC market trading. This call is asynchronous — the handler enqueues an OpenToOtc blockchain transaction and returns HTTP 200 immediately. The OTC permission only flips on-chain once the wallet pipeline confirms the transaction. Poll List Token Transactions to observe completion.
Request
POST /v2/admin/tokens/{token_id}/open-to-otc
Parameters
| Name | Type | In | Description |
|---|---|---|---|
token_id | string | path | Required. The ID of the token to update |
Headers
| Name | Description |
|---|---|
Authorization | Required. Bearer token for authentication |
Content-Type | Required. Must be application/json |
Request Body
| Name | Type | Description |
|---|---|---|
is_open | boolean | Required. Set to true to open the token to OTC market, false to restrict OTC market trading |
Example
curl --request POST \
--url '\{\{baseUrl\}\}/v2/admin/tokens/67d8774e903bfcbe7eb5d93e/open-to-otc' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' \
--header 'Content-Type: application/json' \
--header 'User-Agent: insomnia/10.3.1' \
--data '{
"is_open": true
}'
Response
{
"transaction_id": "6a8b5e13f9129816a6cc7a12"
}
Response Fields
| Field | Type | Description |
|---|---|---|
transaction_id | string | The token transaction started by this call. Poll it with Get Transaction By ID; the flag flips only when it reports status: 3 (Done) |
This call used to answer 200 with an empty object, which gave the caller nothing to follow the settlement with.
Status Codes
| Status Code | Description |
|---|---|
| 200 | Success - the change has been started |
| 400 | Bad Request - invalid request parameters or unknown token |
| 401 | Unauthorized - invalid or missing authentication token |
| 409 | Conflict - is_open_to_otc already holds the requested value (code 10027), or a change to it is already in flight (code 10028) |
| 500 | Internal Server Error |
Notes
- A
200means the transaction was started, not that OTC is open.is_open_to_otcflips when the transaction settles. - The two
409s are deliberately distinct.10027says the flag already reads what you asked for and nothing more will happen;10028says the change you asked for is happening and you should wait for it. The flag alone cannot tell them apart, because it only moves once the change settles.