Coinbase Advanced Trade API Tutorial | Official Python SDK

preview_player
Показать описание
In this video I show you how to get started with the official Coinbase Advanced Trade Python SDK. This SDK is maintained by Coinbase with all the latest features of Coinbase Advanced Trade. Later this summer I’ll be integrating this SDK with my Python wrapper so that we get all the updates from Coinbase for free and we get to keep all the trading strategy work that we’ve already built out for fear and greed buys, the Alphasquared API, and maybe other indicators in the future from places like Glassnode.

Code we executed in this video:
from json import dumps

###Replace with your own API Keys

api_key = "organizations/{org_id}/apiKeys/{key_id}"
api_secret = "-----BEGIN EC PRIVATE KEY-----\nYOUR PRIVATE KEY\n-----END EC PRIVATE KEY-----\n"

client = RESTClient(api_key=api_key, api_secret=api_secret)

###Get account balances

print(dumps(accounts, indent=2))

###Place a buy order for $1 of BTC-USDC

print(dumps(order, indent=2))

0:00 Coinbase Advanced Trade SDK
1:15 Installing the SDK
1:50 Authenticate with Coinbase
7:47 Making Buy Orders
10:08 Advanced Features
11:34 Trading Bots
Рекомендации по теме
Комментарии
Автор

The tip for Cursor alone was incredibly helpful and has already saved me so much time, thank you

amcd
Автор

Thank you so much for this video and your channel! I had an entire existential crisis trying to understand all of this without any real prior coding knowledge. Cursor was what helped me understand what I was refusing to understand with your tutorials (I have a learning disability I have grappled with my whole life) and now I am starting to see the other side of the veil. I believe in you overcoming the laziness! I've had to do the same thing. Learning about making automated systems has been the newest exciting endeavor in trying to improve the quality of my life, so thank you for being so helpful and informative.

xGreenGhostx
Автор

thanks! I wonder if I could make long/short position with coinvase api

okfeels
Автор

Hey! Awesome video! Tip: if you set client_order_id=None, it automatically sets the orderId for you!

NathanLedford-ww
Автор

i am having alot of trouble getting my api key setup it saying pretty much my key isn't structured correctly I spent 10 hrs straight going through it and i still can't figure this out.
I am using chat gpt but it can't figure out the issue either at first it was the base url which i still don't know if it is right now we have made so many changes i feel like we are more lost now then we were smh

socrayestocks
Автор

Would love to see a video where you stream and store price data for btc or ether and automate a strategy to a run at certain time of day based on something like a 20 day moving average (for example). Thanks for the videos!

mikez
Автор

I'm almost done building a GUI for this, adding a GPT agent to help with tech analysis and executing

MrTreraygibson
Автор

Hi, thank you for making this great video. Could you please make a video on installing and integrating your pyton wraper with a cloud server (like Heroku) and how to integrate strategy software like TradingView and TrendSpider via webhooks with the official Coinbase Advanced Trade Python SDK? Thank you.

TEDDY-hrif
Автор

Great video Rhett! Will it be possible with this new SDK to use the PINE scripting language in Tradingview to trigger trades in Coinbase Pro maybe using the Websocket API client?

JB-gxrt
Автор

Super interested in WebSocket implementation

Technomic-o
Автор

it looks like order id isnt a bug, but a feature to make sure not to execute a bunch of the same intended transactions. Could use a UUID or even a timestamp

kwhseus
Автор

I have been trying to locate Coinbase aggregate trades thru market data API.. would u kindly point me to the right direction?

I kinda need the filled orders over an interval or some transaction volume with executed prices from Coinbase to test out some project work..

RealRick
Автор

Great video!
I get this error when running your script

TypeError: Object of type ListAccountsResponse is not JSON serializable

It's from this line - print(dumps(accounts, indent=2))

Any idea for a fix please?

nabeel
Автор

is there any point in using coinbase for automated trades? the taker fees for a buy+sell are an outrageous 1.2%, so you have to move up 1.2% just for a break even trade. If you need multiple percent moves then you need to be trading on the daily chart. and I don't see why you would automate that rather than just click "buy" then click "sell" a few days later

IAGIC
Автор

Hey man need yo help How do i get a Passphrase? new to this api stuff

Navii-Grewall
Автор

Would you help me code my own strategy to automate on coinbase. I have no knowledge of python😅🙏🏾

whytelyon
Автор

Great video thanks! I checkedd all the keys but I am keep getting a 401 error can someone helped me? I sync the time as I read it could be a timestamp issue

ifalu
Автор

great video, next time could you please integrate coin base api to a telegram bot that sell digital goods?

nbsc
Автор

does this still work? I'm having jet issues?

TheApolloBlu
Автор

Error fetching portfolio: 401 - Unauthorized

SSpritual
visit shbcf.ru