Open kempeng opened 5 years ago
While multiple keys per exchange is something I desire, the problem I haven't really solved is how do you define when to use what key? On an unauthorised error? Are we building a rule handler? Your example is for specific currency pairs which I suppose is a good start. But I'm sure there are more scenarios to consider, like API permissions: what if key A can withdraw but key B cannot?
{ "name": APIKeyName2 "key": key2 "secret": secret2, "appliesOnCurrencyPairs": ["btcusd","dogeusdt"] }
So to that end, this will likely be under consideration for awhile before it will be implemented
I was thinking along the following lines:
I am not sure I understand the use case for multiple keys per exchange. What is the benefit? If you want to have some view-only keys and some trade-enabled keys, you could have them in 2 separate config.json files (e.g. config-view.json and config-trade.json) and start GCT with the config you need at the time. I am not sure why you would want to have them at the same time. Not saying it doesn't make sense, just that I don't understand the use case :)
There's another usecase. Suppose we have several trading strategies and we want to see how they are performing. It's not very convenient to control the strategy's balance, much easier to transfer some amount to the new strategy and run it ahead. There're at least two possibilities how to achieve it:
It looks that adding support of multi-credentials inside GCT easier and is not a complex task.
If you wouldn't mind, please suggest how would you like it be implemented and I'll take care about it. Or I can prepare a POC (as simple as possible)
New Issue
Context
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.
Some Crypto Exchanges, like Kraken, provide multiple API keys/secrets. In the case of Kraken, the API keys are specific to the currency pair.
Operating System:
GoCryptoTrader version (
gocryptotrader -version
): latest versionExpected Behavior
Please describe the behavior you are expecting I propose to make a change/addition to the config.json file, by defining the following: { "name": ExchangeName .... apiKeys: [ { "name": APIKeyName1 "key": key1 "secret": secret1 }, { "name": APIKeyName2 "key": key2 "secret": secret2 } ]
Current Behavior
What is the current behavior? { name: ExchangeName .... apiKey: key apiSecret: secret }
Failure Information (for bugs)
Please help by providing information about the failure. If it is not a bug, please remove the rest of this template.
Steps to Reproduce
Please provide detailed steps for reproducing the issue.
Failure Logs
By default, GoCryptoTrader stores its
debug.log
file in%APPDATA%\GoCryptoTrader
on Windows and~/.gocryptotrader
on Linux/Unix/macOS. Raw text or a link to a pastebin type site is preferred.