@@ -490,6 +490,134 @@ public override object describe()
490490 { "MATIC" , "POLYGON" } ,
491491 } } ,
492492 } } ,
493+ { "features" , new Dictionary < string , object > ( ) {
494+ { "defaultForLinear" , new Dictionary < string , object > ( ) {
495+ { "sandbox" , true } ,
496+ { "createOrder" , new Dictionary < string , object > ( ) {
497+ { "triggerPrice" , true } ,
498+ { "triggerPriceType" , new Dictionary < string , object > ( ) {
499+ { "last" , true } ,
500+ { "mark" , true } ,
501+ { "index" , true } ,
502+ } } ,
503+ { "triggerDirection" , false } ,
504+ { "stopLossPrice" , true } ,
505+ { "takeProfitPrice" , true } ,
506+ { "attachedStopLossTakeProfit" , new Dictionary < string , object > ( ) {
507+ { "triggerPriceType" , new Dictionary < string , object > ( ) {
508+ { "last" , true } ,
509+ { "mark" , true } ,
510+ { "index" , true } ,
511+ } } ,
512+ { "limitPrice" , true } ,
513+ } } ,
514+ { "marginMode" , false } ,
515+ { "timeInForce" , new Dictionary < string , object > ( ) {
516+ { "GTC" , true } ,
517+ { "IOC" , true } ,
518+ { "FOK" , true } ,
519+ { "PO" , true } ,
520+ { "GTD" , false } ,
521+ } } ,
522+ { "hedged" , true } ,
523+ { "trailing" , true } ,
524+ } } ,
525+ { "createOrders" , new Dictionary < string , object > ( ) {
526+ { "max" , 5 } ,
527+ } } ,
528+ { "fetchMyTrades" , new Dictionary < string , object > ( ) {
529+ { "limit" , 512 } ,
530+ { "daysBack" , 30 } ,
531+ { "untilDays" , 30 } ,
532+ } } ,
533+ { "fetchOrder" , new Dictionary < string , object > ( ) {
534+ { "marginMode" , false } ,
535+ { "trigger" , false } ,
536+ { "trailing" , false } ,
537+ } } ,
538+ { "fetchOpenOrders" , new Dictionary < string , object > ( ) {
539+ { "limit" , null } ,
540+ { "marginMode" , false } ,
541+ { "trigger" , false } ,
542+ { "trailing" , false } ,
543+ } } ,
544+ { "fetchOrders" , new Dictionary < string , object > ( ) {
545+ { "limit" , 1000 } ,
546+ { "daysBack" , 20000 } ,
547+ { "untilDays" , 7 } ,
548+ { "marginMode" , false } ,
549+ { "trigger" , false } ,
550+ { "trailing" , false } ,
551+ } } ,
552+ { "fetchClosedOrders" , new Dictionary < string , object > ( ) {
553+ { "limit" , 1000 } ,
554+ { "daysBackClosed" , null } ,
555+ { "daysBackCanceled" , null } ,
556+ { "untilDays" , 7 } ,
557+ { "marginMode" , false } ,
558+ { "trigger" , false } ,
559+ { "trailing" , false } ,
560+ } } ,
561+ { "fetchOHLCV" , new Dictionary < string , object > ( ) {
562+ { "limit" , 1440 } ,
563+ } } ,
564+ } } ,
565+ { "defaultForInverse" , new Dictionary < string , object > ( ) {
566+ { "extends" , "defaultForLinear" } ,
567+ { "fetchMyTrades" , new Dictionary < string , object > ( ) {
568+ { "limit" , 1000 } ,
569+ { "daysBack" , null } ,
570+ { "untilDays" , null } ,
571+ } } ,
572+ { "fetchOHLCV" , new Dictionary < string , object > ( ) {
573+ { "limit" , 1440 } ,
574+ } } ,
575+ { "fetchOrders" , null } ,
576+ { "fetchClosedOrders" , new Dictionary < string , object > ( ) {
577+ { "limit" , 1000 } ,
578+ { "daysBackClosed" , null } ,
579+ { "daysBackCanceled" , null } ,
580+ { "untilDays" , 7 } ,
581+ { "marginMode" , false } ,
582+ { "trigger" , false } ,
583+ { "trailing" , false } ,
584+ } } ,
585+ } } ,
586+ { "spot" , new Dictionary < string , object > ( ) {
587+ { "extends" , "defaultForLinear" } ,
588+ { "createOrder" , new Dictionary < string , object > ( ) {
589+ { "triggerPriceType" , null } ,
590+ { "attachedStopLossTakeProfit" , null } ,
591+ { "trailing" , false } ,
592+ } } ,
593+ { "fetchMyTrades" , new Dictionary < string , object > ( ) {
594+ { "limit" , 1000 } ,
595+ { "daysBack" , 1 } ,
596+ { "untilDays" , 1 } ,
597+ } } ,
598+ { "fetchOrders" , null } ,
599+ { "fetchClosedOrders" , new Dictionary < string , object > ( ) {
600+ { "limit" , 100 } ,
601+ { "untilDays" , null } ,
602+ } } ,
603+ } } ,
604+ { "swap" , new Dictionary < string , object > ( ) {
605+ { "linear" , new Dictionary < string , object > ( ) {
606+ { "extends" , "defaultForLinear" } ,
607+ } } ,
608+ { "inverse" , new Dictionary < string , object > ( ) {
609+ { "extends" , "defaultForInverse" } ,
610+ } } ,
611+ } } ,
612+ { "future" , new Dictionary < string , object > ( ) {
613+ { "linear" , new Dictionary < string , object > ( ) {
614+ { "extends" , "defaultForLinear" } ,
615+ } } ,
616+ { "inverse" , new Dictionary < string , object > ( ) {
617+ { "extends" , "defaultForInverse" } ,
618+ } } ,
619+ } } ,
620+ } } ,
493621 } ) ;
494622 }
495623
@@ -3751,7 +3879,8 @@ public async override Task<object> fetchOrder(object id, object symbol = null, o
37513879 * @method
37523880 * @name bingx#fetchOrders
37533881 * @description fetches information on multiple orders made by the user
3754- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#User's%20All%20Orders
3882+ * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#All%20Orders
3883+ * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Query%20Order%20history (returns less fields than above)
37553884 * @param {string} symbol unified market symbol of the market orders were made in
37563885 * @param {int} [since] the earliest time in ms to fetch orders for
37573886 * @param {int} [limit] the maximum number of order structures to retrieve
@@ -3787,13 +3916,9 @@ public async override Task<object> fetchOrders(object symbol = null, object sinc
37873916 {
37883917 ( ( IDictionary < string , object > ) request ) [ "startTime" ] = since ;
37893918 }
3790- object until = this . safeInteger ( parameters , "until" ) ; // unified in milliseconds
3791- object endTime = this . safeInteger ( parameters , "endTime" , until ) ; // exchange-specific in milliseconds
3792- parameters = this . omit ( parameters , new List < object > ( ) { "endTime" , "until" } ) ;
3793- if ( isTrue ( ! isEqual ( endTime , null ) ) )
3794- {
3795- ( ( IDictionary < string , object > ) request ) [ "endTime" ] = endTime ;
3796- }
3919+ var requestparametersVariable = this . handleUntilOption ( "endTime" , request , parameters ) ;
3920+ request = ( ( IList < object > ) requestparametersVariable ) [ 0 ] ;
3921+ parameters = ( ( IList < object > ) requestparametersVariable ) [ 1 ] ;
37973922 object response = await this . swapV1PrivateGetTradeFullOrder ( this . extend ( request , parameters ) ) ;
37983923 //
37993924 // {
@@ -4106,6 +4231,10 @@ public async override Task<object> fetchCanceledAndClosedOrders(object symbol =
41064231 response = await this . contractV1PrivateGetAllOrders ( this . extend ( request , parameters ) ) ;
41074232 } else if ( isTrue ( isEqual ( type , "spot" ) ) )
41084233 {
4234+ if ( isTrue ( ! isEqual ( limit , null ) ) )
4235+ {
4236+ ( ( IDictionary < string , object > ) request ) [ "limit" ] = limit ;
4237+ }
41094238 response = await this . spotV1PrivateGetTradeHistoryOrders ( this . extend ( request , parameters ) ) ;
41104239 } else
41114240 {
@@ -4834,6 +4963,7 @@ public async override Task<object> setLeverage(object leverage, object symbol =
48344963 * @description fetch all trades made by the user
48354964 * @see https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Query%20transaction%20details
48364965 * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Query%20historical%20transaction%20orders
4966+ * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Query%20historical%20transaction%20details
48374967 * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20Order%20Trade%20Detail
48384968 * @param {string} [symbol] unified market symbol
48394969 * @param {int} [since] the earliest time in ms to fetch trades for
@@ -4879,7 +5009,7 @@ public async override Task<object> fetchMyTrades(object symbol = null, object si
48795009 ( ( IDictionary < string , object > ) request ) [ ( string ) startTimeReq ] = since ;
48805010 } else if ( isTrue ( getValue ( market , "swap" ) ) )
48815011 {
4882- ( ( IDictionary < string , object > ) request ) [ "startTs" ] = subtract ( now , 7776000000 ) ; // 90 days
5012+ ( ( IDictionary < string , object > ) request ) [ "startTs" ] = subtract ( now , multiply ( multiply ( multiply ( multiply ( 30 , 24 ) , 60 ) , 60 ) , 1000 ) ) ; // 30 days for swap
48835013 }
48845014 object until = this . safeInteger ( parameters , "until" ) ;
48855015 parameters = this . omit ( parameters , "until" ) ;
0 commit comments