Available translations

API Endpoint

foundations.png
api-endpoint.png
Endpoints are important aspects of interacting with server-side web APIs, as they specify where resources can be accessed. Usually the access is via a URL to which HTTP requests are posted. Once these requests are posted correctly, the API will respond with the requested data.
How to Use an Endpoint Node
Read the docs of the API you are trying to map, and identify which endpoints they support. From there you can choose which endpoint holds the information you are interested in and begin to map it. For a detailed description of how to do this, please read the following description. In addition please see the API Map page as well as the Data Mining topic for other important concepts surrounding setting up an api map.
Foundations->Topic->Data Mining - Fetching Data From APIs->Main Workflow
How to Fetch Data from an API?
The main workflow to pull this off is quite straight forward. It does not require coding at all. Follow this guide and you will be using data from any source on the Internet for your trading strategies in no time.
  • 1. Choose an API: The current version is limited to public APIs only. Secured APIs coming soon.
  • 2. Design an API Map: Read the APIs online documentation and identify the Endpoints that return the data you would like to fetch. Carefully map the Endpoints defining the parameters the API Server expects at each call, and also how the API Server response is formatted.
  • 3. Setup an API Data Fetcher Bot: Create a Data Mine for this API and add an API Data Fetcher Bot. From that Bot's Record Properties you will need to reference the fields returned by the API Server defined at the API Map. This is how you define which fields from each response you are going to save to disk. You might also need to define query or path parameters here.
  • 5. Setup Indicator Bots: Once the data is converted, you can extract specific Datasets from it. These datasets can be used to define a set of indicators you can build from that data. These Indicators can be as simple as reorganizations of the data (with some adjustments to the names of fields and splitting the data into different indicators), or it can include some data processing / transformations if you wish (this would require some coding).
  • 6. Setup Plotters: After you have set up your indicators you can design plotters for them if you wish.
  • 7. Use Data for Trading Strategies: These indicators can be consumed from your trading strategies.
API Endpoint Configuration
Properties
  • codeName: Define the endpoint this branch of the map will handle.
Initial Values
These are the Initial Values for API Endpoint configuration:
 {
    "codeName": ""
}
Examples
This is a list of properties featured by the API Endpoint configuration. Expanding a property shows sample values for the property extracted from the current Workspace.
API Endpoint Menu
The API Endpoint node has the following Node Menu items:
The Configure menu item has the following properties:
  • action: Configure
  • actionFunction: uiObject.configEditor.activate
  • label: Configure
  • iconPathOn: configuration
  • iconPathOff: configuration
The Add API Query Parameters menu item has the following properties:
  • action: Add UI Object
  • disableIfPropertyIsDefined: true
  • propertyToCheckFor: apiQueryParameters
  • label: Add API Query Parameters
  • actionFunction: payload.executeAction
  • actionProject: Visual-Scripting
  • relatedUiObjectProject: Foundations
The Add API Path Parameters menu item has the following properties:
  • action: Add UI Object
  • disableIfPropertyIsDefined: true
  • propertyToCheckFor: apiPathParameters
  • label: Add API Path Parameters
  • actionFunction: payload.executeAction
  • actionProject: Visual-Scripting
  • relatedUiObjectProject: Foundations
The Add API Query Responses menu item has the following properties:
  • action: Add UI Object
  • disableIfPropertyIsDefined: true
  • propertyToCheckFor: apiQueryResponses
  • label: Add API Query Responses
  • actionFunction: payload.executeAction
  • actionProject: Visual-Scripting
  • relatedUiObjectProject: Foundations
The Delete menu item has the following properties:
  • action: Delete UI Object
  • actionProject: Visual-Scripting
  • askConfirmation: true
  • confirmationLabel: Confirm to Delete
  • label: Delete
  • iconPathOn: delete-entity
  • iconPathOff: delete-entity
  • actionFunction: payload.executeAction
API Endpoint Children
The API Endpoint node has the following childrenNodesProperties:
The Api Query Parameters node property features the following properties:
  • name: apiQueryParameters
  • type: node
  • autoAdd: true
The Api Path Parameters node property features the following properties:
  • name: apiPathParameters
  • type: node
  • autoAdd: true
The Api Query Responses node property features the following properties:
  • name: apiQueryResponses
  • type: node
  • autoAdd: true
API Endpoint Attaching Rules
The following are the Node Attaching Rules that govern the attachment of API Endpoint with other nodes:
Compatible Types: