NAV Navigation
Ruby Python Go cURL PHP

AltMarket Exchange API v1

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

Authentication

Request signing should be performed as indicated in the Python example.

Code samples

def sign_header(self,secret,payload, is_json):
  if is_json:
    return hmac.new(test_secret, json.dumps(payload).encode('utf-8'), hashlib.sha512).hexdigest().upper()
  else:
    return hmac.new(test_secret, payload.encode('utf-8'), hashlib.sha512).hexdigest().upper()

def header(self,key,secret,payload,is_json=False):
  return {
      'content-type': 'application/json',
      'Key': test_key,
      'Sign': self.sign_header(secret,payload,is_json),
  } 

def timestamp():
  return datetime.datetime.utcnow().isoformat()

payload = "?ts={0}".format(t)
headers = header(test_key,test_secret,payload)
print(headers)
print(payload)

Asset

List Assets

Code samples

require 'rest-client'
require 'json'

headers = {
  'content-type' => 'application/json',
  'Key' => 'API_KEY',
  'Sign' => 'API_SIGN'
}

result = RestClient.get 'https://exchange.alt.market/api/assets-info',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'content-type': 'application/json',
  'Key': 'API_KEY',
  'Sign': 'API_SIGN'
}

r = requests.get('https://exchange.alt.market/api/assets-info', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "content-type": []string{"application/json"},
        "Key": []string{"API_KEY"},
        "Sign": []string{"API_SIGN"}
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/api/assets-info", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Key' => 'API_KEY',
    'Sign' => 'API_SIGN'
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://exchange.alt.market/api/assets-info', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /api/assets-info

Example responses

200 Response

{"data":[{"id":"string","can_deposit":true,"can_withdraw":true,"image_url":"string","asset_name":"string","withdrawal_fee":0,"scale":0}]}
{
  "data": [
    {
      "id": "string",
      "can_deposit": true,
      "can_withdraw": true,
      "image_url": "string",
      "asset_name": "string",
      "withdrawal_fee": 0,
      "scale": 0
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Success AltMarket.Http.Response_1_System.Collections.Generic.IEnumerable_1_AltMarket.Api.AssetResponse_AltMarket_Version_1.0.0.0_Culture_neutral_PublicKeyToken_null_System.Private.CoreLib_Version_4.0.0.0_Culture_neutral_PublicKeyToken_7cec85d7bea7798e_

Markets

Market Data

Code samples

require 'rest-client'
require 'json'

headers = {
  'content-type' => 'application/json',
  'Key' => 'API_KEY',
  'Sign' => 'API_SIGN'
}

result = RestClient.get 'https://exchange.alt.market/api/markets',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'content-type': 'application/json',
  'Key': 'API_KEY',
  'Sign': 'API_SIGN'
}

r = requests.get('https://exchange.alt.market/api/markets', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "content-type": []string{"application/json"},
        "Key": []string{"API_KEY"},
        "Sign": []string{"API_SIGN"}
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/api/markets", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Key' => 'API_KEY',
    'Sign' => 'API_SIGN'
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://exchange.alt.market/api/markets', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /api/markets

Example responses

200 Response

{"serverTime":0,"pairs":{"property1":{"baseAsset":"string","quoteAsset":"string","minPrice":0,"maxPrice":0,"minAmount":0,"hidden":0,"fee":0,"makerFee":0,"makerFeeLimit":0,"takerFee":0,"takerFeeLimit":0,"priceScale":0,"amountScale":0,"status":"Open"},"property2":{"baseAsset":"string","quoteAsset":"string","minPrice":0,"maxPrice":0,"minAmount":0,"hidden":0,"fee":0,"makerFee":0,"makerFeeLimit":0,"takerFee":0,"takerFeeLimit":0,"priceScale":0,"amountScale":0,"status":"Open"}},"plaidPublicKey":"string","environment":"string"}
{
  "serverTime": 0,
  "pairs": {
    "property1": {
      "baseAsset": "string",
      "quoteAsset": "string",
      "minPrice": 0,
      "maxPrice": 0,
      "minAmount": 0,
      "hidden": 0,
      "fee": 0,
      "makerFee": 0,
      "makerFeeLimit": 0,
      "takerFee": 0,
      "takerFeeLimit": 0,
      "priceScale": 0,
      "amountScale": 0,
      "status": "Open"
    },
    "property2": {
      "baseAsset": "string",
      "quoteAsset": "string",
      "minPrice": 0,
      "maxPrice": 0,
      "minAmount": 0,
      "hidden": 0,
      "fee": 0,
      "makerFee": 0,
      "makerFeeLimit": 0,
      "takerFee": 0,
      "takerFeeLimit": 0,
      "priceScale": 0,
      "amountScale": 0,
      "status": "Open"
    }
  },
  "plaidPublicKey": "string",
  "environment": "string"
}

Responses

Status Meaning Description Schema
200 OK Success AltMarket.Api.InfoResponse

Trade

Create Order

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json-patch+json',
  'Accept' => 'text/plain',
  'Cookie' => 'API_KEY'
}

result = RestClient.post 'https://exchange.alt.market/api/order',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json-patch+json',
  'Accept': 'text/plain',
  'Cookie': 'API_KEY'
}

r = requests.post('https://exchange.alt.market/api/order', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json-patch+json"},
        "Accept": []string{"text/plain"},
        "Cookie": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "/api/order", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json-patch+json',
    'Accept' => 'text/plain',
    'Cookie' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://exchange.alt.market/api/order', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /api/order

Body parameter

{
  "order": {
    "instrument": "string",
    "type": "string",
    "amount": 0,
    "price": 0,
    "activationPrice": 0,
    "isLimit": true,
    "isStop": true
  }
}

Parameters

Name In Type Required Description
body body AltMarket.Api.OrderRequest false none

Example responses

200 Response

{"order":{"orderId":"string","total":0,"orderType":"Limit","commission":0,"createdAt":"2020-06-04T09:48:43Z","unitsFilled":0,"isPending":true,"status":"Working","type":"string","amount":0,"price":0,"stopPrice":0,"isLimit":true,"instrument":"string","side":"Buy"}}
{
  "order": {
    "orderId": "string",
    "total": 0,
    "orderType": "Limit",
    "commission": 0,
    "createdAt": "2020-06-04T09:48:43Z",
    "unitsFilled": 0,
    "isPending": true,
    "status": "Working",
    "type": "string",
    "amount": 0,
    "price": 0,
    "stopPrice": 0,
    "isLimit": true,
    "instrument": "string",
    "side": "Buy"
  }
}

Responses

Status Meaning Description Schema
200 OK Success AltMarket.Api.OrderResponse

Cancel Order

Code samples

require 'rest-client'
require 'json'

headers = {
  'content-type' => 'application/json',
  'Key' => 'API_KEY',
  'Sign' => 'API_SIGN'
}

result = RestClient.delete 'https://exchange.alt.market/api/orders/{orderId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'content-type': 'application/json',
  'Key': 'API_KEY',
  'Sign': 'API_SIGN'
}

r = requests.delete('https://exchange.alt.market/api/orders/{orderId}', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "content-type": []string{"application/json"},
        "Key": []string{"API_KEY"},
        "Sign": []string{"API_SIGN"}
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "/api/orders/{orderId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Key' => 'API_KEY',
    'Sign' => 'API_SIGN'
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://exchange.alt.market/api/orders/{orderId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

DELETE /api/orders/{orderId}

Parameters

Name In Type Required Description
orderId path integer(int64) true none

Example responses

200 Response

{"order":{"orderId":"string","total":0,"orderType":"Limit","commission":0,"createdAt":"2020-06-04T09:48:43Z","unitsFilled":0,"isPending":true,"status":"Working","type":"string","amount":0,"price":0,"stopPrice":0,"isLimit":true,"instrument":"string","side":"Buy"}}
{
  "order": {
    "orderId": "string",
    "total": 0,
    "orderType": "Limit",
    "commission": 0,
    "createdAt": "2020-06-04T09:48:43Z",
    "unitsFilled": 0,
    "isPending": true,
    "status": "Working",
    "type": "string",
    "amount": 0,
    "price": 0,
    "stopPrice": 0,
    "isLimit": true,
    "instrument": "string",
    "side": "Buy"
  }
}

Responses

Status Meaning Description Schema
200 OK Success AltMarket.Api.OrderResponse

Open Orders

Code samples

require 'rest-client'
require 'json'

headers = {
  'content-type' => 'application/json',
  'Key' => 'API_KEY',
  'Sign' => 'API_SIGN'
}

result = RestClient.get 'https://exchange.alt.market/api/orders/open',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'content-type': 'application/json',
  'Key': 'API_KEY',
  'Sign': 'API_SIGN'
}

r = requests.get('https://exchange.alt.market/api/orders/open', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "content-type": []string{"application/json"},
        "Key": []string{"API_KEY"},
        "Sign": []string{"API_SIGN"}
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/api/orders/open", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Key' => 'API_KEY',
    'Sign' => 'API_SIGN'
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://exchange.alt.market/api/orders/open', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /api/orders/open

Example responses

200 Response

[{"orderId":"string","total":0,"orderType":"Limit","commission":0,"createdAt":"2020-06-04T09:48:43Z","unitsFilled":0,"isPending":true,"status":"Working","type":"string","amount":0,"price":0,"stopPrice":0,"isLimit":true,"instrument":"string","side":"Buy"}]
[
  {
    "orderId": "string",
    "total": 0,
    "orderType": "Limit",
    "commission": 0,
    "createdAt": "2020-06-04T09:48:43Z",
    "unitsFilled": 0,
    "isPending": true,
    "status": "Working",
    "type": "string",
    "amount": 0,
    "price": 0,
    "stopPrice": 0,
    "isLimit": true,
    "instrument": "string",
    "side": "Buy"
  }
]

Responses

Status Meaning Description Schema
200 OK Success Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [AltMarket.Api.OrderInfoResponse] false none none
» orderId string false none none
» total number(double) false none none
» orderType string false none none
» commission number(double) false none none
» createdAt string(date-time) false none none
» unitsFilled number(double) false none none
» isPending boolean false none none
» status string false none none
» type string false none none
» amount number(double) false none none
» price number(double) false none none
» stopPrice number(double) false none none
» isLimit boolean false none none
» instrument string false none none
» side string false none none

Enumerated Values

Property Value
orderType Limit
orderType Market
orderType StopLimit
orderType StopMarket
status Working
status Rejected
status Cancelled
status Completed
side Buy
side Sell

Cancel All Active Orders

Code samples

require 'rest-client'
require 'json'

headers = {
  'content-type' => 'application/json',
  'Key' => 'API_KEY',
  'Sign' => 'API_SIGN'
}

result = RestClient.delete 'https://exchange.alt.market/api/orders',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'content-type': 'application/json',
  'Key': 'API_KEY',
  'Sign': 'API_SIGN'
}

r = requests.delete('https://exchange.alt.market/api/orders', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "content-type": []string{"application/json"},
        "Key": []string{"API_KEY"},
        "Sign": []string{"API_SIGN"}
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "/api/orders", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Key' => 'API_KEY',
    'Sign' => 'API_SIGN'
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://exchange.alt.market/api/orders', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

DELETE /api/orders

Example responses

200 Response

{"data":0}
{
  "data": 0
}

Responses

Status Meaning Description Schema
200 OK Success AltMarket.Http.Response_1_System.Int32_System.Private.CoreLib_Version_4.0.0.0_Culture_neutral_PublicKeyToken_7cec85d7bea7798e_

Order History

Code samples

require 'rest-client'
require 'json'

headers = {
  'content-type' => 'application/json',
  'Key' => 'API_KEY',
  'Sign' => 'API_SIGN'
}

result = RestClient.get 'https://exchange.alt.market/api/order_history',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'content-type': 'application/json',
  'Key': 'API_KEY',
  'Sign': 'API_SIGN'
}

r = requests.get('https://exchange.alt.market/api/order_history', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "content-type": []string{"application/json"},
        "Key": []string{"API_KEY"},
        "Sign": []string{"API_SIGN"}
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/api/order_history", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Key' => 'API_KEY',
    'Sign' => 'API_SIGN'
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://exchange.alt.market/api/order_history', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /api/order_history

Parameters

Name In Type Required Description
Market query string false none
Side query string false none
StartDate query string(date-time) false none
EndDate query string(date-time) false none
AscOrder query array[string] false none
DescOrder query array[string] false none
IsHideCanceled query boolean false none
Page query integer(int32) false none
PerPage query integer(int32) false none

Enumerated Values

Parameter Value
Side Buy
Side Sell

Example responses

200 Response

{"filters":{},"paging":{"page":0,"per_page":0,"total":0},"data":[{"orderId":"string","total":0,"orderType":"Limit","commission":0,"createdAt":"2020-06-04T09:48:43Z","unitsFilled":0,"isPending":true,"status":"Working","type":"string","amount":0,"price":0,"stopPrice":0,"isLimit":true,"instrument":"string","side":"Buy"}]}
{
  "filters": {},
  "paging": {
    "page": 0,
    "per_page": 0,
    "total": 0
  },
  "data": [
    {
      "orderId": "string",
      "total": 0,
      "orderType": "Limit",
      "commission": 0,
      "createdAt": "2020-06-04T09:48:43Z",
      "unitsFilled": 0,
      "isPending": true,
      "status": "Working",
      "type": "string",
      "amount": 0,
      "price": 0,
      "stopPrice": 0,
      "isLimit": true,
      "instrument": "string",
      "side": "Buy"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Success AltMarket.Http.FilteredResponse_1_AltMarket.Api.OrderInfoResponse_AltMarket_Version_1.0.0.0_Culture_neutral_PublicKeyToken_null_

Get Trade History

Code samples

require 'rest-client'
require 'json'

headers = {
  'content-type' => 'application/json',
  'Key' => 'API_KEY',
  'Sign' => 'API_SIGN'
}

result = RestClient.get 'https://exchange.alt.market/api/trade_history',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'content-type': 'application/json',
  'Key': 'API_KEY',
  'Sign': 'API_SIGN'
}

r = requests.get('https://exchange.alt.market/api/trade_history', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "content-type": []string{"application/json"},
        "Key": []string{"API_KEY"},
        "Sign": []string{"API_SIGN"}
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/api/trade_history", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Key' => 'API_KEY',
    'Sign' => 'API_SIGN'
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://exchange.alt.market/api/trade_history', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /api/trade_history

Parameters

Name In Type Required Description
Market query string false none
Side query string false none
StartDate query string(date-time) false none
EndDate query string(date-time) false none
AscOrder query array[string] false none
DescOrder query array[string] false none
Page query integer(int32) false none
PerPage query integer(int32) false none

Enumerated Values

Parameter Value
Side Buy
Side Sell

Example responses

200 Response

{"filters":{},"paging":{"page":0,"per_page":0,"total":0},"data":[{"tradeSeq":0,"tradeTime":"2020-06-04T09:48:43Z","amount":0,"executionPrice":0,"instrument":"string","side":"Buy","commission":0}]}
{
  "filters": {},
  "paging": {
    "page": 0,
    "per_page": 0,
    "total": 0
  },
  "data": [
    {
      "tradeSeq": 0,
      "tradeTime": "2020-06-04T09:48:43Z",
      "amount": 0,
      "executionPrice": 0,
      "instrument": "string",
      "side": "Buy",
      "commission": 0
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Success AltMarket.Http.FilteredResponse_1_AltMarket.Account.TradeHistoryItem_AltMarket.Account.Data_Version_1.0.0.0_Culture_neutral_PublicKeyToken_null_

Wallet

Get Deposit Address

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json-patch+json',
  'Accept' => 'text/plain',
  'Cookie' => 'API_KEY'
}

result = RestClient.post 'https://exchange.alt.market/api/wallet/deposit',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json-patch+json',
  'Accept': 'text/plain',
  'Cookie': 'API_KEY'
}

r = requests.post('https://exchange.alt.market/api/wallet/deposit', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json-patch+json"},
        "Accept": []string{"text/plain"},
        "Cookie": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "/api/wallet/deposit", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json-patch+json',
    'Accept' => 'text/plain',
    'Cookie' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://exchange.alt.market/api/wallet/deposit', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /api/wallet/deposit

Body parameter

{
  "assetId": "string"
}

Parameters

Name In Type Required Description
body body AltMarket.FrontOffice.DepositFundsRequest false none

Example responses

200 Response

{"asset":"string","paymentSystem":"string","address":"string","error":"string"}
{
  "asset": "string",
  "paymentSystem": "string",
  "address": "string",
  "error": "string"
}

Responses

Status Meaning Description Schema
200 OK Success AltMarket.FrontOffice.DepositFundsResponse

Withdrawal

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json-patch+json',
  'Accept' => 'text/plain',
  'Cookie' => 'API_KEY'
}

result = RestClient.post 'https://exchange.alt.market/api/wallet/withdrawal',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json-patch+json',
  'Accept': 'text/plain',
  'Cookie': 'API_KEY'
}

r = requests.post('https://exchange.alt.market/api/wallet/withdrawal', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json-patch+json"},
        "Accept": []string{"text/plain"},
        "Cookie": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "/api/wallet/withdrawal", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json-patch+json',
    'Accept' => 'text/plain',
    'Cookie' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://exchange.alt.market/api/wallet/withdrawal', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /api/wallet/withdrawal

Body parameter

{
  "transferId": "string",
  "assetId": "string",
  "amount": 0,
  "address": "string"
}

Parameters

Name In Type Required Description
body body AltMarket.Api.WithdrawalRequest false none

Example responses

200 Response

{"asset":"string","paymentSystem":"string","transferId":"string","type":"Deposit","status":"AwaitingConfirmation","amount":"string","fee":"string","errorDetails":"string","createdAt":"2020-06-04T09:48:43Z","updatedAt":"2020-06-04T09:48:43Z","txId":"string","blockchainLink":"string","errorCode":"string","confirmations":0,"confirmationsRequired":0,"targetAddress":"string"}
{
  "asset": "string",
  "paymentSystem": "string",
  "transferId": "string",
  "type": "Deposit",
  "status": "AwaitingConfirmation",
  "amount": "string",
  "fee": "string",
  "errorDetails": "string",
  "createdAt": "2020-06-04T09:48:43Z",
  "updatedAt": "2020-06-04T09:48:43Z",
  "txId": "string",
  "blockchainLink": "string",
  "errorCode": "string",
  "confirmations": 0,
  "confirmationsRequired": 0,
  "targetAddress": "string"
}

Responses

Status Meaning Description Schema
200 OK Success AltMarket.Account.TransferData

Transfer History

Code samples

require 'rest-client'
require 'json'

headers = {
  'content-type' => 'application/json',
  'Key' => 'API_KEY',
  'Sign' => 'API_SIGN'
}

result = RestClient.get 'https://exchange.alt.market/api/wallet/transfers',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'content-type': 'application/json',
  'Key': 'API_KEY',
  'Sign': 'API_SIGN'
}

r = requests.get('https://exchange.alt.market/api/wallet/transfers', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "content-type": []string{"application/json"},
        "Key": []string{"API_KEY"},
        "Sign": []string{"API_SIGN"}
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/api/wallet/transfers", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Key' => 'API_KEY',
    'Sign' => 'API_SIGN'
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://exchange.alt.market/api/wallet/transfers', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /api/wallet/transfers

Parameters

Name In Type Required Description
count query integer(int32) false none

Example responses

200 Response

[{"asset":"string","paymentSystem":"string","transferId":"string","type":"Deposit","status":"AwaitingConfirmation","amount":"string","fee":"string","errorDetails":"string","createdAt":"2020-06-04T09:48:43Z","updatedAt":"2020-06-04T09:48:43Z","txId":"string","blockchainLink":"string","errorCode":"string","confirmations":0,"confirmationsRequired":0,"targetAddress":"string"}]
[
  {
    "asset": "string",
    "paymentSystem": "string",
    "transferId": "string",
    "type": "Deposit",
    "status": "AwaitingConfirmation",
    "amount": "string",
    "fee": "string",
    "errorDetails": "string",
    "createdAt": "2020-06-04T09:48:43Z",
    "updatedAt": "2020-06-04T09:48:43Z",
    "txId": "string",
    "blockchainLink": "string",
    "errorCode": "string",
    "confirmations": 0,
    "confirmationsRequired": 0,
    "targetAddress": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK Success Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [AltMarket.Account.TransferData] false none none
» asset string false none none
» paymentSystem string false none none
» transferId string false none none
» type string false none none
» status string false none none
» amount string false none none
» fee string false none none
» errorDetails string false none none
» createdAt string(date-time) false none none
» updatedAt string(date-time) false none none
» txId string false none none
» blockchainLink string false none none
» errorCode string false none none
» confirmations integer(int32) false none none
» confirmationsRequired integer(int32) false none none
» targetAddress string false none none

Enumerated Values

Property Value
type Deposit
type Withdrawal
status AwaitingConfirmation
status Unused_Pending
status Completed
status Failed
status Unused_PendingCancellation
status Unused_Canceled
status Unused_CompletedUpdate
status Unused_FundsLocked
status Unused_PaymentSystemError

Balance

Code samples

require 'rest-client'
require 'json'

headers = {
  'content-type' => 'application/json',
  'Key' => 'API_KEY',
  'Sign' => 'API_SIGN'
}

result = RestClient.get 'https://exchange.alt.market/api/wallet/balance',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'content-type': 'application/json',
  'Key': 'API_KEY',
  'Sign': 'API_SIGN'
}

r = requests.get('https://exchange.alt.market/api/wallet/balance', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "content-type": []string{"application/json"},
        "Key": []string{"API_KEY"},
        "Sign": []string{"API_SIGN"}
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/api/wallet/balance", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Key' => 'API_KEY',
    'Sign' => 'API_SIGN'
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://exchange.alt.market/api/wallet/balance', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /api/wallet/balance

Example responses

200 Response

[{"asset":"string","totalBalance":0,"inOrder":0,"availableBalance":0}]
[
  {
    "asset": "string",
    "totalBalance": 0,
    "inOrder": 0,
    "availableBalance": 0
  }
]

Responses

Status Meaning Description Schema
200 OK Success Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [AltMarket.Api.AccountAssetResponse] false none none
» asset string false none none
» totalBalance number(double) false none none
» inOrder number(double) false none none
» availableBalance number(double) false none none

Schemas

AltMarket.Api.AssetResponse

{
  "id": "string",
  "can_deposit": true,
  "can_withdraw": true,
  "image_url": "string",
  "asset_name": "string",
  "withdrawal_fee": 0,
  "scale": 0
}

Properties

Name Type Required Restrictions Description
id string false none none
can_deposit boolean false none none
can_withdraw boolean false none none
image_url string false none none
asset_name string false none none
withdrawal_fee number(double) false none none
scale integer(int32) false none none

AltMarket.Api.InfoResponse

{
  "serverTime": 0,
  "pairs": {
    "property1": {
      "baseAsset": "string",
      "quoteAsset": "string",
      "minPrice": 0,
      "maxPrice": 0,
      "minAmount": 0,
      "hidden": 0,
      "fee": 0,
      "makerFee": 0,
      "makerFeeLimit": 0,
      "takerFee": 0,
      "takerFeeLimit": 0,
      "priceScale": 0,
      "amountScale": 0,
      "status": "Open"
    },
    "property2": {
      "baseAsset": "string",
      "quoteAsset": "string",
      "minPrice": 0,
      "maxPrice": 0,
      "minAmount": 0,
      "hidden": 0,
      "fee": 0,
      "makerFee": 0,
      "makerFeeLimit": 0,
      "takerFee": 0,
      "takerFeeLimit": 0,
      "priceScale": 0,
      "amountScale": 0,
      "status": "Open"
    }
  },
  "plaidPublicKey": "string",
  "environment": "string"
}

Properties

Name Type Required Restrictions Description
serverTime integer(int64) false none none
pairs object false none none
» additionalProperties AltMarket.Api.MarketInfo false none none
plaidPublicKey string false none none
environment string false none none

AltMarket.Api.MarketInfo

{
  "baseAsset": "string",
  "quoteAsset": "string",
  "minPrice": 0,
  "maxPrice": 0,
  "minAmount": 0,
  "hidden": 0,
  "fee": 0,
  "makerFee": 0,
  "makerFeeLimit": 0,
  "takerFee": 0,
  "takerFeeLimit": 0,
  "priceScale": 0,
  "amountScale": 0,
  "status": "Open"
}

Properties

Name Type Required Restrictions Description
baseAsset string false none none
quoteAsset string false none none
minPrice number(double) false none none
maxPrice number(double) false none none
minAmount number(double) false none none
hidden integer(int32) false none none
fee number(double) false none none
makerFee number(double) false none none
makerFeeLimit number(double) false none none
takerFee number(double) false none none
takerFeeLimit number(double) false none none
priceScale integer(int32) false none none
amountScale integer(int32) false none none
status string false none none

Enumerated Values

Property Value
status Open
status Halted
status Paused

AltMarket.Api.OrderRequest

{
  "order": {
    "instrument": "string",
    "type": "string",
    "amount": 0,
    "price": 0,
    "activationPrice": 0,
    "isLimit": true,
    "isStop": true,
    "side": "Buy",
    "orderType": "Limit"
  }
}

Properties

Name Type Required Restrictions Description
order AltMarket.Api.OrderInfoRequest false none none

AltMarket.Api.OrderInfoRequest

{
  "instrument": "string",
  "type": "string",
  "amount": 0,
  "price": 0,
  "activationPrice": 0,
  "isLimit": true,
  "isStop": true,
  "side": "Buy",
  "orderType": "Limit"
}

Properties

Name Type Required Restrictions Description
instrument string false none none
type string false none none
amount number(double) false none none
price number(double) false none none
activationPrice number(double) false none none
isLimit boolean false none none
isStop boolean false none none
side string false read-only none
orderType string false read-only none

Enumerated Values

Property Value
side Buy
side Sell
orderType Limit
orderType Market
orderType StopLimit
orderType StopMarket

AltMarket.Api.OrderResponse

{
  "order": {
    "orderId": "string",
    "total": 0,
    "orderType": "Limit",
    "commission": 0,
    "createdAt": "2020-06-04T09:48:43Z",
    "unitsFilled": 0,
    "isPending": true,
    "status": "Working",
    "type": "string",
    "amount": 0,
    "price": 0,
    "stopPrice": 0,
    "isLimit": true,
    "instrument": "string",
    "side": "Buy"
  }
}

Properties

Name Type Required Restrictions Description
order AltMarket.Api.OrderInfoResponse false none none

AltMarket.Api.OrderInfoResponse

{
  "orderId": "string",
  "total": 0,
  "orderType": "Limit",
  "commission": 0,
  "createdAt": "2020-06-04T09:48:43Z",
  "unitsFilled": 0,
  "isPending": true,
  "status": "Working",
  "type": "string",
  "amount": 0,
  "price": 0,
  "stopPrice": 0,
  "isLimit": true,
  "instrument": "string",
  "side": "Buy"
}

Properties

Name Type Required Restrictions Description
orderId string false none none
total number(double) false none none
orderType string false none none
commission number(double) false none none
createdAt string(date-time) false none none
unitsFilled number(double) false none none
isPending boolean false none none
status string false none none
type string false none none
amount number(double) false none none
price number(double) false none none
stopPrice number(double) false none none
isLimit boolean false none none
instrument string false none none
side string false none none

Enumerated Values

Property Value
orderType Limit
orderType Market
orderType StopLimit
orderType StopMarket
status Working
status Rejected
status Cancelled
status Completed
side Buy
side Sell

AltMarket.Http.Paging

{
  "page": 0,
  "per_page": 0,
  "total": 0
}

Properties

Name Type Required Restrictions Description
page integer(int32) false none none
per_page integer(int32) false none none
total integer(int32) false none none

AltMarket.Account.TradeHistoryItem

{
  "tradeSeq": 0,
  "tradeTime": "2020-06-04T09:48:43Z",
  "amount": 0,
  "executionPrice": 0,
  "instrument": "string",
  "side": "Buy",
  "commission": 0
}

Properties

Name Type Required Restrictions Description
tradeSeq integer(int64) false none none
tradeTime string(date-time) false none none
amount number(double) false none none
executionPrice number(double) false none none
instrument string false none none
side string false none none
commission number(double) false none none

Enumerated Values

Property Value
side Buy
side Sell

AltMarket.FrontOffice.DepositFundsRequest

{
  "assetId": "string"
}

Properties

Name Type Required Restrictions Description
assetId string false none none

AltMarket.FrontOffice.DepositFundsResponse

{
  "asset": "string",
  "paymentSystem": "string",
  "address": "string",
  "error": "string"
}

Properties

Name Type Required Restrictions Description
asset string false none none
paymentSystem string false none none
address string false none none
error string false none none

AltMarket.Api.WithdrawalRequest

{
  "transferId": "string",
  "assetId": "string",
  "amount": 0,
  "address": "string"
}

Properties

Name Type Required Restrictions Description
transferId string false none none
assetId string false none none
amount number(double) false none none
address string false none none

AltMarket.Account.TransferData

{
  "asset": "string",
  "paymentSystem": "string",
  "transferId": "string",
  "type": "Deposit",
  "status": "AwaitingConfirmation",
  "amount": "string",
  "fee": "string",
  "errorDetails": "string",
  "createdAt": "2020-06-04T09:48:43Z",
  "updatedAt": "2020-06-04T09:48:43Z",
  "txId": "string",
  "blockchainLink": "string",
  "errorCode": "string",
  "confirmations": 0,
  "confirmationsRequired": 0,
  "targetAddress": "string"
}

Properties

Name Type Required Restrictions Description
asset string false none none
paymentSystem string false none none
transferId string false none none
type string false none none
status string false none none
amount string false none none
fee string false none none
errorDetails string false none none
createdAt string(date-time) false none none
updatedAt string(date-time) false none none
txId string false none none
blockchainLink string false none none
errorCode string false none none
confirmations integer(int32) false none none
confirmationsRequired integer(int32) false none none
targetAddress string false none none

Enumerated Values

Property Value
type Deposit
type Withdrawal
status AwaitingConfirmation
status Unused_Pending
status Completed
status Failed
status Unused_PendingCancellation
status Unused_Canceled
status Unused_CompletedUpdate
status Unused_FundsLocked
status Unused_PaymentSystemError

AltMarket.Api.AccountAssetResponse

{
  "asset": "string",
  "totalBalance": 0,
  "inOrder": 0,
  "availableBalance": 0
}

Properties

Name Type Required Restrictions Description
asset string false none none
totalBalance number(double) false none none
inOrder number(double) false none none
availableBalance number(double) false none none

AltMarket.Http.Response_1_System.Collections.Generic.IEnumerable_1_AltMarket.Api.AssetResponse_AltMarket_Version_1.0.0.0_Culture_neutral_PublicKeyToken_null_System.Private.CoreLib_Version_4.0.0.0_Culture_neutral_PublicKeyToken_7cec85d7bea7798e_

{
  "data": [
    {
      "id": "string",
      "can_deposit": true,
      "can_withdraw": true,
      "image_url": "string",
      "asset_name": "string",
      "withdrawal_fee": 0,
      "scale": 0
    }
  ]
}

Properties

Name Type Required Restrictions Description
data [AltMarket.Api.AssetResponse] false none none

AltMarket.Http.Response_1_System.Int32_System.Private.CoreLib_Version_4.0.0.0_Culture_neutral_PublicKeyToken_7cec85d7bea7798e_

{
  "data": 0
}

Properties

Name Type Required Restrictions Description
data integer(int32) false none none

AltMarket.Http.FilteredResponse_1_AltMarket.Api.OrderInfoResponse_AltMarket_Version_1.0.0.0_Culture_neutral_PublicKeyToken_null_

{
  "filters": {},
  "paging": {
    "page": 0,
    "per_page": 0,
    "total": 0
  },
  "data": [
    {
      "orderId": "string",
      "total": 0,
      "orderType": "Limit",
      "commission": 0,
      "createdAt": "2020-06-04T09:48:43Z",
      "unitsFilled": 0,
      "isPending": true,
      "status": "Working",
      "type": "string",
      "amount": 0,
      "price": 0,
      "stopPrice": 0,
      "isLimit": true,
      "instrument": "string",
      "side": "Buy"
    }
  ]
}

Properties

Name Type Required Restrictions Description
filters object false none none
paging AltMarket.Http.Paging false none none
data [AltMarket.Api.OrderInfoResponse] false none none

AltMarket.Http.FilteredResponse_1_AltMarket.Account.TradeHistoryItem_AltMarket.Account.Data_Version_1.0.0.0_Culture_neutral_PublicKeyToken_null_

{
  "filters": {},
  "paging": {
    "page": 0,
    "per_page": 0,
    "total": 0
  },
  "data": [
    {
      "tradeSeq": 0,
      "tradeTime": "2020-06-04T09:48:43Z",
      "amount": 0,
      "executionPrice": 0,
      "instrument": "string",
      "side": "Buy",
      "commission": 0
    }
  ]
}

Properties

Name Type Required Restrictions Description
filters object false none none
paging AltMarket.Http.Paging false none none
data [AltMarket.Account.TradeHistoryItem] false none none