Welcome to the official API documentation for Deriv. Here, you will find comprehensive guides and documentation to help you start working with our APIs as quickly as possible, as well as support if you get stuck. Let's jump right in!
To ensure smooth running and contribution to this project, please make sure you have the following packages installed in your environment:
Tool | Version | Reference |
---|---|---|
Node | >=18.20.0 | Download |
npm | >=10.7.0 | - |
Git | - | Download |
Note: Ensure that node -v
and sudo node -v
show the same version.
git clone [email protected]:deriv-com/deriv-api-docs.git
npm run bootstrap
After successfully building the project, you can execute or debug it using the Terminal by running the following command.
npm run dev
npm run build
If you are a developer and want to contribute to the repository, please follow the procedure below.
To create your own version of the Deriv API application, you need to fork
the project to your own GitHub repository. Follow these steps to fork
a repository:
- Go to the GitHub page of the repository you want to
fork
. - Click on the "
Fork
" button at the top right corner of the page. - Choose the
GitHub account
where you want to fork the repository. - Wait for the forking process to finish. Once it's done, you will be redirected to your forked repository.
- Now, clone the repository by running the command
git clone [email protected]:[username]/deriv-api-docs.git
.
Note: Replace [username]
with your username to clone the forked repository. Also, to clone the repository, set up SSH on GitHub to authorize your system to clone and perform git operations. Please refer to this documentation.
- Start contributing by installing the necessary dependencies. You can find instructions on how to install dependencies here.
Once you clone the project, before committing any changes, you need to set up a few things for git email
and username
. Additionally, if you want to push your code, you need to set up the origin and upstream to connect with the main repository deriv-api
in deriv-com
.
To set up the origin, use the following command in the Terminal:
git remote add origin [origin URL]
Replace [origin URL]
with the git repository URL of your repository. Now, after setting up the origin, you need to add the upstream
. To do that, use the following command:
git remote add upstream [upstream URL]
Replace [upstream URL]
with the git repository URL for the main repository.
To create a branch from the latest master branch, follow these steps:
- Switch to the master branch using the command
git checkout master
. - Pull the latest changes from the upstream master branch using the command
git pull upstream master
. - Create a new branch with your desired branch name using the command
git checkout -b [your_branch_name]
. - Push your changes to the origin branch using the command
git push origin [your_branch_name]
.
This application is developed using Docusaurus
, which follows a specific project structure to organize and manage documentation websites. The typical project structure includes the following directories and files:
Example:
├── docs
| ├── Code Example
| | ├── Javascript
| ├── Core Concepts
| | ├── Web Sockets
| ├── Frameworks
| ...
|
├── src
| ├── components
| ├── configs
| ├── features
| ├── hooks
| ├── context
| ├── pages
| ├── theme
| ├── styles
| ...
|
├── static
| ├── img
|
├── config
| ├── v3
|
├── docusaurus.config.js
├── readme.md
├── package.json
...
Note:
In the root of the project, there is a folder called Config/v3
. This folder is managed by the Backend Team
through workflow and contains configurations used in the API Explorer
page for API request and response values and data. The Frontend Team
does not
need to modify this folder.