@@ -436,6 +436,25 @@ export interface GetOCOParams {
436
436
origClientOrderId ?: string ;
437
437
}
438
438
439
+ export interface NewSpotSOROrderParams {
440
+ symbol : string ;
441
+ side : OrderSide ;
442
+ type : OrderType ;
443
+ timeInForce ?: OrderTimeInForce ;
444
+ quantity : number ;
445
+ price ?: number ;
446
+ newClientOrderId ?: string ;
447
+ strategyId ?: number ;
448
+ strategyType ?: number ;
449
+ icebergQty ?: number ;
450
+ newOrderRespType ?: OrderResponseType ;
451
+ selfTradePreventionMode ?:
452
+ | 'EXPIRE_TAKER'
453
+ | 'EXPIRE_MAKER'
454
+ | 'EXPIRE_BOTH'
455
+ | 'NONE' ;
456
+ }
457
+
439
458
export type APILockTriggerCondition = 'GCR' | 'IFER' | 'UFR' ;
440
459
441
460
export interface APITriggerConditionSymbolStatus {
@@ -653,42 +672,97 @@ export interface OrderResponseFull {
653
672
fills : OrderFill [ ] ;
654
673
}
655
674
656
- export interface GenericReplaceSpotOrderResult < C , N > {
675
+ export interface SOROrderFill {
676
+ matchType : string ;
677
+ price : numberInString ;
678
+ qty : numberInString ;
679
+ commission : numberInString ;
680
+ commissionAsset : string ;
681
+ tradeId : number ;
682
+ allocId : number ;
683
+ }
684
+
685
+ export type SOROrderResponseFull = OrderResponseFull & {
686
+ workingTime : number ;
687
+ fills : SOROrderFill [ ] ;
688
+ workingFloor : string ;
689
+ selfTradePreventionMode : string ;
690
+ usedSor : true ;
691
+ } ;
692
+
693
+ export interface SORTestOrderResponse {
694
+ standardCommissionForOrder : {
695
+ //Standard commission rates on trades from the order.
696
+ maker : numberInString ;
697
+ taker : numberInString ;
698
+ } ;
699
+ taxCommissionForOrder : {
700
+ //Tax commission rates for trades from the order.
701
+ maker : numberInString ;
702
+ taker : numberInString ;
703
+ } ;
704
+ discount : {
705
+ //Discount on standard commissions when paying in BNB.
706
+ enabledForAccount : boolean ;
707
+ enabledForSymbol : boolean ;
708
+ discountAsset : string ;
709
+ discount : numberInString ; //Standard commission is reduced by this rate when paying commission in BNB.
710
+ } ;
711
+ }
712
+
713
+ export interface GenericReplaceSpotOrderResult < C , N > {
657
714
cancelResult : 'SUCCESS' | 'FAILURE' ;
658
715
newOrderResult : 'SUCCESS' | 'FAILURE' | 'NOT_ATTEMPTED' ;
659
716
cancelResponse : C ;
660
717
newOrderResponse : N ;
661
718
}
662
719
663
- export interface ReplaceSpotOrderCancelStopFailure extends GenericReplaceSpotOrderResult < GenericCodeMsgError , null > {
720
+ export interface ReplaceSpotOrderCancelStopFailure
721
+ extends GenericReplaceSpotOrderResult < GenericCodeMsgError , null > {
664
722
cancelResult : 'FAILURE' ;
665
723
newOrderResult : 'NOT_ATTEMPTED' ;
666
724
}
667
725
668
- export interface ReplaceSpotOrderNewFailure extends GenericReplaceSpotOrderResult < CancelSpotOrderResult , GenericCodeMsgError > {
726
+ export interface ReplaceSpotOrderNewFailure
727
+ extends GenericReplaceSpotOrderResult <
728
+ CancelSpotOrderResult ,
729
+ GenericCodeMsgError
730
+ > {
669
731
cancelResult : 'SUCCESS' ;
670
732
newOrderResult : 'FAILURE' ;
671
733
}
672
734
673
- export interface ReplaceSpotOrderCancelAllowFailure extends GenericReplaceSpotOrderResult < GenericCodeMsgError , OrderResponseACK | OrderResponseResult | OrderResponseFull > {
735
+ export interface ReplaceSpotOrderCancelAllowFailure
736
+ extends GenericReplaceSpotOrderResult <
737
+ GenericCodeMsgError ,
738
+ OrderResponseACK | OrderResponseResult | OrderResponseFull
739
+ > {
674
740
cancelResult : 'FAILURE' ;
675
741
newOrderResult : 'SUCCESS' ;
676
742
}
677
743
678
- export interface ReplaceSpotOrderCancelAllFailure extends GenericReplaceSpotOrderResult < GenericCodeMsgError , GenericCodeMsgError > {
744
+ export interface ReplaceSpotOrderCancelAllFailure
745
+ extends GenericReplaceSpotOrderResult <
746
+ GenericCodeMsgError ,
747
+ GenericCodeMsgError
748
+ > {
679
749
cancelResult : 'FAILURE' ;
680
750
newOrderResult : 'FAILURE' ;
681
751
}
682
752
683
753
export interface ReplaceSpotOrderResultError {
684
- data :
685
- | ReplaceSpotOrderCancelStopFailure
686
- | ReplaceSpotOrderNewFailure
687
- | ReplaceSpotOrderCancelAllowFailure
688
- | ReplaceSpotOrderCancelAllFailure
689
- }
690
-
691
- export interface ReplaceSpotOrderResultSuccess extends GenericReplaceSpotOrderResult < CancelSpotOrderResult , OrderResponseACK | OrderResponseResult | OrderResponseFull > {
754
+ data :
755
+ | ReplaceSpotOrderCancelStopFailure
756
+ | ReplaceSpotOrderNewFailure
757
+ | ReplaceSpotOrderCancelAllowFailure
758
+ | ReplaceSpotOrderCancelAllFailure ;
759
+ }
760
+
761
+ export interface ReplaceSpotOrderResultSuccess
762
+ extends GenericReplaceSpotOrderResult <
763
+ CancelSpotOrderResult ,
764
+ OrderResponseACK | OrderResponseResult | OrderResponseFull
765
+ > {
692
766
cancelResult : 'SUCCESS' ;
693
767
newOrderResult : 'SUCCESS' ;
694
768
}
0 commit comments