Interface RestRequestOrderBase

Base Type

This is generally not meant to be used directly by SDK users, they are used to augment interfaces with common parameters & documentation.

interface RestRequestOrderBase {
    nonce: string;
    wallet: string;
    market: string;
    type: OrderType;
    side: OrderSide;
    quantity: string;
    delegatedKey?: string;
    clientOrderId?: string;
    reduceOnly?: boolean;
    timeInForce?: TimeInForce;
    selfTradePrevention?: SelfTradePrevention;
    triggerPrice?: string;
    triggerType?: TriggerType;
    price?: string;
    isLiquidationAcquisitionOnly?: boolean;
}

Hierarchy (view full)

Properties

nonce: string

User data and trade endpoints requests must include a nonce.

  • MUST be a version 1 UUID
  • Nonces may be supplied with or without hyphens.

Remarks

Version 1 UUIDs encode a timestamp in addition to other unique information, and thus serve both to prevent replay attacks as well as to enforce request timing. As a result, nonces MUST be generated at the time of a request.

wallet: string

The wallet address to use for the request.

market: string

Base-quote pair e.g. 'ETH-USD'

type: OrderType
  • When specifying, using the OrderType enum is recommended for inline docs and convenience.

Example

 import { OrderType } from '@idexio/idex-sdk'

const response = await client.createOrder({
// whichever order type you are creating
type: OrderType.market,
// ...other params
})

See

side: OrderSide
  • When specifying, using the OrderSide enum is recommended for inline docs and convenience.

See

enum OrderSide

quantity: string

Order quantity in base terms

delegatedKey?: string

The delegated key to use for the request, if any.

clientOrderId?: string

Client-specified order id, maximum of 40 bytes

reduceOnly?: boolean

Reduce only orders are only accepted opposite open positions and only reduce an opposite position’s size

timeInForce?: TimeInForce

See

enum TimeInForce

Default Value

TimeInForce.gtc
selfTradePrevention?: SelfTradePrevention

Self-trade prevention policy, see enum links

See

enum SelfTradePrevention

Default Value

SelfTradePrevention.dc
triggerPrice?: string

Only allowed for certain order types mentioned below, omitted otherwise.

See

enum OrderType

triggerType?: TriggerType

Price type for the triggerPrice

  • When specifying, using the TriggerType enum is recommended for inline docs and convenience.
  • Required when triggerPrice is defined.

See

enum TriggerType

price?: string

Order price in quote terms

  • Required for all limit order types.
  • Omitted for all market order types.

See

enum OrderType

isLiquidationAcquisitionOnly?: boolean

When this parameter is true it indicates that the order is an LP side channel order not to be executed against the order book.

  • Wallet placing the order MUST BE WHITELISTED. Contact the IDEX team for more details.
  • This parameter is only allowed to be true on market and limit order types.
  • In the case of limit orders, timeInForce must be TimeInForce.gtc indicating that side channel orders never take liquidity.
  • reduceOnly and selfTradePrevention parameters may be omitted or set to their default values only.

See