Client Cabinet API

in #utopian-io7 years ago (edited)

Each client of InstaForex Company can benefit of new administrations like 'Customer Cabinet API' and in addition different offices.
Screenshot_1.png

Programming interface is a colossal powerful library for each InstaForex client. You can locate the fundamental exercises of customer cupboards on any site through new administrations.

In this way, now every customer of InstaForex can utilize the specified customer bureau offices. For instance, they can make any inquiries identified with close and open exchanges, account adjusts, part terminations, extra measurements, sign ever, and record rundowns inside the predefined time.

Section Stages

There are two levels of access to the 'Customer Cabinet API' program. No extra data is accommodated 'free access'. However, because of the setting, you can see data by giving passwords/IP passwords and IP veils for 'confined access'.

'Customer Cabinet API' enables each client of InstaForex to enter his customer's legitimate site without signing in to the customer's cupboards and after that look at their exchanging accounts.

Case PHP

$ Login = 0; #Must be Changed

$ apiPassword = "watchword"; #Must be Changed

$ information = cluster ("Login" => $ login, "secret key" => $ apiPassword);

$ data_string = json_encode ($ information);

$ apiAuthenticationMethod = ''; #Must be Changed

$ ch = curl_init ('https://customer api.instaforex.com/'.aapiAuthenticationMethod);

curl_setopt ($ ch, CURLOPT_CUSTOMREQUEST, "POST");

curl_setopt ($ ch, CURLOPT_POSTFIELDS, $ data_string);

curl_setopt ($ ch, CURLOPT_RETURNTRANSFER, genuine);

curl_setopt ($ ch, CURLOPT_HTTPHEADER, cluster ('Content-Type: application/json', 'Content-Length:'. strlen ($ data_string));

$ token = curl_exec ($ ch);

curl_close ($ ch);

$ apiMethodUrl = ''; #Must be Changed

$ ch = curl_init ('https://customer api.instaforex.com/'.$apiMethodUrl.$Login); #possibly should be changed part with [$ Login]. Relies upon the strategy param

curl_setopt ($ ch, CURLOPT_CUSTOMREQUEST, "GET");

curl_setopt ($ ch, CURLOPT_HTTPHEADER, exhibit ('passkey:'. $ token));

$ result = curl_exec ($ ch);

reverberate $ result;

Case C #

utilizing System;

utilizing System.Collections.Generic;

utilizing System.Linq;

utilizing System.Net.Http;

utilizing System.Net.Http.Formatting;

utilizing System.Text;

namespace ClientPartnerApiDemoProject {

class PartnerApiSample {

open void TestMethod () {

const int login = 000000;

const string pass = "your pass";

var token = GetToken (login, pass);

var result = GetCommissionRecords (login, token);

foreach (var exchange result) {

Console.WriteLine ("{0} {1}", trade.Partner, trade.BalanceRecords.Count);

}

}

open string GetToken (int login, string secret word) {

var customer = new HttpClient ();

HttpContent tokenContent = new ObjectContent (typeof (AccessTokenRequest), new AccessTokenRequest {Login = login, Password = password}, ​​new JsonMediaTypeFormatter ());

var token = client.PostAsync ("https://customer api.instaforex.com/programming interface/Authentication/RequestPartnerApiToken", tokenContent) .Result.Content.ReadAsStringAsync (). Result;

return token;

}

open rundown GetCommissionRecords (int login, string token) {

var customer = new HttpClient ();

client.DefaultRequestHeaders.Add ("passkey", token);

var result = client.GetAsync (string.Format ("https://customer api.instaforex.com/accomplice/GetCommissionRecords/{0}", login). Result.Content.ReadAsAsync> (). Result;

return result;

}

open class AccessTokenRequest {

open int Login {get} set; }

open string Password {get; set; }

}

}

}



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Thank you very much for posting this awesome post. And we've opened a steemit lover group. If you want you can join us. Our group work Each member of our group will give an apvote and a comment to each member so you can join May be. https://m.facebook.com/groups/158834444834657?refid=18&ref=bookmarks&

Coin Marketplace

STEEM 0.18
TRX 0.16
JST 0.029
BTC 76387.98
ETH 3047.82
USDT 1.00
SBD 2.62