Trading crypto assets the old-fashioned way, bro! (aka by yelling over the phone at some rando)
Call +1 (909) 787-BRO8 to try it out. Note: No real ETH or BTC is being traded on this number (and I disabled the phone number security check). It's just to try out the interface.
At the prompt, tell it to "BUY BUY BUY" or "Sell right now!"
You can say any phrase you want as long as they include a command word:
BUY
- will buy cryptoSELL
- will sell cryptowait
orhold
- will wait three seconds before next prompt
If you don't give a command after two seconds, the call will end. GOTTA BE FAST, BRO
Before getting started, you need the following setup:
- Google Cloud Functions
- A Twilio account with a phone number capable of receiving calls
- A GDAX account with an API key setup
Create a file in the root directory called .env
You'll need to add the following config options:
CLOUD_ROOT
- the root URL for your cloud function project- Example:
https://us-central1-MY-DOPE-PROJECT.cloudfunctions.net/
- Example:
GDAX_API_KEY
- The GDAX API KeyGDAX_PASS_PHRASE
- The passphrase that was used to create your GDAX API keyGDAX_API_SECRET
- Your GDAX API key secretTRADE_PRODUCT_ID
- What you're trading. Can beETH-USD
orBTC-USD
TRADE_USD_COST
- The amount of USD that will be sold/bought for each tradeOWNER_PHONE
- Telephone number of the owner (to prevent unathorized trades)
Next, you'll need to deploy both of the cloud functions. That'll look something like this:
gcloud beta functions deploy hello --entry-point hello --stage-bucket <YOUR CLOUD BUCKET HERE> --trigger-http
gcloud beta functions deploy command --entry-point command --stage-bucket <YOUR CLOUD BUCKET HERE> --trigger-http
Then, when both functions are done deploying, paste the URL for the "hello" function you just deployed into the Configure settings for your Twilio number
You're good to go!
- Tests
- Specify amounts during trades (Ex: BUY 100!)
- Finish up text messaging and refactor (Currently located on
messaging
branch) - Have some error messages if stuff goes wrong