coinbase | command line tool for querying , buying and selling bitcoin | Cryptocurrency library
kandi X-RAY | coinbase Summary
kandi X-RAY | coinbase Summary
Version 2.0 • Coinbase has changed its API Authentication method recently, so there should be an update. Support functionalities in the command line environment: • Querying one's BTC balance in the coinbase.com • Querying current exchange rates of BTC to USD and to CNY, respectively. • Querying current buy price and sell price in the coinbase.com • Buying bitcoin through command line • Selling bitcoin through command line • A simple shell-like terminal that support all the above functionalities. Usage: $ ./main.py Please Note that you need to replace the api_key in the Coinbase.py file. TODO: • Re-factor the code, use the config file instead of hard code. • Multithreaded environment? • Making alerts to users when coinbase price drops below or rises up higher than the limit set by user. • Auto-trade algorithm. Would you like to tip me some bitcoin? 1B5jqRvn3CJBb5KVxSRxa4zXxqUU92ZFzT.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of coinbase
coinbase Key Features
coinbase Examples and Code Snippets
Community Discussions
Trending Discussions on coinbase
QUESTION
I want to know all my accounts by coinbase api endpoint so following this link: https://developers.coinbase.com/api/v2?shell#list-accounts i have done this:
...ANSWER
Answered 2022-Apr-01 at 13:58I have changed my signature function to this:
QUESTION
Does anyone know what before
and after
in Coinbase Pro's trades api (url here) correspond to? I have tried linux epoch but that didn't work.
ANSWER
Answered 2022-Mar-29 at 06:29In all honesty, I automatically assumed the before
& after
parameters were intended to be epoch timestamps like you. After reading back through the exchange/cloud docs I realize it's actually a method to incorporate cursor pagination sending REST API requests to the Coinbase API.
Cursor pagination is the most efficient way of navigating through large amounts of ordered data one chunk at a time. When you consider how many real-time data points and historical data point Coinbase possesses, it makes sense why you would only want to get the small amount of data that's relevant to you or the user at any given time.
Here is what the docs say about pagination when using their API:
Coinbase Exchange uses cursor pagination for all REST requests which return arrays.
Cursor pagination allows for fetching results before and after the current page of results and is well suited for realtime data. Endpoints like
/trades
,/fills
,/orders
, return the latest items by default. To retrieve more results subsequent requests should specify which direction to paginate based on the data previously returned.
I suggest you take a quick look at the page in the docs that is dedicated to cursor pagination. It offer a concise explanation of a somewhat complex topic.
QUESTION
I have a custom view controller class which presents an alert controller when it receives a not connected notification from my network services class. I want to dismiss the alert controller when I receive a further connected notification from the network services class but I am unable to dismiss the presenting alert.
Here is my custom view controller class;
...ANSWER
Answered 2022-Mar-28 at 16:57You could do a check if the currently presented UIViewController
is actually the alertController
like this:
QUESTION
Im using Jupyter Notebook to run a fairly basic crypto trading bot with an API on coinbase and after an arbitrary amount of time, sometimes 6 hours other times 18 hours, the code will error and stop working.. can has anyone had this problem or are able to determine the problem from the error script produced. error code given below..
...ANSWER
Answered 2022-Mar-16 at 06:16I don't know if it crashes because the internet connection. But if you want check if you have a internet cnnection you could ping a server for example 8.8.8.8
(Google DNS Server). If the command returns 0 it was sucesfull if it returns 1 it failed.
QUESTION
I am going to work on a project in which we want to build a bitcoin wallet, like for example mycelium, coinbase etc, but I have no knowledge of which apis we should use to connect directly to the bitcoin blockchain 1could you give me recommendations for documentation on this. Thanks
...ANSWER
Answered 2022-Mar-14 at 14:39This way you will understand how you can create an app (wallet) that generates Bitcoin addresses.
Wallet and public address are different things: a wallet is an application that creates and stores private keys and makes the public key available as the crypto address where the coins will be received.
Note that the steps are incremental. The next step always has the copy of the previous step.
QUESTION
I'm trying to check if my webhook works, and will implement it. So that I can receive notification when charge is confirmed (charge:confirmed)
So I created php code to check my webhook,
...ANSWER
Answered 2022-Mar-06 at 05:21I was able to solve this,
Just in case you are here. Please create an API Endpoint on your project using POST
method with
X-Cc-Webhook-Signature
equivalent to your Shared API Secret Key
User-Agent
currently I'm using weipay-webhooks
(as per documentation)
and submit your json data for checkout
On my end I used postman to test my api end point.
Your PHP Code must accept X-Cc-Webhook-Signature
and automatically the coinbase commerce will use your webhook link when someone purchased.
QUESTION
What I am trying to do is to parse nested json data into a Java object using Gson and print it out with customized toString().
The Json Content
...ANSWER
Answered 2022-Mar-05 at 16:26The issue is in these lines:
QUESTION
I found this script on tradingview.com when they announced "Our new alerts allow for dynamic messages." The script is supposed to trigger an alert when RSI is overbought or oversold. The problem is it does not work as intended. The alert is triggered by the RSI for which symbol you added. It appears to select at random the symbols in the symbol list at the bottom of the script. The RSI data along with the script is also Incorrect as it is sending the RSI of the symbol you originally added the study to, not the RSI of the symbol list.
Here's the alert text to show nn example of the error:
"NASDAQ:AMD, 1: RSI (50.5282994084) crossing up 70 level" alert() with multiple symbols: any (alert) function call Active NASDAQ:AMD, 1m" This doesn't make sense since the RSI of AMD did not cross over 70 at the time the alert was triggered and it shows the RSI was 50, but it wasn't even 50 at the time of the alert it was under 30.
I tried moving the "_r = rsi (close, 7)" under the "[_co, _cu]..." line, but it did not work. I also tried to convert the data to strings to see if that did anything, but it didn't work. I tried converting to Pine Script v5. Also tried different symbols and crypto. Does anyone know if this function of applying an indicator/study to multiple symbols at the same time actually works? Or, perhaps I'm missing something and it's not working because of something I'm doing wrong.
Screenshot: enter image description here
Alert Log from TradingView: |Alert ID|Ticker|Name|Description|Time| |--- |--- |--- |--- |--- | |358732201|"NASDAQ:TSLA, 1m"|alert() with multiple symbols: Any alert() function call,"|=""session"":""extended"",""symbol"":""NASDAQ:TSLA""}, 1: RSI (72.6465706327) crossing up 70 level"|2021-12-23T14:49:00.000Z| |358732201,|"NASDAQ:TSLA, 1m",|alert() with multiple symbols: Any alert() function call,|"NASDAQ:CFVI, 1: RSI (72.6465706327) crossing down 30 level",|2021-12-23T14:49:00.000Z| |358732201,|"NASDAQ:TSLA, 1m",|alert() with multiple symbols: Any alert() function call,|"NASDAQ:TSLA, 1: RSI (72.6465706327) crossing up 70 level",|2021-12-23T14:49:00.000Z| |358732201|"NASDAQ:TSLA, 1m",|alert() with multiple symbols: Any alert() function call,|"BINANCE:SOLUSDT, 1: RSI (72.6465706327) crossing down 30 level",|2021-12-23T14:49:00.000Z| |358732201,|"NASDAQ:TSLA, 1m",|alert() with multiple symbols: Any alert() function call,|"COINBASE:BTCUSD, 1: RSI (69.6339491527) crossing down 30 level",|2021-12-23T14:48:00.000Z| |358732201,|"NASDAQ:TSLA, 1m",|alert() with multiple symbols: Any alert() function call,|"NYSE:PLTR, 1: RSI (69.6339491527) crossing up 70 level",|2021-12-23T14:48:00.000Z| |358732201,|"NASDAQ:TSLA, 1m",|alert() with multiple symbols: Any alert() function call,|"COINBASE:BTCUSD, 1: RSI (46.7458265403) crossing down 30 level",|2021-12-23T14:47:00.000Z| |358732201,|"NASDAQ:TSLA, 1m",|alert() with multiple symbols: Any alert() function call,|"FTX:RAYUSD, 1: RSI (46.7458265403) crossing down 30 level",|2021-12-23T14:47:00.000Z| |358732201,|"NASDAQ:TSLA, 1m",|alert() with multiple symbols: Any alert() function call,|"BINANCE:ICPUSDT, 1: RSI (44.0606617081) crossing up 70 level",|2021-12-23T14:46:00.000Z| |358732201,|"NASDAQ:TSLA, 1m",|alert() with multiple symbols: Any alert() function call,|"COINBASE:ETHUSD, 1: RSI (44.0606617081) crossing down 30 level",|2021-12-23T14:46:00.000Z| |358732201,|"NASDAQ:TSLA, 1m",|alert() with multiple symbols: Any alert() function call,|"FTX:ATLASUSD, 1: RSI (44.0606617081) crossing down 30 level",|2021-12-23T14:46:00.000Z|
The script I'm referencing is: https://www.tradingview.com/blog/en/our-new-alerts-allow-for-dynamic-messages-22588/
...ANSWER
Answered 2021-Dec-24 at 15:45In case anyone else was having the same issue and not knowledgeable enough with Pine Script (yet) to fix it themselves (such as myself), I am posting the solution. I received a reply back from TradingView support. They have been super helpful, kind and gave the updated script. They said the blog post with the error will be updated soon.
Here is the updated Pine Script for multiple symbols:
QUESTION
I'm trying to decode a json response that looks like this and get only the value for USD
...ANSWER
Answered 2022-Feb-22 at 21:54I think what you expect the array to look like and what it actually looks like are different. $json['USD']
doesn't exist, but $json['data']['rates']['USD']
does.
You can use print_r
on the array to view it:
QUESTION
I’m using VueJS3 - Typescript.
I have 1 component “Form” called 2 times in my view “FormPage”. I want to get the information of my 2 components. I try to get the information with the method document.getElementsByClassName(“key”) but the console show me only a HTMLCollection [] (length: 0). instead of an array of 2 elements.
How can I get the value of the document.getElementsByClassName(“key”) elements ?
My component:
...ANSWER
Answered 2022-Feb-20 at 18:23This is a name
not a class
:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install coinbase
You can use coinbase like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page