Skip to content
CPlugin logo
  • Home
  • Blog
  • Store
  • Contact
  • FAQ
  • Cart
  • My account
  • Knowledge Base
CPlugin logo
  • Home
  • Blog
  • Store
  • Contact
  • FAQ
  • Cart
  • My account
  • Knowledge Base

General

  • How to obtain files

MT4 ManagerAPI .NET Wrapper

  • Installation
  • Connection pool
  • Price Helper

Standalone Apps

  • Join two MT4 Servers
  • Compress MT4 database
  • Quotes Monitor
  • Quotes Monitor (WPF)
  • MT4 Report Server extended replication
  • EMIR
  • DividenderLT
  • Tools to calculate dividends
  • CopyTrading
    • Sentiment Strategy (LMAX)
    • MT4 (ManagerAPI) to LMAX
    • MT4 Plugin
    • MT4 (ManagerAPI) to MT4

Plugins for MT4/MT5

  • Flexible Leverage
  • GapHelper plugin
  • Multi Account Manager (MAM)
  • Spread Extender
  • HedgeHelper
  • Multi-Tier IB
  • Multi-Tier IB advanced version

Cloud

  • General info
  • WebAPI
    • WebAPI
    • Authorization
    • Pricing and terms
    • RESTful
    • Web Sockets (SignalR)
  • Home
  • Docs
  • Cloud
  • WebAPI
  • Authorization

Authorization

The family of cloud based products use OpenID and OAuth protocols to authenticate users using Single Sign On feature. 

Different kind of clients use different approaches, for example web site itself uses OpenID, when WebAPI uses OAuth.

To authenticate within IdentityServer from your application you need to follow the routine below.

This will be using the Client Credentials flow so our request will look like this:

POST https://auth.cplugin.net/connect/token
Headers: Content-Type: application/x-www-form-urlencoded
Body: grant_type=client_credentials&scope=webapi&client_id=[ClientId]&client_secret=[ClientPassword]

replace [ClientId] and [ClientPassword] with your your own client id and password which can be obtained through registering new API client at Admin portal → Clients section (https://admin.cplugin.net/Clients)

Once you successfully authenticate you will get access token which can be used further.


"access_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjE0M2U4MjljMmI1NzQ4OTk2OTc1M2JhNGY4MjA1OTc5ZGYwZGE5ODhjNjQwY2ZmYTVmMWY0ZWRhMWI2ZTZhYTQiLCJ0eXAiOiJKV1QifQ......"
"expires_in": 3600,
"token_type": "Bearer"

WebAPI has two different features: RESTful and WebSockets general infromation, each one has its own way to pass this token within each call to maintain authorization between calls.

Very basic things you can do is to request:

Organizations you are participated to: https://cloud.mywebapi.com/swagger/index.html#/Organizations/Organizations_Get

Available TradePlatforms list: https://cloud.mywebapi.com/swagger/index.html#/TradePlatforms/TradePlatforms_GetAll

And check connection to any of your trade platform: https://cloud.mywebapi.com/swagger/index.html#/TradePlatforms/TradePlatforms_Ping

Still stuck? How can we help?

How can we help?

Updated on June 30, 2023
WebAPIPricing and terms

Powered by BetterDocs

Copyright © 2015  - 2025 CPlugin

Telegram Email EmailLinkedinFacebookTwitter

Powered by CPlugin