Skip to content

Commit 688e568

Browse files
author
Ahmad Noman Musleh
committed
Updated docs
1 parent 6a4b093 commit 688e568

6 files changed

Lines changed: 49 additions & 29 deletions

File tree

docs/authentication.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# API Application
1+
## API Application
22

33
To use Spotware Open API you have to first create an open API application, send an activation request to Spotware for your application, and once it got activated you can start using the API through your application.
44

5-
To create an Open API application go to: <a href="https://connect.spotware.com/">https://connect.spotware.com/</a>
5+
To create an Open API application go to: [**openapi.ctrader.com**](https://openapi.ctrader.com/){:target="\_blank"}
66

7-
# Getting Auth Code
7+
## Getting Auth Code
88

99
After Spotware activated your API application, you can start using it, the first step is to get an authentication code from user, to do that via OpenAPI.NET you can use the code below to get authentication URL:
1010

@@ -43,7 +43,7 @@ As you can see "http://api.algodeveloper.com/redirects/" is my redirect URI and
4343

4444
To extract the authentication code from redirect URL you can use the AuthCode class.
4545

46-
# Generating Access Token
46+
## Generating Access Token
4747

4848
After you got the user authentication code, you can generate an access token, you have to do it instantly otherwise authentication code will expire after one minute.
4949

docs/img/favicon.ico

0 Bytes
Binary file not shown.

docs/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# What's Open API?
1+
## What's Open API?
22

33
Open API is part of Spotware cTrader package, it allows cTrader users to develop trading applications by using their programming language of choice and its free for all cTrader users.
44

5-
# What's OpenAPI.NET?
5+
## What's OpenAPI.NET?
66

77
OpenAPI.NET is a .NET library for interacting with cTrader Open API, it makes Open API usage easier and allows you to focus on your project instead of spending time to figuring out how to compile Google Protobuf message files or how to send/receive API messages.
88

9-
# Installation
9+
## Installation
1010

1111
You can install OpenAPI.Net from Nuget on your .NET project, to install it run the following command on Nuget package manager console:
1212

docs/js/extra.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
document.addEventListener("DOMContentLoaded", function (event) {
2+
copyrightYear = document.querySelector('#copyright-year');
3+
copyrightYear.innerText = new Date().getUTCFullYear();
4+
});

docs/open-client.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Creating/Connecting Client
1+
## Creating/Connecting Client
22

33
The open client is the object that you will use to send/receive messages to API.
44

@@ -66,7 +66,7 @@ Or you can:
6666

6767
The OpenClient class has some useful public properties you can use to check the state of client.
6868

69-
# Sending Messages
69+
## Sending Messages
7070

7171
You can send all of the Open API supported messages easily via your OpenClient object, just create the message object and send it by calling client "SendMessage" method:
7272

@@ -93,7 +93,7 @@ There are other SendMessage method overloads that you can use, all send message
9393

9494
To send a message instantly you can use the SendMessageInstant method.
9595

96-
# Receiving Messages
96+
## Receiving Messages
9797

9898
The OpenClient (IOpenClient) class implements the RX "IObservable<IMessage>" interface, the "IMessage" is the base class of all Google Protobuf messages, this allows you to easily subscribe to any message type you want to receive:
9999

@@ -133,7 +133,7 @@ If you want to receive a message with a client message ID (clientMsgId) then you
133133

134134
Client only stream a ProtoMessage if its ClientMsgId is set or it couldn't parse the actual message, otherwise it will not stream it.
135135

136-
# Handling Exceptions
136+
## Handling Exceptions
137137

138138
If something went wrong or client lost connection to API you can get the thrown exception by subscribing to client stream OnError:
139139

@@ -158,7 +158,7 @@ During call to any of client "SendMessage" methods you can expect one of these e
158158
* SendException: This exception will be thrown if something went wrong while sending data
159159
* ObjectDisposedException: If you call send message of a disposed client then it will throw this exception
160160

161-
# Disposing Client
161+
## Disposing Client
162162

163163
As mentioned the client object implements IDisposable interface, so you must dispose it after finishing your work.
164164

mkdocs.yml

Lines changed: 33 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
site_name: OpenAPI.Net
2-
site_url: https://openapinet.readthedocs.io/en/latest/
3-
site_description: OpenAPI.NET Documentation
2+
site_url: https://spotware.github.io/OpenAPI.Net/
3+
site_description: OpenAPI.NET Documentation, A .NET library for cTrader Open API
44
repo_name: spotware/OpenAPI.Net
55
repo_url: https://github.com/spotware/OpenAPI.Net
66
edit_uri: "https://github.com/spotware/OpenAPI.Net/tree/master/docs"
77

8-
copyright: Copyright &copy; 2021 Spotware Systems Ltd. cTrader, cAlgo, cBroker, cMirror. All rights reserved.
8+
copyright: "Copyright &copy; <span id='copyright-year'></span> <a href='https://www.spotware.com/' target='_blank'>Spotware Systems Ltd.</a> cTrader, cAlgo, cBroker, cMirror. All rights reserved."
99

1010
theme:
1111
name: material
@@ -18,18 +18,30 @@ theme:
1818
- navigation.instant
1919
- navigation.top
2020
- navigation.tracking
21+
- navigation.tabs
22+
- navigation.sections
23+
#- navigation.indexes
24+
- search.highlight
25+
- search.share
26+
- search.suggest
27+
#- content.code.annotate
28+
- content.tabs.link
29+
# - header.autohide
30+
# - navigation.expand
31+
# - navigation.instant
32+
# - toc.integrate
2133
palette:
2234
- scheme: default
2335
primary: indigo
2436
accent: indigo
2537
toggle:
26-
icon: material/toggle-switch-off-outline
38+
icon: material/toggle-switch
2739
name: Switch to dark mode
2840
- scheme: slate
29-
primary: red
30-
accent: red
41+
primary: indigo
42+
accent: indigo
3143
toggle:
32-
icon: material/toggle-switch
44+
icon: material/toggle-switch-off-outline
3345
name: Switch to light mode
3446
font:
3547
text: Roboto
@@ -42,17 +54,12 @@ plugins:
4254
- minify:
4355
minify_html: true
4456

45-
nav:
46-
- Getting Started: index.md
47-
- Authentication: 'authentication.md'
48-
- Open Client: 'open-client.md'
49-
- More:
50-
- 'Compiling Proto Files': 'compiling-proto-files.md'
51-
- 'Calculating Symbol Tick/Pip Value': 'calculating-symbol-tick-value.md'
52-
5357
extra:
5458
generator: false
5559

60+
extra_javascript:
61+
- js/extra.js
62+
5663
markdown_extensions:
5764
- admonition
5865
- abbr
@@ -87,7 +94,16 @@ markdown_extensions:
8794
- name: mermaid
8895
class: mermaid
8996
format: !!python/name:pymdownx.superfences.fence_code_format
90-
- pymdownx.tabbed
9197
- pymdownx.tasklist:
9298
custom_checkbox: true
93-
- pymdownx.tilde
99+
- pymdownx.tilde
100+
- pymdownx.tabbed:
101+
alternate_style: true
102+
103+
nav:
104+
- Getting Started: index.md
105+
- Authentication: 'authentication.md'
106+
- Open Client: 'open-client.md'
107+
- More:
108+
- 'Compiling Proto Files': 'compiling-proto-files.md'
109+
- 'Calculating Symbol Tick/Pip Value': 'calculating-symbol-tick-value.md'

0 commit comments

Comments
 (0)