question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[FTX] No implementation of cancelOrder for a sub-account

See original GitHub issue

There 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:closed
  • Created 2 years ago
  • Comments:13 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
imTiggercommented, Jun 10, 2021

The getTradeHistory, getOpenOrders and getOpenPositions 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 use exchange.getExchangeSpecification().getUserName() as subaccount parameter?

Then we just need to pass exSpec.setUserName("some-subaccount") to ExchangeSpecification 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.

0reactions
mathvdhcommented, Aug 2, 2021

We can close this issue as it’s resolved in the PR above

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found