Create mutual fund operation
Sends a new FCI (mutual fund) operation, either a subscription or a redemption, for a given account.
POST
/v1/broker/funds/sendRequest
Headers
| Field | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Access token in Bearer ACCESS_TOKEN format |
Content-Type | string | Yes | Must be application/json |
Not applicable: Path Parameters, Query Parameters.
Body
Redemption vs. subscription
fund_operation accepts SUBSCRIBE to buy shares of the fund, or RETRIEVE to redeem/withdraw an existing position.
| Field | Type | Required | Description |
|---|---|---|---|
fund_operation | string | Yes | Operation type. Possible values: SUBSCRIBE (subscribe to the fund), RETRIEVE (redeem/withdraw from the fund). |
bloomberg_code | string | Yes | Bloomberg identifier of the mutual fund to operate. |
account_number | integer | Yes | Account number the operation is executed for. |
amount | number | Yes | Amount to operate, in the fund's currency. |
is_total | boolean | Yes | Whether the operation should apply to the full position (e.g., a total redemption) instead of the specified amount. |
tag | object | No | Freeform key-value metadata to associate with the operation. |
Response
2XX Success
| Field | Type | Description |
|---|---|---|
mutual_fund_id | integer | Identifier of the created mutual fund operation. |
Error Codes
| Status | Description |
|---|---|
400 | Bad Request — invalid or missing parameters, or the account is not allowed to operate |
401 | Unauthorized — invalid or missing access token |
403 | Forbidden — the token does not have permission to access this resource |
500 | Internal Server Error |
Error structure:
{
"code": "BAD_REQUEST",
"description": "The account number 4567890123 is not allowed to Operate."
}
Code Example
- cURL
- JavaScript
- Python
- Node.js
curl -X POST https://b2b.allaria.dev/v1/broker/funds/send \
-H "Authorization: Bearer ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"fund_operation": "SUBSCRIBE",
"bloomberg_code": "ALRRFIJA AR",
"account_number": 4567890123,
"amount": 10000.00,
"is_total": false
}'
const response = await fetch('https://b2b.allaria.dev/v1/broker/funds/send', {
method: 'POST',
headers: {
'Authorization': 'Bearer ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
fund_operation: 'SUBSCRIBE',
bloomberg_code: 'ALRRFIJA AR',
account_number: 4567890123,
amount: 10000.00,
is_total: false
})
});
const data = await response.json();
console.log(data);
import requests
response = requests.post(
'https://b2b.allaria.dev/v1/broker/funds/send',
headers={
'Authorization': 'Bearer ACCESS_TOKEN',
'Content-Type': 'application/json'
},
json={
'fund_operation': 'SUBSCRIBE',
'bloomberg_code': 'ALRRFIJA AR',
'account_number': 4567890123,
'amount': 10000.00,
'is_total': False
}
)
data = response.json()
print(data)
const axios = require('axios');
const response = await axios.post(
'https://b2b.allaria.dev/v1/broker/funds/send',
{
fund_operation: 'SUBSCRIBE',
bloomberg_code: 'ALRRFIJA AR',
account_number: 4567890123,
amount: 10000.00,
is_total: false
},
{
headers: {
Authorization: 'Bearer ACCESS_TOKEN',
'Content-Type': 'application/json'
}
}
);
console.log(response.data);
2XX Success
{
"mutual_fund_id": 1024
}