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

Add futures to okx exchange metadata #4772

Open
douggie opened this issue Sep 14, 2023 · 0 comments
Open

Add futures to okx exchange metadata #4772

douggie opened this issue Sep 14, 2023 · 0 comments

Comments

@douggie
Copy link
Collaborator

douggie commented Sep 14, 2023

Currently the remoteInit for okx only loads the spot and swap products, I propose we add the futures products, so that functions like getOpenPostions will work when they do things key looks ups like this on futures positiions exchangeMetaData.getInstruments().get(adaptOkexInstrumentId(okexPosition.getInstrumentId())).getContractValue()

        ((OkexMarketDataServiceRaw) marketDataService)
            .getOkexInstruments(SPOT, null, null)
            .getData();

    List<OkexInstrument> swap_instruments =
            ((OkexMarketDataServiceRaw) marketDataService)
                    .getOkexInstruments(SWAP, null, null)
                    .getData();

    instruments.addAll(swap_instruments);

    List<OkexInstrument> futures_instruments =
        ((OkexMarketDataServiceRaw) marketDataService)
            .getOkexInstruments(FUTURES, null, null)
            .getData();

    instruments.addAll(futures_instruments);
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

No branches or pull requests

1 participant