Comments (3)
Okex has unified all endpoints for different trading tools in V5 API. You can check difference at these links. https://www.okex.com/docs/en/ and https://www.okex.com/docs-v5/en/. In earlier versions of OKEx.Net repository you could guess all methods for one trading tool. For example all Futures methods started with Futures_ prefix. Check last V3 wrapper at this link https://github.com/burakoner/OKEx.Net/tree/V3 .
But once OKEx unified all endpoints you cant guess anymore. Because If you want to place an order in V5, you use same endpoint for Spot, Margin, Swap, Futures, Options. So I can only advice you to read V5 API documentation and examples in Readme file on this repository https://github.com/burakoner/OKEx.Net/blob/master/README.md
from okex.net.
// Okex Client
OkexClient cli = new OkexClient();
// Sample for a ticker for specific instruemnt
var tickerOne = cli.GetTicker("BTC-USDT-211231");
var priceChange = tickerOne.Data.LastPrice - tickerOne.Data.Open;
var priceChangePercent = 100.0m * priceChange / tickerOne.Data.Open;
// Sample for all tickers
var tickerAll = cli.GetTickers(OkexInstrumentType.Futures);
foreach(var ticker in tickerAll.Data)
{
var change = ticker.LastPrice - ticker.Open;
var changePercent = 100.0m * change / ticker.Open;
}
from okex.net.
@burakoner thank you very much for your description. Could you please tell me how i can get last PriceChangePercent and PriceChange in futures?
from okex.net.
Related Issues (20)
- Can't connect to candles socket. HOT 1
- Dostum mükemmel kütüphaneler hazırlamışsın. Teşekkürler ! HOT 1
- OKX api doesnt respond account balance anymore
- Funds Transfer Error HOT 1
- SubscribeToOrderUpdates Failed to deserialize data HOT 3
- Please update CryptoExchange.Net up to version 5.3.0 HOT 1
- Please update CryptoExchange.Net up to version 5.3.0 HOT 1
- How to use stoploss and take profit? HOT 4
- Can't get list of deals sequentially
- error in calling UnitConvert HOT 1
- The parameter tag of the function PlaceOrder has been removed HOT 1
- Could you please add a new api: /api/v5/market/exchange-rate HOT 2
- Missing params in Place Order HOT 3
- Cyclic Error by WebSocket HOT 2
- Spot -> Market Emir Hatası HOT 3
- api.GetInstruments error Error setting value to 'state' HOT 2
- How can I calculate withdrawal fee automatically? HOT 4
- What password do I need to use? HOT 2
- how to create a new deposit address via api? HOT 1
- Sync with new CryptoExchange.Net v6 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from okex.net.