Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A Python app to automate buying cryptocurrency on the Coinbase Pro exchange. Runs in a Docker container for convenience.

License

NotificationsYou must be signed in to change notification settings

queball99/CoinbasePro-Recurring-Buy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Have you ever wanted to automate recurring purchases via Coinbase Pro instead of Coinbase? I did too, so I built a Bot to do it! The Bot can be setup to make recurring purchases weekly or every X number of days/seconds. Funds can be automatically added from your default funding account in Coinbase Pro or from Coinbase. Notifications about buys and funding can be sent to a Discord channel via webhook.

Built in Python and includes the following modules:
CoinbasePro byAlex Contryman
Discord byRapptz
Schedule byDan Bader

Coinbase Pro Recurring Buy Config

Theconfig.json file is where all settings come from. The Bot checks for the config file at/config/config.json when it starts up.

Example config file available here:https://github.com/queball99/CoinbasePro-Recurring-Buy/blob/main/config.example.json

To get started copy theconfig.example.json file to a folder that will be mapped to a Docker volume. Rename the file toconfig.json and edit the settings based on your needs. See Configuration Options below.

Creating a Coinbase Pro API Key
Creating a Discord Webhook

The Coinbase Pro API Key will need a minimum of 'View' and 'Trade' permissions. If you want to enable Auto-Funding you will also need to grant it 'Transfer' permissions.

Configuration File Options

SectionTypeDescriptionRequired
API
KeyStringAPI Key from Coinbase ProYes
SecretStringAPI Secret from Coinbase ProYes
PassphraseStringAPI Passphrase from Coinbase ProYes
API-URLStringCoinbase Pro API URL You can use the production or sandbox URL.
Available Options:https://api.pro.coinbase.com orhttps://api-public.sandbox.pro.coinbase.com
Yes
Schedule
Scheduled-RunStringHow often should the recurring buy be run.
Available Options:seconds,days,weekday
Yes
DayStringDay of the week to make the recurring buy.
Available Options:sunday,monday,tuesday,wednesday,thursday,friday,saturday
If Scheduled-Run is set toweekday
TimeStringThe time to make the recurring buy. Specified in 24hr time asHH:MM.If Scheduled-Run is set toweekday ordays.
Repeat-TimeIntegerDelay between runs. Will be X days or X seconds depending on if Scheduled-Run is set todays orseconds.If Scheduled-Run is set todays orseconds
Funding
Enable-FundingBooleanEnable automatic funding.
Available Options:true orfalse
Yes
CurrencyStringThe currency to fund your account with.
Examples:USD,GBP,EUR
If Enable-Funding is set totrue
Max-FundIntegerThe maximum amount of currency you want to allow the bot to fund at one time.If Enable-Funding is set totrue
Fund-SourceStringThe source to fund your Coinbase Pro account from to make the purchase.
Available Options:
default will fund from your primary Banking account in Coinbase Pro.
coinbase will transfer currency from your Coinbase portfolio.
If Enable-Funding is set totrue
Crypto
Buy-PairStringCrypto buy pair in Coinbase Pro.
Examples:BTC-USD,ETH-USD,BTC-GBP, etc.
Yes
Buy-AmountIntegerThe amount of crypto to buy, specified in your currency.
Example: Specifying20 andBTC-USD will buy 20 USD worth of BTC.
Yes
Alerts
Alert-ChannelStringEnables sending alert messages to Discord or Pushover.
Available Options:discord,pushover or leave empty for no notifications.
Yes
Discord-WebhookStringThe webhook URL you create in your Discord server.If Alert-Channel is set todiscord
Pushover-API-TokenStringPushover API Token.If Alert-Channel is set topushover
Pushover-User-KeyStringPushover user key.If Alert-Channel is set topushover

Alerts

Discord

You can have alerts about funding and buys sent to Discord via a Webhook. See thisDiscord support article for how to setup a Webhook.

Pushover

You can have alerts about funding and buys sent via the Pushover push notification service.
What is Pushover and how do I use it?

Docker Container

Supported Architectures

Architecture
x86-64

Version Tags

TagDescription
latestLatest stable release
developmentNew features will be added and tested here

Docker Compose

Compatible with docker-compose v2 schemas.

---version:"2.1"services:coinbase-pro-buy:image:queball/coinbase-pro-recurring-buycontainer_name:coinbase-pro-recurring-buyenvironment:      -TZ=America/New_Yorkvolumes:      -/path/to/folder:/configrestart:unless-stopped

Docker CLI

docker run -d \  --name=coinbase-pro-recurring-buy \  -e TZ=America/New_York \  -v /path/to/folder:/config \  --restart unless-stopped \  queball/coinbase-pro-recurring-buy

Parameters

ParameterFunction
TZSpecify a timezone to use. Default isAmerica/New_York

Updating The Container

Docker Compose

  • Update all images:docker-compose pull
    • or update a single image:docker-compose pull coinbase-pro-recurring-buy
  • Let compose update all containers as necessary:docker-compose up -d
    • or update a single container:docker-compose up -d coinbase-pro-recurring-buy
  • You can also remove the old dangling images:docker image prune

Docker Run

  • Update the image:docker pull queball/coinbase-pro-recurring-buy
  • Stop the container:docker stop coinbase-pro-recurring-buy
  • Delete the container:docker rm coinbase-pro-recurring-buy
  • Recreate a new container with the same docker run parameters from above. Your/config folder containing the config.json folder will not be changed.
  • You can remove old images with:docker image prune

Building Locally

If you want to build the container locally:

git clone https://github.com/queball99/CoinbasePro-Recurring-Buy.gitcd CoinbasePro-Recurring-Buydocker build.

About

A Python app to automate buying cryptocurrency on the Coinbase Pro exchange. Runs in a Docker container for convenience.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp