🤖 Sample Veil Tradebot
A sample tradebot for market making on Veil.
⚠️Disclaimer: This tradebot is for demonstration purposes only. We do not recommend running it in production without changing the trade logic. These strategies are intentionally naive for educational purposes.
Download the code and then run:
yarn install yarn build
Download Yarn if you do not already have it.
Then add a file called
.env to the root of the directory with these entries:
MNEMONIC="apple glue ..." ADDRESS="0x..." ETHEREUM_HTTP="https://kovan.infura.io" // or https://mainnet.infura.io API_URL="https://api.kovan.veil.co" // or https://api.veil.co
These scripts make heavy use of Veil's API and Veil.js, Veil's Typescript library. We also recommend reading our Guide to Augur Economics, which includes details about pricing and payouts of binary and scalar markets.
Run simple scalar tradebot
node dist/index.js simple-scalar <market slug> --spread 0.05 --amount 1
simple-scalar command has two options:
-s, --spread <spread>Specify the desired spread between 0 and 1. The default is
-a, --amount <amount>Specify the desired order amount of shares. The default is
simple-scalar tradebot looks up the current spot price from the market's data feed and makes orders at the specified spread around that price. Review the simple-scalar code.
Run simple binary tradebot
node dist/index.js simple-binary <market slug> --spread 0.1 --amount 2
simple-binary command has the same two options as
sample-scalar. See above.
simple-binary tradebot makes orders at the specified spread around a hard-coded price. Review the simple-binary code.
Run many market makers at once
node dist/index.js bulk --spread 0.06 --amount 0.5
bulk command pulls all open markets from Veil's API and attempts to market make in them all based on their type (i.e.
scalar). Review the code.