Simulate a trade against the open period
curl --request POST \
--url https://api.finsync.ar/api/mesas/{id}/simulate \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"side": "sell",
"localAmount": 500,
"fx": 1250
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({side: 'sell', localAmount: 500, fx: 1250})
};
fetch('https://api.finsync.ar/api/mesas/{id}/simulate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({side: 'sell', localAmount: 500, fx: 1250})
};
fetch('https://api.finsync.ar/api/mesas/{id}/simulate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.finsync.ar/api/mesas/{id}/simulate"
payload = {
"side": "sell",
"localAmount": 500,
"fx": 1250
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"mesa": {
"id": 1,
"company_id": 42,
"name": "ARS/USD desk",
"local_currency": "ARS",
"quote_currency": "USD",
"costing_method": "fifo",
"account_ids": [
10,
11
],
"created_by": null,
"created_at": "2026-03-01T00:00:00.000Z",
"updated_at": "2026-03-01T00:00:00.000Z",
"deleted_at": null
},
"period": {
"id": 5,
"mesa_id": 1,
"status": "open",
"opened_at": "2026-03-01T00:00:00.000Z",
"closed_at": null,
"opening_local": 1000000,
"opening_fx": 1200,
"closing_local": null,
"closing_avg_fx": null,
"pnl_local": null,
"pnl_quote": null,
"closing_report": null,
"opened_by": null,
"closed_by": null,
"created_at": "2026-03-01T00:00:00.000Z",
"updated_at": "2026-03-01T00:00:00.000Z"
},
"simulation": {
"input": {
"side": "sell",
"localAmount": 500,
"fx": 1250,
"quoteAmount": 0.4
},
"pnlLocal": 0,
"pnlQuote": 0
}
}{
"error": "Mesas module not enabled for this company",
"code": "MESAS_DISABLED"
}Mesas
Simulate a trade against the open period
Body uses camelCase: side, localAmount, fx (same as the dashboard simulator).
POST
/
api
/
mesas
/
{id}
/
simulate
Simulate a trade against the open period
curl --request POST \
--url https://api.finsync.ar/api/mesas/{id}/simulate \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"side": "sell",
"localAmount": 500,
"fx": 1250
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({side: 'sell', localAmount: 500, fx: 1250})
};
fetch('https://api.finsync.ar/api/mesas/{id}/simulate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({side: 'sell', localAmount: 500, fx: 1250})
};
fetch('https://api.finsync.ar/api/mesas/{id}/simulate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.finsync.ar/api/mesas/{id}/simulate"
payload = {
"side": "sell",
"localAmount": 500,
"fx": 1250
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"mesa": {
"id": 1,
"company_id": 42,
"name": "ARS/USD desk",
"local_currency": "ARS",
"quote_currency": "USD",
"costing_method": "fifo",
"account_ids": [
10,
11
],
"created_by": null,
"created_at": "2026-03-01T00:00:00.000Z",
"updated_at": "2026-03-01T00:00:00.000Z",
"deleted_at": null
},
"period": {
"id": 5,
"mesa_id": 1,
"status": "open",
"opened_at": "2026-03-01T00:00:00.000Z",
"closed_at": null,
"opening_local": 1000000,
"opening_fx": 1200,
"closing_local": null,
"closing_avg_fx": null,
"pnl_local": null,
"pnl_quote": null,
"closing_report": null,
"opened_by": null,
"closed_by": null,
"created_at": "2026-03-01T00:00:00.000Z",
"updated_at": "2026-03-01T00:00:00.000Z"
},
"simulation": {
"input": {
"side": "sell",
"localAmount": 500,
"fx": 1250,
"quoteAmount": 0.4
},
"pnlLocal": 0,
"pnlQuote": 0
}
}{
"error": "Mesas module not enabled for this company",
"code": "MESAS_DISABLED"
}Authorizations
API Key for authentication
Path Parameters
Mesa ID
Body
application/json
Response
Simulation against the open period
The response is of type object.