Update Fee by ID
Replaces the rates of one existing fee row, addressed by the row's own ID. The row keeps the scope it was written at (setup, node, node + network, network or default) whatever the body contains: an edit can never move a fee to another node, network or setup. To write at another scope, use the scope-addressed endpoints, which create the row there. See Fees Overview.
Who may edit depends on the row:
- a node row (
entity3): the row's node must be inside your API key's node subtree; - a platform-owner row (
entity2): the platform owner node's API key only; - an owner row (
entity1): nobody, owner fees are read-only over this API.
The row is saved and returned at once. The on-chain push is asynchronous and follows the stored scope:
- a setup row is pushed straight to that setup when the setup is deployed and the rates or categories changed: one node transaction of type
10on the setup's node; - any broader row is fanned out to every deployed setup that inherits it (node transactions of types
10,11for node rows,12,13for platform-owner rows), except the platform owner's default, which is not pushed to deployed setups.
Poll Get Node Transactions for the result.
Required permission: fee:upsert
Request
PUT /v2/admin/fees/{fee_id}
Parameters
| Name | Type | In | Description |
|---|---|---|---|
fee_id | string | path | Required. Fee row ID |
Headers
| Name | Description |
|---|---|
Authorization | Required. Bearer <access_token> |
Content-Type | Required. application/json |
Body
| Field | Type | Required | Description |
|---|---|---|---|
value | object | Yes | The nine rates. All nine leaves are required: tokenization.asset_tokenization, tokenization.tokenized_asset_sales, tokenization.management, secondary_market.buy_order, secondary_market.sell_order, secondary_market.otc_sale, lending.borrower, lending.lending, lending.liquidation |
value.<group>.<leaf>.value | string | Yes | Rate in percent, "0" to "100", at most one decimal (for example "2.5"). See Amounts and Percentages |
categories | array or null | No | Per-asset-category overrides. Replaces the row's overrides. An override on a parent category is applied to its leaf categories |
categories[].id | string | Yes | Category ID (24-character hex) |
categories[].value | object | Yes | Rates for this category, same shape as value |
entity, node_id, network_id, setup_id or platform_owner_id in the body are ignored.
Example
curl --request PUT \
--url '{{baseUrl}}/v2/admin/fees/680be1f55d63bcee848d38e7' \
--header 'Authorization: Bearer <access_token>' \
--header 'Content-Type: application/json' \
--data '{
"value": {
"tokenization": {
"asset_tokenization": { "value": "5" },
"tokenized_asset_sales": { "value": "6" },
"management": { "value": "7" }
},
"secondary_market": {
"buy_order": { "value": "8" },
"sell_order": { "value": "9" },
"otc_sale": { "value": "10" }
},
"lending": {
"borrower": { "value": "11" },
"lending": { "value": "12" },
"liquidation": { "value": "13" }
}
},
"categories": null
}'
Response
{
"id": "680be1f55d63bcee848d38e7",
"entity": 3,
"node_id": "6a4bef2b1e781b11c22e9707",
"network_id": "6a4bf0a21e781b11c22e9712",
"value": {
"tokenization": {
"asset_tokenization": { "id": 0, "value": "5" },
"tokenized_asset_sales": { "id": 0, "value": "6" },
"management": { "id": 0, "value": "7" }
},
"secondary_market": {
"buy_order": { "id": 0, "value": "8" },
"sell_order": { "id": 0, "value": "9" },
"otc_sale": { "id": 0, "value": "10" }
},
"lending": {
"borrower": { "id": 0, "value": "11" },
"lending": { "id": 0, "value": "12" },
"liquidation": { "id": 0, "value": "13" }
}
},
"categories": null
}
Response Fields
The saved fee row, in the same shape as Get Fee by ID: id, entity, the scope fields the row carries (node_id, setup_id, network_id, platform_owner_id), value and categories.
Errors
| Status | Code | Description |
|---|---|---|
| 400 | 10015 | Validation failed — see details. A malformed rate is reported here too |
| 400 | 10016 | fee_id is not a 24-character hex ID |
| 400 | 10001 (domain 9) | Fee not found |
| 400 | 10002 (domain 9) | value does not contain all nine rates |
| 400 | 10001 (domain 4) | A categories[].id does not exist |
| 400 | 10001 (domain 2) | The row's node (or, for a setup row, its setup) was not found |
| 403 | 10003 (domain 9) | A platform-owner or owner row was edited by a key that is not the platform owner node's |
| 403 | 10004 (domain 9) | The row is an owner fee, which is read-only over this API |
| 403 | 10005 (domain 2) | The row's node is outside your API key's node subtree |
| 500 | 10000 | Unexpected server error |
See Errors for the error format and common codes.