# Exchange API

## Ontology Exchange Docking Document

There are two kinds of assets that are part of the Ontology system: **native assets** and **contract assets**.

Native assets are `ONT` and `ONG`. Upon integration with exchange platforms they are enabled to process exchange and redeeming of these tokens.

### Deploying a Synchronization Node

There are two ways to deploy Ontology synchronization nodes:

#### Get from source code

Clone ontology repository to **$GOPATH/src/github.com/ontio** directory

```bash
$ git clone https://github.com/ontio/ontology.git
```

Or

```
$ go get github.com/ontio/ontology
```

Use the third-party package management tool glide to manage the dependent libraries

```
$ cd $GOPATH/src/github.com/ontio/ontology
$ glide install
```

Compile source code with make

```
$ make
```

An executable program will be generated after a successful compilation (using `make all` command will generate sig server under 'tools' directory ）

* `ontology`: Node program/node control program provided by command line

#### Get from release

[release page](https://github.com/ontio/ontology/releases)

#### Server deployment

1. **Create wallet(not mandatory for sync node)**

Create the wallet file `wallet.dat` that is required for nodes running through the CLI

```bash
$ ./ontology account add -d
Use default setting '-t ecdsa -b 256 -s SHA256withECDSA' 
    signature algorithm: ecdsa 
    curve: P-256 
    signature scheme: SHA256withECDSA 
Password:
Re-enter Password:

Index: 1
Label: 
Address: AWVNFw74G8Sx9vcxGbmh4gT54ayuwb3bcm
Public key: 02c17cd91acf618d497f65f1fc4f52de7952c8b2337883f898dda887953cd29dd7
Signature scheme: SHA256withECDSA

Create account successfully.
```

​

#### Directory Structure

```
   $ tree
   └── ontology
       ├── ontology
       └── wallet.dat
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ont.io/guides-and-tutorials/integration-guides/exchange-integration/exchanges.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
