Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
zaifbotのlt
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
英 谷口
May 07, 2017
170
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
zaifbotのlt
英 谷口
May 07, 2017
More Decks by 英 谷口
See All by 英 谷口
plasma.pdf
akira_taniguchi
1
710
pycon mini osaka 発表資料:ethereum
akira_taniguchi
1
950
How_To_ Introduce_TradingView
akira_taniguchi
1
930
OAuth2の資料
akira_taniguchi
0
4.9k
pycon2016_zaif
akira_taniguchi
0
300
pyconjp 2016 ライトニング用(未確定)
akira_taniguchi
1
270
test pdf
akira_taniguchi
0
110
PyConJP 2015 スライド資料
akira_taniguchi
0
170
Featured
See All Featured
brightonSEO & MeasureFest 2025 - Winning Strategies for Black Friday CRO & PPC - Christian Goodrich
cargoodrich
3
860
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.4k
Mobile First: as difficult as doing things right
swwweet
225
10k
Building Flexible Design Systems
yeseniaperezcruz
330
41k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
300
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
910
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8.1k
It's Worth the Effort
3n
188
29k
Are puppies a ranking factor?
jonoalderson
2
4k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
2
2.2k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.2k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
970
Transcript
Ծ௨՟ͷ औҾϥΠϒϥϦΛ ࡞ͬͯΈͨ
Ծ௨՟औҾॴɾ;BJG
ˢ ɹ͜ˠ Ε
ڥߏங
QZWFOWWFOW TPVSDFWFOWCJOBDUJWBUF WFOW QJQJOTUBMM[BJGCPU WFOW JOJU@EBUBCBTF
ѻ͑Δ௨՟ϖΞΛ औಘ͍ͨ͠
௨՟ϖΞͱʁ औҾ͢Δ௨՟ͷΈ߹Θͤ
ϏοτίΠϯ ԁ ˣ CUD@KQZ
.0/" ԁ ˣ NPOB@KQZ
from zaifbot.modules.api.cache import ZaifCurrencyPairs zaif = ZaifCurrencyPairs() print(zaif.all) #ZaifͰѻ͑Δͯ͢ͷ௨՟ϖΞใΛऔಘ
print(zaif[‘btc_jpy']) #௨՟ϖΞΛࢦఆ͢Εɺ୯ମͷใΛऔಘ >> [{‘aux_unit_step': 5.0 ʙʙʙ͍ͷͰলུʙʙʙ 'currency_pair': ‘btc_jpy'}] >> { >> 'aux_unit_step': 5.0, >> 'event_number': 0, >> 'item_unit_step': 0.0001, >> 'description': 'ϏοτίΠϯɾຊԁͷऔҾΛߦ͏͜ͱ͕Ͱ͖·͢', >> 'name': 'BTC/JPY', >> 'is_token': False, >> 'aux_unit_min': 5.0, >> 'title': 'BTC/JPY', >> 'item_unit_min': 0.0001, >> 'currency_pair': ‘btc_jpy' >> }
ऴΛऔಘ͍ͨ͠
from time import sleep from zaifbot.modules.utils import get_current_last_price print(get_current_last_price('btc_jpy'))
#औಘ͍ͨ͠currency_pairΛࢦఆ print(get_current_last_price('mona_jpy')) sleep(30) print(get_current_last_price('btc_jpy')) #ϦΞϧλΠϜͰऔಘՄೳ print(get_current_last_price('mona_jpy')) >> {'last_price': 165800.0, 'timestamp': '2017-05-02 18:17:55.322019'} >> {'last_price': 15.3, 'timestamp': '2017-05-02 18:17:56.533959’} ʙʙ30ඵޙʙʙ >> {'last_price': 165830.0, 'timestamp': '2017-05-02 18:18:26.415696'} >> {'last_price': 15.3, 'timestamp': '2017-05-02 18:18:22.328562’}
ҠಈฏۉઢΛ औಘ͍ͨ͠
Ҡಈฏۉઢͱʁ ҰఆظؒͷฏۉՁ֨Λ ʑܭࢉͯ͠ग़ͨ͠ʮ͑ʯΛ ઢͰͭͳ͍ͩͷ
ৄ͘͠Πϯϕελʔ;Ͱ
from zaifbot.moving_average import get_sma, get_ema print(get_sma()) #୯७Ҡಈฏۉઢऔಘ print(get_ema()) #ࢦҠಈฏۉઢऔಘ
>> [{'time_stamp': 1408719600, 'close': 53000.0, 'moving_average': 53410.0, 'closed': True}, {'time_stamp': 1408806000, 'close': 53900.0, 'moving_average': 54090.0, 'closed': True}] >> [{'time_stamp': 1408287600, 'close': 47001.0, 'moving_average': 50702.24516926622, 'closed': True}, {'time_stamp': 1408374000, 'close': 50500.0, 'moving_average': 50634.83011284415, 'closed': True}]
࣮ࡍʹτϨʔυ͍ͨ͠
None
from zaifbot.modules.api.wrapper import BotTradeApi key = '࡞ͨ͠key' secret
= '࡞ͨ͠secret' api = BotTradeApi(key, secret) trade_result = api.trade(currency_pair='btc_jpy', action='bid', price=180000, amount=2) print(trade_result) >> { >> "received": 0.1, >> "remains": 0, >> "order_id": 354323, >> "funds": { >> "jpy": 325, >> "btc": 1.392, >> "mona": 2600 >> } >> }
ϝϦοτ Τϥʔ࣌ࣗಈϦτϥΠ OPODFࣗಈ༩
༨ܭͳจΛࣗಈͰ Ωϟϯηϧ͍ͨ͠
DBTF ࠓ͙͢ചΓ͍ͨͷʹ จ͕ྲྀΕ͍ͯͬͯ͠·͏ DBTF ࠷ऴͱΕ͗ͯ͢ɺ ͍ͭ·Ͱͨͬͯఆ͠ͳ͍
from zaifbot.modules.api.wrapper import BotTradeApi from zaifbot.modules.api.order import AutoCancelClient
key = '࡞ͨ͠key' secret = '࡞ͨ͠secret' api = BotTradeApi(key, secret) trade_result = api.trade(currency_pair='btc_jpy', action='bid', price=180000, amount=2) order_id = trade_result['order_id'] auto_canceler = AutoCancelClient(api) # ࠷ऴஈ͔Β10000ԁΕͨΒࣗಈͰΦʔμʔऔΓফ͠ auto_canceler.cancel_by_price(order_id, 'btc_jpy', 10000) # ̍࣌ؒఆ͠ͳ͔ͬͨΒࣗಈͰΦʔμʔऔΓফ͠ auto_canceler.cancel_by_time(order_id, 'btc_jpy', 3600) # ΞΫςΟϒͳࣗಈऔΓফ͠ઃఆͷΦʔμʔҰཡ active_cancel_orders = auto_canceler.get_active_cancel_orders() for active_cancel_order in active_cancel_orders: print(active_cancel_order) >> {‘id’: ‘583hjf7whj345’, ‘cancel_type’: ‘by_time’ ʙলུʙ} # ࣗಈऔΓফ͠ΛΩϟϯηϧ auto_canceler.stop_cancel(active_cancel_orders[0]['id'])
ৄ͘͜͜͠ (JU)VCɿIUUQTHJUIVCDPNUFDICVSFBV[BJGCPU "1*υΩϡϝϯτɿ IUUQTUFDICVSFBVBQJEPDVNFOUSFBEUIFEPDTJPKB MBUFTUJOEFYIUNM
ࠓ1Z$POΓ·͢
τʔΫٴͼϙελʔืू