mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 20:25:48 +00:00
Improve Order docs. Fix #776
This commit is contained in:
@@ -448,12 +448,14 @@ direction | string | Equal to "buy" for buy orders and "sell" for sell orders.
|
|||||||
quantity | [amount](#amount) | The amount of currency to buy or sell.
|
quantity | [amount](#amount) | The amount of currency to buy or sell.
|
||||||
totalPrice | [amount](#amount) | The total price to be paid for the `quantity` to be bought or sold.
|
totalPrice | [amount](#amount) | The total price to be paid for the `quantity` to be bought or sold.
|
||||||
expirationTime | date-time string | *Optional* Time after which the offer is no longer active, as an [ISO 8601 date-time](https://en.wikipedia.org/wiki/ISO_8601).
|
expirationTime | date-time string | *Optional* Time after which the offer is no longer active, as an [ISO 8601 date-time](https://en.wikipedia.org/wiki/ISO_8601).
|
||||||
fillOrKill | boolean | *Optional* Treat the offer as a [Fill or Kill order](http://en.wikipedia.org/wiki/Fill_or_kill). Only attempt to match existing offers in the ledger, and only do so if the entire quantity can be exchanged.
|
fillOrKill | boolean | *Optional* Treat the offer as a [Fill or Kill order](http://en.wikipedia.org/wiki/Fill_or_kill). Only attempt to match existing offers in the ledger, and only do so if the entire quantity can be exchanged. This cannot be used with `immediateOrCancel`.
|
||||||
immediateOrCancel | boolean | *Optional* Treat the offer as an [Immediate or Cancel order](http://en.wikipedia.org/wiki/Immediate_or_cancel). If enabled, the offer will never become a ledger node: it only attempts to match existing offers in the ledger.
|
immediateOrCancel | boolean | *Optional* Treat the offer as an [Immediate or Cancel order](http://en.wikipedia.org/wiki/Immediate_or_cancel). If enabled, the offer will never become a ledger node: it only attempts to match existing offers in the ledger. This cannot be used with `fillOrKill`.
|
||||||
memos | [memos](#transaction-memos) | *Optional* Array of memos to attach to the transaction.
|
memos | [memos](#transaction-memos) | *Optional* Array of memos to attach to the transaction.
|
||||||
orderToReplace | [sequence](#account-sequence-number) | *Optional* The [account sequence number](#account-sequence-number) of an order to cancel before the new order is created, effectively replacing the old order.
|
orderToReplace | [sequence](#account-sequence-number) | *Optional* The [account sequence number](#account-sequence-number) of an order to cancel before the new order is created, effectively replacing the old order.
|
||||||
passive | boolean | *Optional* If enabled, the offer will not consume offers that exactly match it, and instead becomes an Offer node in the ledger. It will still consume offers that cross it.
|
passive | boolean | *Optional* If enabled, the offer will not consume offers that exactly match it, and instead becomes an Offer node in the ledger. It will still consume offers that cross it.
|
||||||
|
|
||||||
|
The following invalid flag combination causes a `ValidationError`: `immediateOrCancel` and `fillOrKill`. These fields are mutually exclusive, and cannot both be set at the same time.
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,8 @@ See [Transaction Types](#transaction-types) for a description.
|
|||||||
|
|
||||||
<%- renderSchema('specifications/order.json') %>
|
<%- renderSchema('specifications/order.json') %>
|
||||||
|
|
||||||
|
The following invalid flag combination causes a `ValidationError`: `immediateOrCancel` and `fillOrKill`. These fields are mutually exclusive, and cannot both be set at the same time.
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
<%- renderFixture('requests/prepare-order.json') %>
|
<%- renderFixture('requests/prepare-order.json') %>
|
||||||
|
|||||||
@@ -19,11 +19,11 @@
|
|||||||
},
|
},
|
||||||
"immediateOrCancel": {
|
"immediateOrCancel": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"description": "Treat the offer as an [Immediate or Cancel order](http://en.wikipedia.org/wiki/Immediate_or_cancel). If enabled, the offer will never become a ledger node: it only attempts to match existing offers in the ledger."
|
"description": "Treat the offer as an [Immediate or Cancel order](http://en.wikipedia.org/wiki/Immediate_or_cancel). If enabled, the offer will never become a ledger node: it only attempts to match existing offers in the ledger. This cannot be used with `fillOrKill`."
|
||||||
},
|
},
|
||||||
"fillOrKill": {
|
"fillOrKill": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"description": "Treat the offer as a [Fill or Kill order](http://en.wikipedia.org/wiki/Fill_or_kill). Only attempt to match existing offers in the ledger, and only do so if the entire quantity can be exchanged."
|
"description": "Treat the offer as a [Fill or Kill order](http://en.wikipedia.org/wiki/Fill_or_kill). Only attempt to match existing offers in the ledger, and only do so if the entire quantity can be exchanged. This cannot be used with `immediateOrCancel`."
|
||||||
},
|
},
|
||||||
"passive": {
|
"passive": {
|
||||||
"description": "If enabled, the offer will not consume offers that exactly match it, and instead becomes an Offer node in the ledger. It will still consume offers that cross it.",
|
"description": "If enabled, the offer will not consume offers that exactly match it, and instead becomes an Offer node in the ledger. It will still consume offers that cross it.",
|
||||||
|
|||||||
Reference in New Issue
Block a user