Regulated and exchange-listed investment company. SM ®

Home
Open Account
Account Center
Services
Resources

Streamster API

The pages referenced below describe how to use the Streamster API to create applications that interface with the Streamster trading platform. Applications using the Streamster API can retrieve various data from the platform, execute and modify orders and positions, and perform a variety of related actions.

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



3.5. ClosePosition

ClosePosition closes a position with a given Position ID. The ClosePosition method has one parameter, a "PositionID" string which specifies the position to be closed. The ClosePosition method has no return value.

Sample - PHP: The following code closes a position.

<?php

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

$api -> ClosePosition("B2HN72VL3");

?>

Sample - Visual Basic: The following code closes a position.

Dim api As StreamsterApi = New StreamsterApi

api.ClosePosition("B2HN72VL3")

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.

Live Support