You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My strategies have become so bulky and interdependent that testing new code by simply starting goxtool is proving impractical. I would like to instantiate a BaseClient so that I may import goxapi and my strategy into a unittest and then access my strategy and goxapi class functions:
So far I have:
import unittest
import goxapi
import mystrategy
#construct a minimal API client
config = goxapi.GoxConfig("goxtool.ini")
secret = goxapi.Secret(config)
client = goxapi.BaseClient('BTC','USD',secret,config)
This way of instantiating throws an exception as soon as the Strategy init() is executed since the various slots and signals have not been called or created yet.
Am I doing this right and optimally? Is there a 'lighter' instantiation process I could use? My objective is simply to access the Strategy functions and it is not necessary to have all of the 'moving parts' such as http socket and signals functioning. Is there a way of doing this?
The text was updated successfully, but these errors were encountered:
My strategies have become so bulky and interdependent that testing new code by simply starting goxtool is proving impractical. I would like to instantiate a BaseClient so that I may import goxapi and my strategy into a unittest and then access my strategy and goxapi class functions:
So far I have:
Then I create the client instance:
This way of instantiating throws an exception as soon as the Strategy init() is executed since the various slots and signals have not been called or created yet.
Am I doing this right and optimally? Is there a 'lighter' instantiation process I could use? My objective is simply to access the Strategy functions and it is not necessary to have all of the 'moving parts' such as http socket and signals functioning. Is there a way of doing this?
The text was updated successfully, but these errors were encountered: