8000 Any code samples? · Issue #4 · confessore/CoinbaseAT · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Any code samples? #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
pjsgsy opened this issue Jan 3, 2024 · 2 comments
Open

Any code samples? #4

pjsgsy opened this issue Jan 3, 2024 · 2 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@pjsgsy
Copy link
pjsgsy commented Jan 3, 2024

Hi,
Thanks for this. Are there any simple code examples demonstrating the use of the library available, to get people started? I don't see anything in the source distribution and no Wiki. I guess people may already be familiar with the API, but, my first dabble!

Thanks.

@confessore
Copy link
Owner

hi I will post some in just a moment

@confessore
Copy link
Owner
confessore commented Jan 12, 2024

here is an example of a quartz job that observes and stores a trading pair.
some custom models are being used here.

we can register the configuration and service into a net di container like so

var configuration = new CoinbaseATConfiguration(
    Environment.GetEnvironmentVariable("COINBASE_API_KEY") ?? "",
    Environment.GetEnvironmentVariable("COINBASE_API_SECRET") ?? ""
);
builder.Services.AddSingleton<ICoinbaseATConfiguration>(configuration);
builder.Services.AddSingleton<ICoinbaseATClient, CoinbaseATClient>();

https://gist.github.com/confessore/fa30403dedd9e795952f88e26db476e5

@confessore confessore self-assigned this Jan 12, 2024
@confessore confessore added documentation Improvements or additions to documentation enhancement New feature or request labels Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants
0