Discounting API

APIs that allow Platforms to create target discount schedules.

Create a discounted fee rate for an account

Create a discounted fee rate for an account

POSThttps://api.alluvial.finance/v0/platform/accounts/{idOrKey}/discount_rate
Path parameters
idOrKey*string

Account ID or Key of the account to add discounted fee rate to

Body

Discounted fee rate to create

target_fee_ratenumber
Example: 0.05
Response

OK

Body
account_idstring
Example: "36cc991e-d4r5-422c-8248-ac356e800fc1"
created_atstring
Example: "2023-12-31T23:59:59Z"
removed_atstring
Example: "2023-12-31T23:59:59Z"
target_fee_ratenumber
Example: 0.05
Request
const response = await fetch('https://api.alluvial.finance/v0/platform/accounts/{idOrKey}/discount_rate', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "account_id": "36cc991e-d4r5-422c-8248-ac356e800fc1",
  "created_at": "2023-12-31T23:59:59Z",
  "removed_at": "2023-12-31T23:59:59Z",
  "target_fee_rate": 0.05
}

Get the discounted fee rate for an account

Get the discounted fee rate for an account

GEThttps://api.alluvial.finance/v0/platform/accounts/{idOrKey}/discount_rate
Path parameters
idOrKey*string

Account ID or Key of the account to get discount rate for

Response

OK

Body
account_idstring
Example: "36cc991e-d4r5-422c-8248-ac356e800fc1"
created_atstring
Example: "2023-12-31T23:59:59Z"
removed_atstring
Example: "2023-12-31T23:59:59Z"
target_fee_ratenumber
Example: 0.05
Request
const response = await fetch('https://api.alluvial.finance/v0/platform/accounts/{idOrKey}/discount_rate', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "account_id": "36cc991e-d4r5-422c-8248-ac356e800fc1",
  "created_at": "2023-12-31T23:59:59Z",
  "removed_at": "2023-12-31T23:59:59Z",
  "target_fee_rate": 0.05
}

Update a discounted fee rate for an account

Update a discounted fee rate for an account. If the discount rate already exists, it will be updated. A TargetFeeRate of 0.1 means no discount.

PATCHhttps://api.alluvial.finance/v0/platform/accounts/{idOrKey}/discount_rate
Path parameters
idOrKey*string

Account ID or Key of the account to update discounted fee rate for

Body

Discount fee rate to create

target_fee_ratenumber
Example: 0.05
Response

OK

Body
account_idstring
Example: "36cc991e-d4r5-422c-8248-ac356e800fc1"
created_atstring
Example: "2023-12-31T23:59:59Z"
removed_atstring
Example: "2023-12-31T23:59:59Z"
target_fee_ratenumber
Example: 0.05
Request
const response = await fetch('https://api.alluvial.finance/v0/platform/accounts/{idOrKey}/discount_rate', {
    method: 'PATCH',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "account_id": "36cc991e-d4r5-422c-8248-ac356e800fc1",
  "created_at": "2023-12-31T23:59:59Z",
  "removed_at": "2023-12-31T23:59:59Z",
  "target_fee_rate": 0.05
}

Last updated