Exchange crypto on coinbase
The exchange crypto on coinbase command allows you to buy or sell coins in the Coinbase market.
Before using this command, ensure that you've set up your API and security credentials for Coinbase with the config coinbase command.
Parameters
Amount: The amount of cryptocurrency to buy or sell.
Market: The market in which you want to buy or sell cryptocurrency. This consists of the symbols for two currencies separated by a dash. For example: "BTC-USD"
Buy Or Sell: The action you want to perform – either 'Buy' or 'Sell'.
Transaction Info Variable: (optional) A variable that will store information about the transaction. Default is #txinfo.
Example
ui console view config coinbase("your api key", "your api secret", "your passphrase") exchange crypto on coinbase("0.001", "BTC-USD", "Buy", "#txinfo") log object(#txinfo)
In this script, replace "your api key", "your api secret", and "your passphrase" with your actual API key, API secret, and passphrase respectively.
This script will buy 0.001 BTC (Bitcoin) from the BTC-USD market. The transaction information will be stored in a variable named #txinfo, which will then be logged to the console.
Please remember that your API key, API secret, passphrase and addresses are sensitive information. If you need to show someone your script, be sure to remove these details first.