Giter Site home page Giter Site logo

Comments (2)

mvandeberg avatar mvandeberg commented on August 13, 2024

I am seeing the same problem, but it does not appear to be a problem with the library, but the API itself.

My attempted call to get the 1 day kline,

console.log( marketApi.klines( "KOINUSDT", "1d", {startTime: 1671926400000, limit: 1} ) );

Returns:

[
  [
    1676505600000,
    '0.5389',
    '0.5389',
    '0.4901',
    '0.4987',
    '23355.63',
    1676592000000,
    '11724.4131'
  ]
]

When I use curl, I get the same thing:

curl -H "Content-Type: application/json" -H "X-MEXC-APIKEY: XXXXXXXXXXXXXXXX" https://api.mexc.com/api/v3/klines\?symbol=KOINUSDT\&interval=1d\&limit=1\&startTime=1671926400000 | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    91  100    91    0     0    382      0 --:--:-- --:--:-- --:--:--   382
[
  [
    1676505600000,
    "0.5389",
    "0.5389",
    "0.4901",
    "0.4983",
    "23800.63",
    1676592000000,
    "11946.1738"
  ]
]

I have tried passing in startTime as a string as well as the names start_time and StartTime. No combination is working.

It would appear that the API is not either documented incorrectly or not respecting the startTime and endTime parameters.

For the time being, I can get the information I need by cranking up the limit and iterating through the results, but that is neither efficient for my script, nor MEXC's API server.

from mexc-api-sdk.

bahadircan-bc avatar bahadircan-bc commented on August 13, 2024

I have a similar problem on Python

spot.klines('PRAREUSDT', '1d', {'limit': 1})

but the function returns empty array when I pass start and end time.

I have tried many things to get a proper response but no luck

from mexc-api-sdk.

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.