Skip to main content

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 (entity 3): the row's node must be inside your API key's node subtree;
  • a platform-owner row (entity 2): the platform owner node's API key only;
  • an owner row (entity 1): 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 10 on the setup's node;
  • any broader row is fanned out to every deployed setup that inherits it (node transactions of types 10, 11 for node rows, 12, 13 for 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​

NameTypeInDescription
fee_idstringpathRequired. Fee row ID

Headers​

NameDescription
AuthorizationRequired. Bearer <access_token>
Content-TypeRequired. application/json

Body​

FieldTypeRequiredDescription
valueobjectYesThe 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>.valuestringYesRate in percent, "0" to "100", at most one decimal (for example "2.5"). See Amounts and Percentages
categoriesarray or nullNoPer-asset-category overrides. Replaces the row's overrides. An override on a parent category is applied to its leaf categories
categories[].idstringYesCategory ID (24-character hex)
categories[].valueobjectYesRates 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​

StatusCodeDescription
40010015Validation failed — see details. A malformed rate is reported here too
40010016fee_id is not a 24-character hex ID
40010001 (domain 9)Fee not found
40010002 (domain 9)value does not contain all nine rates
40010001 (domain 4)A categories[].id does not exist
40010001 (domain 2)The row's node (or, for a setup row, its setup) was not found
40310003 (domain 9)A platform-owner or owner row was edited by a key that is not the platform owner node's
40310004 (domain 9)The row is an owner fee, which is read-only over this API
40310005 (domain 2)The row's node is outside your API key's node subtree
50010000Unexpected server error

See Errors for the error format and common codes.