StrattyX has an internal scripting language that we use to represent user strategies. Via an extension operator we can call externally hosted functions. These functions can do pretty much anything and because the user's strategy is a program they can completely change the functionality.
Currently, strategies have two basic operations
realtime
: Running on a chrontimeline
: Generating backtests using historical data The extension operator uses a webhook call to the url that you set in the developer portal with a request that corresponds with the mode of operation, as well as any relevant data and arguments.
In order for your extension to fully integrate with our system you must have the following endpoints configured
- request body will include a field called
arguments
conataining a dictionary with user provided arguments- ie:
{ "arguments": { "Timezone": "UTC" } }
- ie:
- We expect the webhook to return json containing a return value
- ie:
{ "return": "Sunday", "resolutions": [] }
- ie:
- If there is a external link that would be useful in explaining the descision your extension made (ie - article link, tweet, etc.), you can include it in the "resolutions" field.
- this example isn't ideal application:
{ "return": "Sunday", "resolutions" : ["it's Sunday 2019-10-27 in timezone UTC"] }
- this example isn't ideal application:
- This extension isn't always required, however it's important for most users and will be displayed in marketplace
- request body will include a field for the following
arguments
: arguments for operatorperiod
: start and end of backtest periodts
: timestamp for particular datapoint (note: "start", "*", "default" have special meaning)
{ "arguments" : { "Timezone" : "UTC" }, "period" : [ "2019-10-20T15:50:46.486Z", "2019-10-27T15:50:46.486Z" ], "ts" : "*" }
- We expect the webhook to return json containing a value timeline, for example:
{ "timeline" : { "start" : { "value" : "Sunday" }, "2019-10-21T00:00:00Z": { "value": "Monday" }, "2019-10-22T00:00:00Z": { "value": "Tuesday" }, "2019-10-23T00:00:00Z": { "value": "Wednesday" }, "2019-10-24T00:00:00Z": { "value": "Thursday" }, "2019-10-25T00:00:00Z": { "value": "Friday" }, "2019-10-26T00:00:00Z": { "value": "Saturday" }, "2019-10-27T00:00:00Z": { "value": "Sunday" } }, "warn": [], "resolutions": [] }
- warnings should go in the warn array
- ie:
"warn" : [ "Twitter: invalid twitter user", "Forex: USD->USD xrate always 1", "RSS: limited historic data, only 20 most recent posts" ],
- resolutions have same meaning as in realtime, but will likely be ignored
- Option 1: Use a free-tier hosting service (ie - heroku, aws freetier, etc.) to host your extension
- Option 2: Reach out to @dvtate, we may be able to host it for you
- Option 1: run different extensions on different port numbers
- ie: 4chan extension can have host
strattyx.com:5050
and weather extension could usestrattyx.com:5051
- ie: 4chan extension can have host
- Option 2: Put them in different directories
- ie: topic-modelling extension on
strattyx.com/ext/news-topic
and stocktwits extension onstrattyx.com/ext/stocktwits
- ie: topic-modelling extension on
- Coming soon: see Outlook, interested in feedback
- Register your extension via the developer portal
- it will be available to you in template system and desktop client
- Templates are web-based procedurally generated forms that produce expressions in our langauge. This allows us to add new features to the app without writing native code or application updates.
- It allows users to create more advanced strategy conditions by using output of operators as inputs
- When you submit your package you reccomend templates for us to make for it and we will add them in the approval process
- Coming soon: see Outlook, interested in feedback
- Register your extension(s) via developer portal
- Using developer portal create a Package containing related extensions
- fill in relevant details and submit for approval
- We will make the template UI's based on your suggestions
- Package will appear in marketplace
- It's still a WIP, so this isn't final
- Potential Package Pricing Models:
- free: primarily first-party or FOSS extensions
- one-time cost: front-loaded payment
- ie: giving static dataset access
- subscription: recurring fee for having access to extension
- ie: bloomberg news feed
- on-demand: payment based on number of strategies it's used in (or pay-per-use)
- good for cpu intensive applications
- ie: ai-based
- on demand may not be offered initially
- subscription will likely require paying in advanced
- developer will get largest cut of revenue from sales
- StrattyX and maybe the payment system (ie apple takes 30% of inapp payments) also take smaller cuts
We move pretty fast and work on a lot of different tasks, but here's what our timeline for extensions/templates/packages is looking like. None of these dates are set in stone. Also note that even if we have things added to frontend, user may not see it for an additional week or so due to a variety of factors.
- Build out developer portal
- Build out template system
- Add template system to app
- Begin working with developers on making extensions
- Features (Package,Template,Extension) Marketplace working
- Begin working with developers on populating markeplace
- Preliminary Payment system
- bulk timeline operation support (improve backtest performance)
- Features Marketplace in app
- Fully automated system for deployment of extensions
- Manual Review still required for templates/packages
- Fully automated payment system
- Polish developer portal