์๋ ํ์ธ์,
๋ด ์ฝ๋๋ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
import ccxt
hitbtc = ccxt.hitbtc({
"apiKey": "key",
"secret": "secret",
"verbose": True,
})
print(hitbtc.create_market_sell_order('BTC/USD', 0.01))
ccxt ์คํจ...
PS Key & nonce๋ ๊ด์ฐฎ์ต๋๋ค. ์๋ฅผ ๋ค์ด ์์ก ๋ฐ์ดํฐ๋ฅผ ๊ฐ์ ธ์ฌ ์ ์์ต๋๋ค.
์๋
ํ์ธ์ @Fcl69์
๋๋ค!
์กฐ๊ธ ์์ ํด์ ์ฌ๋ ธ๋๋ฐ.. ๋ค์ ํด๋ณด๊ณ ์ ๋ณด ๋ถํ๋๋ ค๋ ๋ ๊น์? ์ด์ ์๋ํด์ผ ํฉ๋๋ค.
๊ฑด๋ฐฐ!
๊ทธ๊ฒ์ ํจ๊ณผ๊ฐ ์์๋ค! ๊ฐ์ฌํฉ๋๋ค!
@Fcl69 ์๊ฒ ์ต๋๋ค . ํ์ง๋ง ์กฐ๊ธ ๋ ์์ธํ ๋ด์ฉ์ด ์์ต๋๋ค.
timeInForce
์ฃผ๋ฌธ ๋งค๊ฐ๋ณ์๊ฐ ์์ต๋๋ค. ์ด๋ ์ฃผ๋ฌธ ์คํ์ ์ ์ดํ๋ โโ์ค์ ์
๋๋ค(HitBTC๊ฐ ์ฃผ๋ฌธ์ ์ฒ๋ฆฌํ๊ณ ์ฑ์ฐ๋ ๋ฐฉ๋ฒ):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
HitBTC ๋ฐ ccxt์ ์ง์ ๊ฐ ์ฃผ๋ฌธ์ ๋ํ ๊ธฐ๋ณธ ์คํ ์ ํ์ GTC์ ๋๋ค.
์์ฅ ์ฃผ๋ฌธ์ ๊ฒฝ์ฐ HitBTC๋ IOC ๋๋ FOK๋ง ํ์ฉํฉ๋๋ค. HitBTC ๋ฐ ccxt์ ๊ธฐ๋ณธ๊ฐ์ FOK์
๋๋ค.
IOC ์คํ์ด ํ์ํ ๊ฒฝ์ฐ ๋ค์๊ณผ ๊ฐ์ด ์ฃผ๋ฌธ๊ณผ ํจ๊ป ์ถ๊ฐ ๋งค๊ฐ๋ณ์๋ก ์ ๋ฌํด์ผ ํฉ๋๋ค.
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' })
์ง๋ฌธ์ด๋ ์ด๋ ค์ด ์ ์ด ์์ผ๋ฉด ์๋ ค์ฃผ์ธ์. ๊ณ ๋ง์!
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
@Fcl69 ์๊ฒ ์ต๋๋ค . ํ์ง๋ง ์กฐ๊ธ ๋ ์์ธํ ๋ด์ฉ์ด ์์ต๋๋ค.
timeInForce
์ฃผ๋ฌธ ๋งค๊ฐ๋ณ์๊ฐ ์์ต๋๋ค. ์ด๋ ์ฃผ๋ฌธ ์คํ์ ์ ์ดํ๋ โโ์ค์ ์ ๋๋ค(HitBTC๊ฐ ์ฃผ๋ฌธ์ ์ฒ๋ฆฌํ๊ณ ์ฑ์ฐ๋ ๋ฐฉ๋ฒ):HitBTC ๋ฐ ccxt์ ์ง์ ๊ฐ ์ฃผ๋ฌธ์ ๋ํ ๊ธฐ๋ณธ ์คํ ์ ํ์ GTC์ ๋๋ค.
์์ฅ ์ฃผ๋ฌธ์ ๊ฒฝ์ฐ HitBTC๋ IOC ๋๋ FOK๋ง ํ์ฉํฉ๋๋ค. HitBTC ๋ฐ ccxt์ ๊ธฐ๋ณธ๊ฐ์ FOK์ ๋๋ค.
IOC ์คํ์ด ํ์ํ ๊ฒฝ์ฐ ๋ค์๊ณผ ๊ฐ์ด ์ฃผ๋ฌธ๊ณผ ํจ๊ป ์ถ๊ฐ ๋งค๊ฐ๋ณ์๋ก ์ ๋ฌํด์ผ ํฉ๋๋ค.
์ง๋ฌธ์ด๋ ์ด๋ ค์ด ์ ์ด ์์ผ๋ฉด ์๋ ค์ฃผ์ธ์. ๊ณ ๋ง์!