cbpa
Project description
cbpa
Coinbase Pro Automation for making buy orders from a default bank account.
Quickstart
-
Install with pip
pip install cbpa
-
Create a Coinbase API Key, you will need to select all fields of access.
-
(Optional). Create a Discord webhook.
-
Make your config file. See the examples for more.
--- api: key: "myKey" secret: "mySecret" passphrase: "myPassphrase" url: "https://api.pro.coinbase.com" discord: webhook: https://discord.com/api/webhooks/123/abc account: auto_funding_limit: 20 fiat_currency: USD buys: - send_currency: USD send_amount: 2 receive_currency: BTC - send_currency: USD send_amount: 2 receive_currency: ETH - send_currency: USD send_amount: 2 receive_currency: DOGE
-
Make your orders!
cbpa run -f my-buys.yaml
Running cbpa
in Google Cloud Run
You can run cbpa
as a server in Google Cloud Run, which can called by Google Cloud Scheduler to automatically place buys for you each day, or on any cron schedule you like.
These steps assume you have installed and configured gcloud
already.
-
Store your buy order file as a secret in GCP.
gcloud secrets versions add my_buys --data-file=my-buys.yaml
-
Build and push your docker container to Google Cloud, and then deploy your container.
./scripts/docker-build.sh && ./scripts/docker-push.sh; SECRET_ID=my_buys ./scripts/gcloud-run-deploy.sh
-
Create an authenticated scheduler that uses an http target to hit the
buy
endpoint.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file cbpa-0.1.0.tar.gz
.
File metadata
- Download URL: cbpa-0.1.0.tar.gz
- Upload date:
- Size: 15.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.27.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6651e6747f1952307bb1bb068588b918c402349b25b07152fc02d3d68a412902 |
|
MD5 | 2532b1a9f348bcc7877c1a77bbc66034 |
|
BLAKE2b-256 | c0c9c5f7950ad0b207f7315f86626bfb3b45358b3f456f3561bf468784e89766 |
File details
Details for the file cbpa-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: cbpa-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.27.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f570466f4be0620207a29fb732c81e1c2a6378bbc9b2333a982d53c7a5aa626d |
|
MD5 | e99f1c5a8d3e6572efe75deedb7a8dd6 |
|
BLAKE2b-256 | 416a44fa443d17cd94e2096f2f81146bdc8ab637a8d134678a94a565e22628d7 |