dominiktraxl / pykrakenapi

A python implementation of the Kraken API.
GNU Lesser General Public License v3.0
225 stars 53 forks source link

get_recent_trades crashes due to new column #76

Open Monolite opened 2 years ago

Monolite commented 2 years ago

Apparently, kraken api has released a new version in which a new column has appeared, leading to api failure when setting trades.columns. After adding a new column name, api works properly, but can't tell what data was added.

Any suggestion on new column's naming? Looks like a consecutive value...

{
  "error": [],
  "result": {
    "XXRPZUSD": [
      [
        "0.38371000",
        "400.00000000",
        1668589341.3558393,
        "s",
        "m",
        "",
        12893492
      ],
      [
        "0.38432000",
        "6819.46691675",
        1668589361.401123,
        "b",
        "m",
        "",
        12893493
      ],
      [
        "0.38432000",
        "775.02400000",
        1668589361.4012592,
        "b",
        "m",
        "",
        12893494
      ],
      [
        "0.38432000",
        "5480.23021067",
        1668589361.4013214,
        "b",
        "m",
        "",
        12893495
      ],
      [
        "0.38369000",
        "639.58462000",
        1668589551.0218747,
        "b",
        "l",
        "",
        12893496
      ],
      [
        "0.38261000",
        "18.20865043",
        1668589615.9194462,
        "b",
        "l",
        "",
        12893497
      ],
      [
        "0.38259000",
        "24.57250980",
        1668589623.9161768,
        "b",
        "l",
        "",
        12893498
      ],
      [
        "0.38254000",
        "38.94625525",
        1668589626.3778856,
        "s",
        "l",
        "",
        12893499
      ],
      [
        "0.38280000",
        "400.32537000",
        1668589834.7265108,
        "s",
        "l",
        "",
        12893500
      ],
      [
        "0.38281000",
        "5.00000000",
        1668589838.5182784,
        "s",
        "m",
        "",
        12893501
      ],
      [
        "0.38308000",
        "75.00000000",
        1668590088.5801194,
        "s",
        "l",
        "",
        12893502
      ],
      [
        "0.38308000",
        "50.00000000",
        1668590088.6186223,
        "s",
        "l",
        "",
        12893503
      ],
      [
        "0.38308000",
        "75.00000000",
        1668590099.3499765,
        "s",
        "l",
        "",
        12893504
      ],
      [
        "0.38308000",
        "15.00000000",
        1668590101.494206,
        "s",
        "l",
        "",
        12893505
      ],
      [
        "0.38308000",
        "75.00000000",
        1668590107.5240211,
        "s",
        "l",
        "",
        12893506
      ],
      [
        "0.38308000",
        "75.00000000",
        1668590117.5232296,
        "s",
        "l",
        "",
        12893507
      ],
      [
        "0.38308000",
        "310.51526864",
        1668590183.1017997,
        "s",
        "l",
        "",
        12893508
      ],
      [
        "0.38308000",
        "5804.85448660",
        1668590183.101873,
        "s",
        "l",
        "",
        12893509
      ],
      [
        "0.38308000",
        "10.00000000",
        1668590183.10191,
        "s",
        "l",
        "",
        12893510
      ],
      [
        "0.38120000",
        "2452.12754787",
        1668594718.3191183,
        "s",
        "l",
        "",
        12893621
      ],
      [
        "0.38112000",
        "2641.00000000",
        1668594718.7009282,
        "s",
        "l",
        "",
        12893622
      ],
      [
        "0.38105000",
        "2999.99999999",
        1668594718.8856611,
        "s",
        "l",
        "",
        12893623
      ],
      [
        "0.38097000",
        "189.06884000",
        1668594797.4201107,
        "b",
        "l",
        "",
        12893624
      ]
    ],
    "last": "1668594797420110686"
  }
}
smeingast commented 1 year ago

Came here to report the same. :)

JosorioData commented 1 year ago

Same here! Any solutions??

hugodemenez commented 1 year ago

@Monolite , @smeingast , @JosorioData It's the id column that isn't unpacked. Added a pull request #81 to handle the error.

JosorioData commented 1 year ago

Could you tell us when this pull request would be available?

Thank you So Much!

I Need this for a project

hugodemenez commented 1 year ago

@JosorioData I have no idea, it appears that this project isn't alive. If you want to work with it, you can modify the lib directly (there is just one string to add)

In the file pykrakenapi.py Line 764, just add , 'id' at the end

Hope that helps

JosorioData commented 1 year ago

Im just starting, could you help me how to do that???

thanks in advance

hugodemenez commented 1 year ago

@JosorioData Of course I can... but it might be a bit complicated here.

JosorioData commented 1 year ago

Could you tell me your email? so i cand send you a little nothebook

hugodemenez commented 1 year ago

@JosorioData email me at : hugo@steinprograms.com