Giter VIP home page Giter VIP logo

Comments (3)

burakoner avatar burakoner commented on September 28, 2024 1

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.

burakoner avatar burakoner commented on September 28, 2024 1
// 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.

overstartup avatar overstartup commented on September 28, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.