UNPKG

ripple-lib

Version:

Deprecated - consider migrating to xrpl.js: https://xrpl.org/xrpljs2-migration-guide.html

50 lines (49 loc) 2.18 kB
{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "order", "link": "order", "type": "object", "properties": { "direction": { "type": "string", "enum": ["buy", "sell"], "description": "Equal to \"buy\" for buy orders and \"sell\" for sell orders." }, "quantity": { "$ref": "amount", "description": "The amount of currency to buy or sell." }, "totalPrice": { "$ref": "amount", "description": "The total price to be paid for the `quantity` to be bought or sold." }, "immediateOrCancel": { "type": "boolean", "description": "Treat the offer as an [Immediate or Cancel order](http://en.wikipedia.org/wiki/Immediate_or_cancel). If enabled, do not create an object in the ledger that can be matched later: instead, only execute as much as can be fulfilled immediately. This cannot be used with `fillOrKill`." }, "fillOrKill": { "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. This cannot be used with `immediateOrCancel`." }, "passive": { "description": "If enabled, the offer does not consume offers that exactly match it, and instead becomes an Offer node in the ledger. It still consumes offers that cross it.", "type": "boolean" }, "expirationTime": { "type": "string", "format": "date-time", "description": "Time after which the offer is no longer active, as an [ISO 8601 date-time](https://en.wikipedia.org/wiki/ISO_8601)." }, "orderToReplace": { "$ref": "sequence", "description": "The [account sequence number](#account-sequence-number) of an order to cancel before the new order is created, effectively replacing the old order." }, "memos": {"$ref": "memos"} }, "required": ["direction", "quantity", "totalPrice"], "additionalProperties": false, "not": { "description": "immediateOrCancel and fillOrKill are mutually exclusive", "required": ["immediateOrCancel", "fillOrKill"] } }