Open orders fetcher
Last updated
Last updated
[sdks/ccxt/private/Open orders fetcher]
Loads open orders data. More: https://docs.ccxt.com/en/latest/manual.html#open-orders Example:
1. Received via `exchange`:<br>
{<br>
"id":"coinbasepro",<br>
"credentials": {<br>
"apiKey": "API_KEY",<br>
"secret": "SECRET",<br>
"password": "PASSWORD"<br>
},<br>
"sandboxMode": true<br>
}@0<br>
```<br>
2. Received via `query`:<br>
```<br>
{ <br>
"symbol": "BTC/USDT"<br>
}@0<br>
```<br>
3. Sent via `data`:<br>
```<br>
[{<br>
"id": "4bba5198-9aac-4e3e-8e07-8c200daad567",<br>
"info": {<br>
"id": "4bba5198-9aac-4e3e-8e07-8c200daad567",<br>
"price": "100.00000000",<br>
"size": "1.00000000",<br>
"product_id": "BTC-USD",<br>
"profile_id": "c6d9dc69-1a9a-4439-92e2-1996392ea3be",<br>
"side": "buy",<br>
"type": "limit",<br>
"time_in_force": "GTC",<br>
"post_only": false,<br>
"created_at": "2022-08-08T09:30:41.374971Z",<br>
"fill_fees": "0.0000000000000000",<br>
"filled_size": "0.00000000",<br>
"executed_value": "0.0000000000000000",<br>
"status": "open",<br>
"settled": false<br>
},<br>
"timestamp": 1659951041374,<br>
"datetime": "2022-08-08T09:30:41.374Z",<br>
"status": "open",<br>
"symbol": "BTC/USD",<br>
"type": "limit",<br>
"timeInForce": "GTC",<br>
"postOnly": false,<br>
"side": "buy",<br>
"price": 100,<br>
"cost": 0,<br>
"amount": 1,<br>
"filled": 0,<br>
"remaining": 1,<br>
"fee": {<br>
"cost": 0,<br>
"currency": "USD"<br>
},<br>
"trades": [],<br>
"fees": [<br>
{<br>
"cost": 0,<br>
"currency": "USD"<br>
}<br>
]<br>
}]@0 <br>
```<br>
---
### Input ports
* __exchange__:
```
{
"id": string,
optional "credentials": {
"apiKey": string,
"secret": string,
optional "uid": string,
optional "password": string
},
optional "sandboxMode": boolean
}
```
Received the exchange to be used.<br>
<br>
More:<br>
https://docs.ccxt.com/en/latest/exchange-markets.html<br>
<br>
Example:<br>
```<br>
{<br>
"id": "coinbasepro",<br>
"credentials": {<br>
"apiKey": "API_KEY",<br>
"secret": "SECRET",<br>
"password": "PASSWORD"<br>
},<br>
"sandboxMode": true<br>
}<br>
```<br>
* __query__:
```
{
"symbol": string,
optional "since": number,
optional "limit": number,
optional "params": {string: any}
}
```
Received the orders parameters to be fetched.<br>
<br>
More:<br>
https://docs.ccxt.com/en/latest/manual.html#open-orders<br>
<br>
Example:<br>
```<br>
{ <br>
"symbol": "BTC/USDT"<br>
}<br>
```<br>
### Output ports
* __data__:
```
{
"id": string,
optional "clientOrderId": string,
optional "datetime": string,
optional "timestamp": number,
optional "lastTradeTimestamp": number,
"status": ("open" or "closed" or "canceled" or "expired" or "rejected"),
"symbol": string,
"type": ("market" or "limit"),
"timeInForce": ("GTC" or "IOC" or "FOK" or "PO"),
"side": ("buy" or "sell"),
optional "price": number,
optional "average": number,
optional "amount": number,
"filled": number,
optional "remaining": number,
"cost": number,
"trades": any[],
optional "fee": {"currency": string, "cost": number, "rate": number},
"info": any
}[]
```
Sends information about the open orders.<br>
<br>
More:<br>
https://docs.ccxt.com/en/latest/manual.html#order-structure<br>
<br>
Example:<br>
```<br>
[{<br>
"id": "4bba5198-9aac-4e3e-8e07-8c200daad567",<br>
"info": {<br>
"id": "4bba5198-9aac-4e3e-8e07-8c200daad567",<br>
"price": "100.00000000",<br>
"size": "1.00000000",<br>
"product_id": "BTC-USD",<br>
"profile_id": "c6d9dc69-1a9a-4439-92e2-1996392ea3be",<br>
"side": "buy",<br>
"type": "limit",<br>
"time_in_force": "GTC",<br>
"post_only": false,<br>
"created_at": "2022-08-08T09:30:41.374971Z",<br>
"fill_fees": "0.0000000000000000",<br>
"filled_size": "0.00000000",<br>
"executed_value": "0.0000000000000000",<br>
"status": "open",<br>
"settled": false<br>
},<br>
"timestamp": 1659951041374,<br>
"datetime": "2022-08-08T09:30:41.374Z",<br>
"status": "open",<br>
"symbol": "BTC/USD",<br>
"type": "limit",<br>
"timeInForce": "GTC",<br>
"postOnly": false,<br>
"side": "buy",<br>
"price": 100,<br>
"cost": 0,<br>
"amount": 1,<br>
"filled": 0,<br>
"remaining": 1,<br>
"fee": {<br>
"cost": 0,<br>
"currency": "USD"<br>
},<br>
"trades": [],<br>
"fees": [<br>
{<br>
"cost": 0,<br>
"currency": "USD"<br>
}<br>
]<br>
}]<br>
```<br>
<br>
* __error__: ` {"error": string, optional "details": any} `