- Create a single github account with a public repository for each team and or individual if you are not with a team
- Install git on your local machine
- Install docker on your locak machine (Optional)
- Clone this repo
git clone https://github.com/TradeBlock/tb-hackathon.git - install python version 3.10 on your local development environment.
- run
pip install -r requirements.txtin directory you cloned - create .env file # for AWS credentials
- Create the environment with
python3.10 -m venv .venv - Activate the environment before step 8 in Technical Setup with
source .venv/bin/activate - Continue with step 8 in Technical Setup
- To be RELEASED Thurs. 2/17/22
- Data will be available for bulk download in .csv files
- Data also can be easily downloaded into your program one row at a time in main.py
- Row data will be formatted as follows:
- pair, price, amount, timestamp
- pair: EXCHANGE-CRYPTO-usd where EXCHANGE is a specific exchange where the trade happened and CRYPTO is either bitcoin (xbt) or ethereum (eth)
- price: price in dollars of the trade
- amount: number of units which is either bitcoins or ethereum contracts
- timestamp: is seconds since epoch and can be used in python via
datetime.datetime.fromtimestamp(TIMESTAMP) - Sample rows are:
okfq-xbt-usd,14682.26,2,1514765115okf1-xbt-usd,13793.65,2,1514765115stmp-xbt-usd,13789.01,0.00152381,1514765115
{
“price”: decimal.Decimal, # fill price
“volume”: decimal.Decimal, # fill volume
“error_code”: str # Optional. “rejected”
“error_msg”: str # Optional. description of error
“unfilled”: dict[str, Decimal] # unfilled portion of trades (xbt,eth)
}
{
“xbt”: decimal.Decimal, # unfilled xbt volume
“eth”: decimal.Decimal, # unfilled eth volume
}
When an error occurs with your attempted trade, you will receive an empty fill dictionary and the unfilled trades dictionary—this may be caused by:
- Insufficient funds
- Yielded a type other than Trade or None; or
- Invalid base currency in yielded Trade