Market ServicesAffiliate ProgramAssistant ProgramChargesDownloads
Streamster HelpDownload HelpAPIToolsTools FAQ

Streamster™ API

The pages referenced below describe how to use Streamster™ API, which can be used to create applications that interface with Novativa Streamster™. Applications using the Streamster API can retrieve various data from Novativa Streamster, execute and modify orders on the market and perform a variety of related actions.

To open and read a particular page, please click on its title.


1.

Introduction to Streamster™ API

1.1.

Using API from PHP

1.2.

Using API from Visual Basic

2.

Streamster™ API Retrieval Methods

2.1.

GetQuote

2.2.

GetOrders

2.3.

GetTrades

2.4.

GetPositions

2.5.

GetDesks

2.6. GetBars

GetBars method retrieves an array of bars for a specified instrument and period. Each bar in the returned array of bars contains price at a specific point in time.

NOTE: Only bars from any open Charting windows in Streamster can be retrieved. If you wish to retrieve bars from your script for a specific instrument and period, you have to make sure that this instrument/period is shown in one of Streamster's Charting windows.

The GetBars method has three parameters: instrument, period and a flag for options.

First parameter of the GetBars method is a string that specifies the instrument for which bars will be retrieved. The second parameter, Period, specifies the required period such as "5 Minutes", "15 Minutes", "30 Minutes", "Hourly", "4 Hours", "Daily", "Weekly", or "Monthly". The third parameter is a string that determines the order in which bars are returned: a blank string if bars are to be returned in descending order or a string "f" (as in "flip") for ascending order.

Each bar in the returned array of bars has the following fields: BarDateTime, Open, High, Low, Close and Volume.

Sample - PHP: The following code retrieves 5-minute EUR/USD bars and shows them all.

<?php

$api = new SoapClient ("http://127.0.0.1:8018/service.wsdl",
    array('features' => SOAP_SINGLE_ELEMENT_ARRAYS));

$r = $api -> GetBars("EUR/USD", "5 minutes", "f");

if(property_exists($r, "Bar")) {
    foreach($r -> Bar as $n => $Bar) {
        echo $Bar -> BarDateTime . " " . $Bar -> Open . " " . $Bar -> High .
            " " . $Bar -> Low . " " . $Bar -> Close . "\n";
    }
}

?>

Sample - Visual Basic: The following code retrieves 5-minute EUR/USD bars and shows them all.

Dim api As StreamsterApi = New StreamsterApi

Dim ab As Bar()
Dim b As Bar

ab = api.GetBars("EUR/USD", "5 minutes", "")

For Each b In ab
    Console.WriteLine(b.BarDateTime & " " & b.Open & " " & b.High &
        " " & b.Low & " " & b.Close)
Next

2.7.

GetLastMessage

3.

Streamster™ API Trading Methods

3.1.

SendOrder

3.2.

ChangeOrder

3.3.

CancelOrder

3.4.

ChangePosition

3.5.

ClosePosition

Send us your comments and any suggestions you might have about the Streamster™ API. We look forward to receiving your input and improving content on this page to help you utilize the API to its full extent.

About Marketiva
Our People
Locations
Regulation
Contact Information
Open Account
Service Agreement
Risk Disclosure
Price List
Payment Options
Payment Policy
AML Policy
Account Center
Change Password
Recover Password
Reset Account
Identify Yourself
Portfolio
Account Performance
Deposit Funds
Withdraw Funds
Transfer Funds
Orders, Trades
Positions
Billing
Support
Instrument Profiles
Market Conditions
Marketiva Masters
Affiliate Program
Affiliate Reports
Assistant Program
Price List
Payment Options
Downloads
Streamster Help
Tools
API
Introduction to Trading
Orders and Positions
Calculating Profit
Technical Analysis
Fundamental Analysis
Controlling Risk
Margin Requirements
Overnight Interest
Trading FAQ
Marketiva FAQ
Facebook
Twitter
Share