binance-api-node icon indicating copy to clipboard operation
binance-api-node copied to clipboard

Add GTE_GTC as timeInForce for STOP_MARKET and TAKE_PROFIT_MARKET orders

Open Tim142857 opened this issue 3 years ago • 2 comments

There was an issue when we create both STOP_MARKET and TAKE_PROFIT_MARKET for an opened position. When one is trigerred, second order is still active. GTE_GTC allow orders to be removed if their status become "EXPIRED"

Tim142857 avatar May 16 '22 08:05 Tim142857

Actually shouldn't you be the one providing this param yourself rather than making this the default which some people might not expect?

balthazar avatar May 18 '22 07:05 balthazar

I agree, it should not be set by default, but we can set it ourselves.

Something like that :

File: ./node_modules/binance-api-node/index.d.ts
Line 1412 : 
  export type TimeInForce_LT = 'GTC' | 'IOC' | 'FOK' | 'GTE_GTC'

  export const enum TimeInForce {
    GTC = 'GTC',
    IOC = 'IOC',
    FOK = 'FOK',
    GTE_GTC = 'GTE_GTC'
  }

farukborann avatar Sep 19 '23 11:09 farukborann