[FTX] No implementation of cancelOrder for a sub-account
See original GitHub issueThere is no possibility to cancel an order if you are using a sub-account in the current implementation.
The only cancelOrder function is :
@Override
public boolean cancelOrder(String orderId) throws IOException {
return cancelFtxOrder(orderId);
}
There is no cancelOrderForSubaccount
version like there is for example :
placeLimitOrder(LimitOrder limitOrder)
and
placeLimitOrderForSubaccount(String subaccount, LimitOrder limitOrder)
I’m not sure if it’s THE way to go to have a version of every function with a postfix of ForSubaccount
but it does work so I propose to add a cancelOrderForSubaccount version.
If nobody disagrees I will submit a PR.
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (12 by maintainers)
Top Results From Across the Web
Subaccounts - FTX Exchange
FTX has a powerful, clean subaccount system that allows you to separate and manage your positions. What Are Subaccounts?
Read more >Unofficial Rust API bindings for the FTX exchange. - GitHub
Work in progress, contributions are welcome. REST. Authentication; Subaccounts. Get all subaccounts; Create subaccount; Change subaccount name
Read more >FTX - FMZ
_api_subacc: headers.update({ # If you want to access a subaccount 'FTX-SUBACCOUNT': urllib.parse.quote(self._api_subacc) }) return headers ...
Read more >Exchanges — ccxt 2.2.100 documentation
Do not override it unless you are implementing your own new crypto exchange class. ... of a specific value ( bitmex and ftx...
Read more >Enabling Stock Trading on a Merged Account - FTX.US
To enable Stock Trading on an FTX App (formerly Blockfolio) account, you will need to merge this with an FTX US account. If...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The
getTradeHistory
,getOpenOrders
andgetOpenPositions
are missing too.When I hacking the code, I come up with an idea: Instead of implementing every
*ForSubaccount
method, will it be a good idea to just useexchange.getExchangeSpecification().getUserName()
as subaccount parameter?Then we just need to pass
exSpec.setUserName("some-subaccount")
toExchangeSpecification
when creating the exchange, and subsequence calls to all services will use that as subaccount. If it’s not specified it naturally null, which works as before.I am new to this project, don’t know if this will break any other things.
We can close this issue as it’s resolved in the PR above