Create Order Node

On receiving msg.payload the create order node provides the functionality to execute various order types on selected exchanges.

Inputs

Name optional
Optional name for this node
Exchange select
Select the exchange you wish to connect to. Exchange credentials need to be added here in order to trade live. Select edit button to provide exchange credentials.
Parameter Source select
The parameter source defines to which information source the create order node gets the information needed to place an order. Select config to create a new order on the fly or select incoming message to place orders based on previous nodes calculations (e.g. DCA or index nodes).

If parameter source is set to Config:

Market select
which market pair to purchase.
Side select
Either buy or sell
Amount Type select
Choose between base and quote amount.

Example market BTC/USD (base currency / quote currency)
Base amount would specify amount in BTC and quote amount would specify amount in USD.
Type select
Select order type. Market (place order regardless of price -> be careful) or limit (specify the price specifically)
Amount integer
Value of order in amount type units, i.e. either in base or in quote amount.
Price float
Specify the price of the order (only applicable for order type limit)

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:

payload string
Human-readable representation, e.g. buying 0.0001 on BTC/EUR (calculated chance was 6%)

msg.dca:

dca.exchange string
Exchange, e.g. kraken

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.

Last updated on Oct 5, 2022

Newsletter

Subscribe to our newsletter to stay updated and to get notified once the platform officially launches:

By subscribing, you agree with Foretale’s Privacy Policy

© foretale - 2022