Execute broker MEP operation
Executes a buy or sell USD-MEP operation for a specific account.
MEP and the
broker path segment"Dólar MEP" is the legal route to buy or sell US dollars in Argentina through the securities market: buy a bond in pesos, sell the same bond in dollars. Allaria runs both legs.
broker in the path is an internal service name, not something you configure — see the Glossary.
POST
/v1/broker/operations/mep/{account-id}/{side}Request
Headers
| Field | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Access token in Bearer ACCESS_TOKEN format |
Content-Type | string | Yes | Must be application/json |
Path Parameters
| Field | Type | Required | Description |
|---|---|---|---|
account-id | integer | Yes | Account number to execute the operation on. |
side | string | Yes | Operation side. Possible values: buy, sell (case-insensitive). |
Not applicable: Query Parameters.
Body
amount unit depends on sideThe amount field is denominated in different currencies depending on the operation side:
buy:amountis in ARS (Argentine pesos). The system converts to USD using the MEP rate.sell:amountis in USD.
| Field | Type | Required | Description |
|---|---|---|---|
amount | number | Yes | Operation amount. ARS when side is buy; USD when side is sell. |
estimated_price | number | Yes | Estimated MEP exchange rate (ARS per USD) at the moment the client confirms the operation. |
tag | object | No | Optional key-value map for custom metadata (e.g. { "reference": "op-001" }). |
Response
2XX Success
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier of the executed MEP operation. |
executed_at | string (ISO 8601 datetime) | Timestamp when the operation was executed. |
estimated_price | number | MEP rate used to execute the operation (ARS per USD). |
Error Codes
| Status | Description |
|---|---|
400 | Bad Request — invalid or missing parameters, or side is not buy/sell |
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": "invalid_request",
"description": "Invalid side: hold"
}
Code Example
- cURL
- JavaScript
- Python
- Node.js
curl -X POST https://b2b.allaria.dev/v1/broker/operations/mep/70104/buy \
-H "Authorization: Bearer ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"amount": 10000.00,
"estimated_price": 1245.50,
"tag": { "reference": "op-001" }
}'
const accountId = 70104;
const side = 'buy';
const response = await fetch(
`https://b2b.allaria.dev/v1/broker/operations/mep/${accountId}/${side}`,
{
method: 'POST',
headers: {
'Authorization': 'Bearer ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: 10000.00,
estimated_price: 1245.50,
tag: { reference: 'op-001' }
})
}
);
const data = await response.json();
console.log(data);
import requests
account_id = 70104
side = 'buy'
response = requests.post(
f'https://b2b.allaria.dev/v1/broker/operations/mep/{account_id}/{side}',
headers={
'Authorization': 'Bearer ACCESS_TOKEN',
'Content-Type': 'application/json'
},
json={
'amount': 10000.00,
'estimated_price': 1245.50,
'tag': { 'reference': 'op-001' }
}
)
data = response.json()
print(data)
const axios = require('axios');
const accountId = 70104;
const side = 'buy';
const response = await axios.post(
`https://b2b.allaria.dev/v1/broker/operations/mep/${accountId}/${side}`,
{
amount: 10000.00,
estimated_price: 1245.50,
tag: { reference: 'op-001' }
},
{
headers: {
Authorization: 'Bearer ACCESS_TOKEN',
'Content-Type': 'application/json'
}
}
);
console.log(response.data);
2XX Success
{
"id": "3f1c2b4a-5d6e-4f7a-8b9c-0d1e2f3a4b5c",
"executed_at": "2026-07-21T14:30:45.123456",
"estimated_price": 1245.50
}