Access the Steem Dex With Python
The internal Dex of Steem can be accessed via steem python see the read the docs. Here is a very basic example below:
https://steem.readthedocs.io/en/latest/tools.html#dex
#!/usr/bin/env python3
#-*- coding: utf-8 -*-
import os
from steem import Steem
#from steem.account import Account
#from steem.post import Post
from steem.dex import Dex
STEEM_KEY = os.getenv('STEEM_KEY') # You can use a
s = Steem(keys = [STEEM_KEY])
#dex = Dex(BOT_ACCOUNT, steemd_instance=s)
dex_t = Dex(steemd_instance=s)
buy_sell_dex_exchange_history = dex_t.market_history(bucket_seconds=300,start_age=3600,end_age=0)
print(buy_sell_dex_exchange_history)
This looks much better in VSCode:
Run the below example:
venv) $ export STEEM_KEY="INSERT WIF KEY HERE"
venv) $ python3 -Wd dex.py
Here are two articles on the Steem Dex that might interest you:
https://steemit.com/steemit/@rvanstel/two-weeks-of-trading-on-the-steemit-internal-market-let-s-see-how-i-ve-done
https://steemit.com/steemit/@rvanstel/why-you-should-trade-on-the-steemit-internal-market
Ending Credits:
Pic from here:
https://www.reddit.com/r/binance/comments/6zrprt/binance_a_decentralised_exchange/
Congratulations,
you just received a 31.11% upvote from @steemhq - Community Bot!
Wanna join and receive free upvotes yourself?
Vote for
steemhq.witness
on Steemit or directly on SteemConnect and join the Community Witness.This service was brought to you by SteemHQ.com