Toon posts:

python 3.xx Dictionary positie probleem

Pagina: 1
Acties:

Onderwerpen

Vraag


Verwijderd

Topicstarter
Heb het volgende nestje ( dictionary)

De eerste OrderUuid kan ik bereiken met :
code:
1
orders = my_bittrex.get_open_orders('BTC-XRP')['result'][0]['OrderUuid']


Maar de 2e lukt mij niet. Alvast weer dank.

code:
1
{'message': '', 'success': True, 'result': [{'OrderUuid': '33b5d6a1-4d3b-43e7-b43c-2a9a83d07a5c', 'CommissionPaid': 0.0, 'OrderType': 'LIMIT_SELL', 'ImmediateOrCancel': False, 'Limit': 2.199e-05, 'IsConditional': False, 'Price': 0.0, 'PricePerUnit': None, 'CancelInitiated': False, 'Closed': None, 'Opened': '2017-12-03T16:24:26.09', 'Uuid': None, 'Exchange': 'BTC-XRP', 'QuantityRemaining': 25.0, 'ConditionTarget': None, 'Quantity': 25.0, 'Condition': 'NONE'}, {'OrderUuid': '091f3f25-3b86-4061-b73b-3eae35e48791', 'CommissionPaid': 0.0, 'OrderType': 'LIMIT_SELL', 'ImmediateOrCancel': False, 'Limit': 2.188e-05, 'IsConditional': False, 'Price': 0.0, 'PricePerUnit': None, 'CancelInitiated': False, 'Closed': None, 'Opened': '2017-12-03T16:39:02.627', 'Uuid': None, 'Exchange': 'BTC-XRP', 'QuantityRemaining': 25.0, 'ConditionTarget': None, 'Quantity': 25.0, 'Condition': 'NONE'}]}

Beste antwoord (via Verwijderd op 03-12-2017 23:13)


  • Jaap-Jan
  • Registratie: Februari 2001
  • Laatst online: 00:47
Python:
1
orders = my_bittrex.get_open_orders('BTC-XRP')['result'][1]['OrderUuid']


:?

| Last.fm | "Mr Bent liked counting. You could trust numbers, except perhaps for pi, but he was working on that in his spare time and it was bound to give in sooner or later." -Terry Pratchett

Alle reacties


Verwijderd

Geen dank

Acties:
  • Beste antwoord

  • Jaap-Jan
  • Registratie: Februari 2001
  • Laatst online: 00:47
Python:
1
orders = my_bittrex.get_open_orders('BTC-XRP')['result'][1]['OrderUuid']


:?

| Last.fm | "Mr Bent liked counting. You could trust numbers, except perhaps for pi, but he was working on that in his spare time and it was bound to give in sooner or later." -Terry Pratchett


Verwijderd

Topicstarter
Dank, kwam er nu ook achter, vreemd eerste wat ik probeerde en werkte niet.
Even wat list documentatie door worstelen.

Maar nu weet ik zeker dat ik op de goede weg zit, THX