Ccxt: HitBTC-Markt-Kauf-/Verkaufsauftrag schlägt fehl

Erstellt am 12. Okt. 2017  ·  3Kommentare  ·  Quelle: ccxt/ccxt

Hi,

hier ist mein Code:

import ccxt
hitbtc = ccxt.hitbtc({
    "apiKey": "key",
    "secret": "secret",
    "verbose": True,
})
print(hitbtc.create_market_sell_order('BTC/USD', 0.01))

CCXT schlägt fehl...

PS Key & Nonce ist in Ordnung, ich kann zum Beispiel Kontostandsdaten abrufen.

Hilfreichster Kommentar

@Fcl69 ok, aber bitte

  1. HitBTC hat einen timeInForce Auftragsparameter, das ist eine Einstellung, die die Ausführung des Auftrags steuert (wie HitBTC den Auftrag behandeln und ausführen soll):
GTC (Good-Til-Canceled): the order will stay open or partially closed until filled or canceled by user
IOC (Immediate-Or-Cancel): the order will either fill immediately or will be canceled automatically
FOK (Fill-Or-Kill): the order will either be filled entirely or will expire
DAY (Day): the order will either be filled in 24 hours or will expire
GTD (Good Till Date): the order will expire on specific date
  1. Die Standardausführungsart für Limit-Orders in HitBTC und ccxt ist GTC.

  2. Für Marktaufträge erlaubt HitBTC nur IOC oder FOK. Die Standardeinstellung in HitBTC und ccxt ist FOK.
    Wenn Sie eine IOC-Ausführung benötigen, sollten Sie dies als zusätzlichen Parameter mit Ihrer Bestellung übergeben, wie folgt:

hitbtc.create_market_sell_order('BTC/USD', 0.01) # default
hitbtc.create_market_sell_order('BTC/USD', 0.01, { 'timeInForce': 'FOK' }) # default
hitbtc.create_market_buy_order('BTC/USD', 0.01, { 'timeInForce': 'IOC' })

hitbtc.create_limit_sell_order('BTC/USD', 0.01) # default
hitbtc.create_limit_sell_order('BTC/USD', 0.01, { 'timeInForce': 'GTC' }) # default
hitbtc.create_limit_buy_order('BTC/USD', 0.01, { 'timeInForce': 'IOC' })

Lassen Sie uns wissen, wenn Sie noch Fragen oder Schwierigkeiten haben. Danke!

Alle 3 Kommentare

Hallo @Fcl69!
Ich habe eine leicht bearbeitete Version davon hochgeladen... kannst du es bitte noch einmal versuchen und berichten? Es sollte jetzt funktionieren.
Danke schön!

Es hat funktioniert! Dankeschön!

@Fcl69 ok, aber bitte

  1. HitBTC hat einen timeInForce Auftragsparameter, das ist eine Einstellung, die die Ausführung des Auftrags steuert (wie HitBTC den Auftrag behandeln und ausführen soll):
GTC (Good-Til-Canceled): the order will stay open or partially closed until filled or canceled by user
IOC (Immediate-Or-Cancel): the order will either fill immediately or will be canceled automatically
FOK (Fill-Or-Kill): the order will either be filled entirely or will expire
DAY (Day): the order will either be filled in 24 hours or will expire
GTD (Good Till Date): the order will expire on specific date
  1. Die Standardausführungsart für Limit-Orders in HitBTC und ccxt ist GTC.

  2. Für Marktaufträge erlaubt HitBTC nur IOC oder FOK. Die Standardeinstellung in HitBTC und ccxt ist FOK.
    Wenn Sie eine IOC-Ausführung benötigen, sollten Sie dies als zusätzlichen Parameter mit Ihrer Bestellung übergeben, wie folgt:

hitbtc.create_market_sell_order('BTC/USD', 0.01) # default
hitbtc.create_market_sell_order('BTC/USD', 0.01, { 'timeInForce': 'FOK' }) # default
hitbtc.create_market_buy_order('BTC/USD', 0.01, { 'timeInForce': 'IOC' })

hitbtc.create_limit_sell_order('BTC/USD', 0.01) # default
hitbtc.create_limit_sell_order('BTC/USD', 0.01, { 'timeInForce': 'GTC' }) # default
hitbtc.create_limit_buy_order('BTC/USD', 0.01, { 'timeInForce': 'IOC' })

Lassen Sie uns wissen, wenn Sie noch Fragen oder Schwierigkeiten haben. Danke!

War diese Seite hilfreich?
0 / 5 - 0 Bewertungen

Verwandte Themen

sajjadhbutt2 picture sajjadhbutt2  ·  3Kommentare

kumboo picture kumboo  ·  3Kommentare

jjhesk picture jjhesk  ·  3Kommentare

forexhill picture forexhill  ·  3Kommentare

jjhesk picture jjhesk  ·  3Kommentare