burakoner / OKEx.Net

Open source .Net API wrapper for the @OKEx V5 Rest API and V5 Websocket API
MIT License
86 stars 48 forks source link

How can I calculate withdrawal fee automatically? #96

Closed sabond9 closed 1 year ago

sabond9 commented 1 year ago

Hello. I need to calculate withdrawal fee automatically in Funding. Okex fee has different value depend on token and network type. Put it each time manually isn't good solution. Following this code we need to put it manually: var funding_09 = api.Withdraw("USDT", 100.0m, OkexWithdrawalDestination.DigitalCurrencyAddress, "toAddress", "password", 1.0m, "USDT-TRC20");

Please provide some solutions

burakoner commented 1 year ago

You'll define fee amount in new endpoint https://www.okx.com/docs-v5/en/#rest-api-funding-withdrawal

sabond9 commented 1 year ago

Yes, but I mean I don't want to calculate it manually

burakoner commented 1 year ago

This is blockchain. You always have to define fee. I recommend you to find average withdrawal fees for each asset. OKX maybe share this kind of data. If I found I'll share with you.

burakoner commented 1 year ago

check this out https://www.okx.com/docs-v5/en/#rest-api-funding-get-currencies