Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(bybit): add ws crud #22313

Merged
merged 3 commits into from Apr 28, 2024
Merged

feat(bybit): add ws crud #22313

merged 3 commits into from Apr 28, 2024

Conversation

pcriadoperez
Copy link
Contributor

No description provided.

// }
//
const messageHash = this.safeString (message, 'reqId');
const data = this.safeValue (message, 'data');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pcriadoperez let's avoid safeValue pls

throw new ArgumentsRequired (this.id + ' cancelOrder() requires a symbol argument');
}
await this.loadMarkets ();
cancelOrderRequest (id: string, symbol: Str = undefined, params = {}) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we're missing extending params before returning

@carlosmiei
Copy link
Collaborator

DEMO

p bybit createOrderWs LTC/USDT limit buy 0.1 55 --sandbox
Python v3.11.7
CCXT v4.3.10
bybit.createOrderWs(LTC/USDT,limit,buy,0.1,55)
{'amount': None,
 'average': None,
 'clientOrderId': '1674228372471113985',
 'cost': None,
 'datetime': None,
 'fee': None,
 'fees': [],
 'filled': None,
 'id': '1674228372471113984',
 'info': {'orderId': '1674228372471113984',
          'orderLinkId': '1674228372471113985'},
 'lastTradeTimestamp': None,
 'lastUpdateTimestamp': None,
 'postOnly': None,
 'price': None,
 'reduceOnly': None,
 'remaining': None,
 'side': None,
 'status': None,
 'stopLossPrice': None,
 'stopPrice': None,
 'symbol': None,
 'takeProfitPrice': None,
 'timeInForce': None,
 'timestamp': None,
 'trades': [],
 'triggerPrice': None,
 'type': None}
 p bybit editOrderWs "'1674228372471113984'" "LTC/USDT" limit buy 0.11 56 --sandbox
Python v3.11.7
CCXT v4.3.10
bybit.editOrderWs(1674228372471113984,LTC/USDT,limit,buy,0.11,56)
{'amount': None,
 'average': None,
 'clientOrderId': '1674228372471113985',
 'cost': None,
 'datetime': None,
 'fee': None,
 'fees': [],
 'filled': None,
 'id': '1674228372471113984',
 'info': {'orderId': '1674228372471113984',
          'orderLinkId': '1674228372471113985'},
 'lastTradeTimestamp': None,
 'lastUpdateTimestamp': None,
 'postOnly': None,
 'price': None,
 'reduceOnly': None,
 'remaining': None,
 'side': None,
 'status': None,
 'stopLossPrice': None,
 'stopPrice': None,
 'symbol': None,
 'takeProfitPrice': None,
 'timeInForce': None,
 'timestamp': None,
 'trades': [],
 'triggerPrice': None,
 'type': None}
 p bybit cancelOrderWs "'1674228372471113984'" "LTC/USDT" --sandbox                   
Python v3.11.7
CCXT v4.3.10
bybit.cancelOrderWs(1674228372471113984,LTC/USDT)
{'amount': None,
 'average': None,
 'clientOrderId': '1674228372471113985',
 'cost': None,
 'datetime': None,
 'fee': None,
 'fees': [],
 'filled': None,
 'id': '1674228372471113984',
 'info': {'orderId': '1674228372471113984',
          'orderLinkId': '1674228372471113985'},
 'lastTradeTimestamp': None,
 'lastUpdateTimestamp': None,
 'postOnly': None,
 'price': None,
 'reduceOnly': None,
 'remaining': None,
 'side': None,
 'status': None,
 'stopLossPrice': None,
 'stopPrice': None,
 'symbol': None,
 'takeProfitPrice': None,
 'timeInForce': None,
 'timestamp': None,
 'trades': [],
 'triggerPrice': None,
 'type': None}

@carlosmiei carlosmiei closed this Apr 28, 2024
@carlosmiei carlosmiei reopened this Apr 28, 2024
@carlosmiei carlosmiei merged commit dcd92ad into ccxt:master Apr 28, 2024
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants