Running it yourself
To use the Advanced Trade Go SDK, initialize the Credentials struct and create a new client. The Credentials struct is JSON enabled. Ensure that Advanced Trade API credentials are stored in a secure manner.
There are convenience functions to read the credentials as an environment variable (ReadEnvCredentials) and to deserialize the JSON structure (UnmarshalCredentials) if pulled from a different source. The easiest way to initialize the environment variable is by setting it with the following command:
export ADV_CREDENTIALS='{ "accessKey":"", "privatePemKey":"" }'
Coinbase Advanced Trade API credentials can be created in the Coinbase Developer Platform.
Once the client is initialized, make the desired call. For example, to list portfolios, pass in the request object, check for an error, and if nil, process the response.
response, err := client.ListPortfolios(ctx, &adv.ListPortfoliosRequest{})
The Advanced Trade Go SDK is a powerful tool for developers looking to integrate advanced trading functionalities into their applications. By abstracting the complexities of the Advanced Trade API and providing a clear and consistent interface, the SDK simplifies the development process and accelerates time to market. Whether you are building a trading bot, a portfolio management system, or a custom trading platform, the Advanced Trade Go SDK provides the tools and flexibility you need to succeed.
Help us build better for you.
Advanced Trade GO SDK is made possible through the continued partnership and feedback from our developers. Please take a moment to tell us how we can better help you by providing feedback via our discord channel. You can also continue learning about Advanced Trade API in our technical documentation. Please come find us and other developers on Advanced Trade channel on Discord or on X ( @shubhashriM, @rfffjy), if you need assistance.
- -
Disclaimer: This application should never be used in any production environment, and any real funds used in this application may be lost. Additionally, this information is provided for informational purposes only and is not investment advice. This is not a recommendation to buy or sell digital assets or to employ a particular investment strategy, codes, or APIs. Coinbase makes no representation on the accuracy, suitability, or validity of any information provided herein.
This material is for informational purposes only and is not (i) an offer, or solicitation of an offer, to invest in, or to buy or sell, any interests or shares, or to participate in any investment or trading strategy, or (ii) intended to provide accounting, legal, or tax advice, or investment recommendations. No representation or warranty is made, expressed or implied, with respect to the accuracy or completeness of the information or to the future performance of any digital asset, financial instrument or other market or economic measure. The information is believed to be current as of the date indicated and may not be updated or otherwise revised to reflect information that subsequently became available or a change in circumstances after the date of publication. Investing in cryptocurrency comes with risk. Prior results do not guarantee future performance. Readers should consult their advisors before making any investment decision. Any references to third parties do not imply Coinbase's endorsement, or approval of any third-party websites or their content. This material is the property of Coinbase, Inc. Any use, review, retransmission, distribution, or reproduction of these materials, in whole or in part, is strictly prohibited in any form without the express written approval of Coinbase. Coinbase, Inc. is licensed to engage in virtual currency business activity by the New York State Department of Financial Services. © 2024 Coinbase, Inc. All Rights Reserved. COINBASE, the C Logo, and the Wallet Logo are all trademarks of Coinbase, Inc.