Órdenes

Llamadas relacionadas a las órdenes.

Obtener órdenes

GET https://api-qa.tiendabroker.com/v1/retail/order

Devuelve todas las órdenes paginadas. Acepta filtros por query.

Query Parameters

Name
Type
Description

page

String

página

limit

String

líimite por página

status

String

estado de orden

from

String

fecha en formato ISO

to

String

fecha en formato ISO

userId

String

ID de un usuario

Headers

Name
Type
Description

tb-api-key*

String

API Key de la compañía

{
    "totalCount": 4,
    "pageCount": 1,
    "pageSize": 1,
    "page": 1,
    "lastPage": 4,
    "data": [
        {
            "id": "654e8e34ebecec56487a6df2",
            "userId": "654e853bebecec56487a6af0",
            "status": "COMPLETED",
            "side": "SELL",
            "type": "MARKET",
            "settlement": "INSTANT",
            "asset": "AL30",
            "against": "USD",
            "amount": 44,
            "filledAmount": 44,
            "price": 22.41,
            "priceUsd": 34,
            "fee": 0.0026,
            "feeInfo": {
                "platformFee": "0.0025",
                "marketRight": "0.0001",
                "usesIva": false,
                "totalFee": "0.0026000000"
            },
            "finalClaimInfo": {
                "asset": "AL30",
                "total": 44,
                "base": 44,
                "totalFees": 0,
                "platformFee": 0,
                "marketRight": 0,
                "iva": 0
            },
            "finalCreditInfo": {
                "asset": "USD",
                "total": 9.84,
                "base": 9.86,
                "totalFees": 0.02,
                "platformFee": 0.02,
                "marketRight": 0,
                "iva": 0
            },
            "history": [
                {
                    "timestamp": "2023-11-10T17:10:28.900-03:00",
                    "newStatus": "PENDING",
                    "stepAmount": 44,
                    "price": 22.41,
                    "claimedAmount": 44
                },
                {
                    "timestamp": "2023-11-10T17:10:29.092-03:00",
                    "newStatus": "SENT"
                },
                {
                    "timestamp": "2023-11-10T17:10:29.580-03:00",
                    "newStatus": "COMPLETED",
                    "stepAmount": 44,
                    "price": 22.41
                },
                {
                    "timestamp": "2023-11-10T17:10:30.195-03:00",
                    "creditedAmount": 9.84,
                    "refundedAmount": 0
                }
            ],
            "syntheticId": "654e8e2bebecec56487a6da6",
            "creationTime": "2023-11-10T17:10:28.901-03:00"
        }
    ]
}

Obtener una orden por ID

GET https://api-qa.tiendabroker.com/v1/retail/order/{orderId}

Devuelve una orden por ID.

Path Parameters

Name
Type
Description

orderId*

String

Id de una orden

Headers

Name
Type
Description

tb-api-key*

String

API Key de la compañía

{
    "id": "654e8e34ebecec56487a6df2",
    "userId": "654e853bebecec56487a6af0",
    "status": "COMPLETED",
    "side": "SELL",
    "type": "MARKET",
    "settlement": "INSTANT",
    "asset": "AL30",
    "against": "USD",
    "amount": 44,
    "filledAmount": 44,
    "price": 22.41,
    "priceUsd": 34,
    "fee": 0.0026,
    "feeInfo": {
        "platformFee": "0.0025",
        "marketRight": "0.0001",
        "usesIva": false,
        "totalFee": "0.0026000000"
    },
    "finalClaimInfo": {
        "asset": "AL30",
        "total": 44,
        "base": 44,
        "totalFees": 0,
        "platformFee": 0,
        "marketRight": 0,
        "iva": 0
    },
    "finalCreditInfo": {
        "asset": "USD",
        "total": 9.84,
        "base": 9.86,
        "totalFees": 0.02,
        "platformFee": 0.02,
        "marketRight": 0,
        "iva": 0
    },
    "history": [
        {
            "timestamp": "2023-11-10T17:10:28.900-03:00",
            "newStatus": "PENDING",
            "stepAmount": 44,
            "price": 22.41,
            "claimedAmount": 44
        },
        {
            "timestamp": "2023-11-10T17:10:29.092-03:00",
            "newStatus": "SENT"
        },
        {
            "timestamp": "2023-11-10T17:10:29.580-03:00",
            "newStatus": "COMPLETED",
            "stepAmount": 44,
            "price": 22.41
        },
        {
            "timestamp": "2023-11-10T17:10:30.195-03:00",
            "creditedAmount": 9.84,
            "refundedAmount": 0
        }
    ],
    "syntheticId": "654e8e2bebecec56487a6da6",
    "creationTime": "2023-11-10T17:10:28.901-03:00"
}

Crear una orden

POST https://api-qa.tiendabroker.com/v1/retail/order/

Crea una orden.

Headers

Name
Type
Description

tb-api-key*

String

API Key de la compañía

Request Body

Name
Type
Description

side*

String

BUY para compra

SELL para venta

type*

String

MARKET para orden de mercado

LIMIT para orden con límite

settlement*

String

momento de liquidación.

INSTANT: contado inmediato

ONE_DAY: un día habil

TWO_DAYS: dos días hábiles

asset*

String

Asset a operar

against*

String

ARS o USD, según lo que se quiera operar

amount*

Number

monto a operar en nominales de asset.

price

Number

En caso de utilizar "type: LIMIT", el precio a usar para la orden

userId*

String

ID del usuario al cual se le crea la orden

{
    "id": "655247fc3ea2c5b3d4146003",
    "userId": "654e853bebecec56487a6af0",
    "status": "PENDING",
    "side": "BUY",
    "type": "MARKET",
    "settlement": "INSTANT",
    "asset": "YPFD",
    "against": "ARS",
    "amount": 2,
    "filledAmount": 0,
    "price": 1874300,
    "priceUsd": 0,
    "fee": 0.005566,
    "feeInfo": {
        "platformFee": "0.0038",
        "marketRight": "0.0008",
        "usesIva": true,
        "totalFee": "0.0055660000"
    },
    "finalClaimInfo": {
        "asset": "ARS",
        "total": 37694.66,
        "base": 37486,
        "totalFees": 208.66,
        "platformFee": 142.45,
        "marketRight": 29.99,
        "iva": 36.22
    },
    "finalCreditInfo": {
        "asset": "YPFD",
        "total": 0,
        "base": 0,
        "totalFees": 0,
        "platformFee": 0,
        "marketRight": 0,
        "iva": 0
    },
    "history": [
        {
            "timestamp": "2023-11-13T12:59:56.903-03:00",
            "newStatus": "PENDING",
            "stepAmount": 2,
            "price": 1874300,
            "claimedAmount": 37694.66
        }
    ],
    "creationTime": "2023-11-13T12:59:56.907-03:00"
}

Cancelar una orden por ID

DELETE https://api-qa.tiendabroker.com/v1/retail/order/{orderId}

Cancela una orden por ID. Sólo es posible cancelar una orden si se encuentra en los statuses PENDING y SENT.

Path Parameters

Name
Type
Description

orderId*

String

Id de una orden

Headers

Name
Type
Description

tb-api-key*

String

API Key de la compañía

Last updated