Create Order Node
On receiving msg.payload
the create order node provides the functionality to execute various order types on selected exchanges.
Inputs
If parameter source is set to Config:
Output
Node communicates and places order(s) with selected exchange.
Trade information added to msg.payload
.
The message will be enriched by createOrderResult
and fetchedOrder
properties:
msg:
msg.dca:
Example message
{
"payload": "bought 0.2 DOT for 1.2893 EUR @ 6.4465 EUR on kraken (filled 100%, fee 0.00335 EUR)",
"createOrderResult": {
"id": "ABCDEF",
"info": {
"txid": ["ABCDEF"],
"descr": { "order": "buy 0.20000000 DOTEUR @ market" }
},
"market": "DOT/EUR",
"type": "market",
"timeInForce": "IOC",
"side": "buy",
"amount": 0.2,
"trades": [],
"fees": []
},
"fetchedOrder": {
"id": "ABCDEF",
"clientOrderId": "0",
"timestamp": 1665149556722,
"datetime": "2022-10-07T13:32:36.722Z",
"status": "closed",
"market": "DOT/EUR",
"type": "market",
"timeInForce": "IOC",
"side": "buy",
"price": 6.4465,
"stopPrice": 0,
"cost": 1.2893,
"amount": 0.2,
"filled": 0.2,
"average": 6.4465,
"remaining": 0,
"fee": { "cost": 0.00335, "currency": "EUR" }
}
}
Details
In most cases the create order node should have the incoming message as parameter source.
This means that specific order information does not need to be inputted by the user in this node as the information is already in the msg.payload
.
For example, if a create order node is in a flow with a DCA node and the DCA node is before the create order node in the flow; then all order information is already in the incoming message’s payload.
Within this node it is essential that a user provides exchange credentials for an exchange to enable Foretale to communicate with the user’s exchange account.
Enter your exchange credentials via the edit button by the exchange input.
Please only provide credentials that follow the least privilege principle.