MelonBarPlayground
is a package for testing things out to learn or just to have fun.
All example modules will be defined in com.melonbar.playground.module.*
.
Currently, all testing must be done in a hacky fashion via modifying the main method in
Playground.java
(the entrypoint), re-compiling, then running.
NOTE: given that this package's purpose is experimentation, please protect your API credentials and don't put any amount of money you're willing to lose on the line
- To communicate via the HTTPS endpoint, API credentials are required for authentication
- Create an API key on the Coinbase Pro API page
- You may skip everything if you only intend to use the websocket feed (meaning no orders may be placed)
- Create
credentials.properties
insrc/main/resources
folder - Define fields:
api_key
,api_password
, andapi_secret_key
, which you got from the Coinbase Pro website
credentials.properties
should be ignored by default from .gitignore
, but always double-check to make sure no
sensitive information is being pushed.
- Want to use an existing module?
- Import any custom or pre-existing extension of
com.melonbar.playground.module.AbstractModule
and invokerun()
- Import any custom or pre-existing extension of
- Want to create a custom module?
- Create your new module under
com.melonbar.playground.module.<MODULE_NAME>
- Extend
AbstractModule
, and implement methodsrun()
andinit()
init()
is invoked once per instance during initialization
- Import your custom module to executable code and invoke via
run()
- Create your new module under