GasTorchApi - JavaScript client for gas_torch_api API documentation for the Algorithmic Trading System using a microservices architecture. This SDK is automatically generated by the Swagger Codegen project:
- API version: 1.0.0
- Package version: 1.0.0
- Build package: io.swagger.codegen.v3.generators.javascript.JavaScriptClientCodegen
For Node.js
To publish the library as a npm, please follow the procedure in "Publishing npm packages".
Then install it via:
npm install gas_torch_api --save
If the library is hosted at a git repository, e.g. https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:
npm install GIT_USER_ID/GIT_REPO_ID --save
The library also works in the browser environment via npm and browserify. After following
the above steps with Node.js and installing browserify with npm install -g browserify
,
perform the following (assuming main.js is your entry file):
browserify main.js > bundle.js
Then include bundle.js in the HTML pages.
Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:
module: {
rules: [
{
parser: {
amd: false
}
}
]
}
Please follow the installation instruction and execute the following JS code:
var GasTorchApi = require('gas_torch_api');
var api = new GasTorchApi.DefaultApi()
var opts = {
'body': new GasTorchApi.AuthLoginBody() // {AuthLoginBody}
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
api.authLoginPost(opts, callback);
All URIs are relative to https://virtserver.swaggerhub.com/ScottScherzer/gas-torch/1.0.0
Class | Method | HTTP request | Description |
---|---|---|---|
GasTorchApi.DefaultApi | authLoginPost | POST /auth/login | Authenticate a user and generate a token |
GasTorchApi.DefaultApi | authRegisterPost | POST /auth/register | Register a new user |
GasTorchApi.DefaultApi | marketDataGet | GET /market-data | Get the latest market data |
GasTorchApi.DefaultApi | marketDataPost | POST /market-data | Add new market data |
GasTorchApi.DefaultApi | marketDataSymbolDelete | DELETE /market-data/{symbol} | Delete market data for a specific symbol |
GasTorchApi.DefaultApi | marketDataSymbolGet | GET /market-data/{symbol} | Get market data for a specific symbol |
GasTorchApi.DefaultApi | ordersGet | GET /orders | Get all orders |
GasTorchApi.DefaultApi | ordersIdDelete | DELETE /orders/{id} | Delete a specific order |
GasTorchApi.DefaultApi | ordersIdGet | GET /orders/{id} | Get details of a specific order |
GasTorchApi.DefaultApi | ordersIdPut | PUT /orders/{id} | Update a specific order |
GasTorchApi.DefaultApi | ordersPost | POST /orders | Create a new order |
GasTorchApi.DefaultApi | rootGet | GET / | List all available endpoints |
GasTorchApi.DefaultApi | strategiesGet | GET /strategies | Get all trading strategies |
GasTorchApi.DefaultApi | strategiesIdDelete | DELETE /strategies/{id} | Delete a specific strategy |
GasTorchApi.DefaultApi | strategiesIdGet | GET /strategies/{id} | Get details of a specific strategy |
GasTorchApi.DefaultApi | strategiesIdPut | PUT /strategies/{id} | Update a specific strategy |
GasTorchApi.DefaultApi | strategiesPost | POST /strategies | Create a new trading strategy |
- GasTorchApi.AuthLoginBody
- GasTorchApi.AuthRegisterBody
- GasTorchApi.Error
- GasTorchApi.Item
- GasTorchApi.MarketdataBody
- GasTorchApi.OrdersBody
- GasTorchApi.OrdersIdBody
- GasTorchApi.StrategiesBody
- GasTorchApi.StrategiesIdBody
All endpoints do not require authorization.