Orders
Orders buy or sell market instruments (stocks, bonds, letras, CEDEARs). Preview an order to show fees and totals, create it, then track completion asynchronously.
Recommended flow:
- Preview the order to show the user fees and the estimated total.
- Create the order.
- Track completion via
GET /broker/v1/api/order/{orderAnyId}or theorder-status-updatewebhook.
Create an order
curl -X POST https://sandbox.manteca.dev/broker/v1/api/order \
-H "md-api-key: $MD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"userAnyId": "64ec95a93adb2d241db28a78",
"side": "BUY",
"type": "LIMIT",
"settlement": "DAY",
"asset": "AL30",
"against": "ARS",
"assetAmount": "10",
"price": "24322",
"externalId": "693cacbe-da94-4adc-af41-056028f988ae"
}'{
"id": "65bbe29cfbe4be99d4be0378",
"userId": "65bab11c23331f98515d2e50",
"status": "PENDING",
"side": "BUY",
"type": "LIMIT",
"settlement": "DAY",
"asset": "AL30",
"against": "ARS",
"amount": 10,
"filledAmount": 0,
"price": 24322,
"fee": 0.0026,
"finalClaimInfo": { "asset": "ARS", "total": 2438.53, "base": 2432.2, "totalFees": 6.33 },
"finalCreditInfo": { "asset": "AL30", "total": 0, "base": 0, "totalFees": 0 },
"externalId": "693cacbe-da94-4adc-af41-056028f988ae",
"creationTime": "2024-02-01T15:27:40.211-03:00"
}Order fields
| Field | Type | Notes |
|---|---|---|
userAnyId | string | Required. User identifier: the Manteca internal user id, the user's numberId, or the externalId you assigned. |
side | enum | Required. BUY or SELL. |
type | enum | Required. MARKET or LIMIT. |
settlement | enum | Required. INSTANT or DAY. |
asset | string | Required. Instrument ticker (for example AL30). |
against | enum | Required. ARS or USD. |
assetAmount | string | Whole units of the instrument. Send exactly one of assetAmount or againstAmount. |
againstAmount | string | Amount of currency. Send exactly one of assetAmount or againstAmount. |
price | string | Required for LIMIT. Expressed per 100 units. |
externalId | string | Optional. Your reference, used for idempotency. |
Idempotency. Set
externalIdto a UUID from your side to avoid duplicate orders on retries.
Order statuses
| Status | Description |
|---|---|
PENDING_EXECUTION | FCI subscriptions and redemptions: accepted and scheduled for the fund's executionTime. |
PENDING | Created but not yet sent to market. |
SENT | Sent to market; awaiting result. |
COMPLETED | Executed successfully. |
FAILED | Sent but could not complete. |
CANCELLED | Cancelled before completing. |
Typical lifecycle: PENDING → SENT → COMPLETED | FAILED | CANCELLED. FCI orders go PENDING_EXECUTION → COMPLETED. Partially executed orders have filledAmount < amount.
Order creation error codes
internalStatus | HTTP | Description |
|---|---|---|
MIN_ASSET_AMOUNT | 400 | Below the minimum instrument amount. |
ORDER_MARKET_PRICE_OVERRIDE | 400 | Price override not allowed for market order. |
MISSING_PRICE | 400 | price required for a limit order. |
BANK_HOLIDAY | 400 | Market closed (bank holiday). |
INVALID_ASSET | 400 | Instrument not supported. |
DUPLICATE_REQUEST | 400 | The same request is still being processed. |
PRICE_OUT_OF_BOUNDS | 400 | Price outside allowed bounds. |
INVALID_PRICE_STEP_SIZE | 400 | Price does not respect the step size. |
MIN_AMOUNT / MAX_AMOUNT | 400 | Amount outside allowed range. |
TICK_SIZE | 400 | Amount does not respect the tick size. |
NO_FUNDS | 400 | Insufficient funds. |
PERSON_DEPOSIT_LIMIT | 403 | Person operational limit reached. |
NO_USD_ACCOUNT / NO_ARS_ACCOUNT | 403 | Missing required currency account. |
UNFINISHED_PARKING | 403 | A prior parking operation is unfinished. |
COMPANY_RESERVES | 409 | Company reserves insufficient. |
ORDER_EXISTS | 409 | An order with this externalId already exists. |
Endpoint references
| Action | Endpoint |
|---|---|
| Preview order | POST /broker/v1/api/info/order/preview |
| Create order | POST /broker/v1/api/order |
| List orders | GET /broker/v1/api/order |
| Get order by ID | GET /broker/v1/api/order/{orderAnyId} |
| Cancel order | DELETE /broker/v1/api/order/{orderAnyId} |
For retry policy and idempotency, see Errors and controls.
Updated 27 days ago
Did this page help you?