Базовый адрес

Формат и авторизация

Методы

  1. Получение списка операторов.

    **GET** "<https://api.kryptex.com/api/v1/p2p/operators/>"
    
    response = {
        "count": 7,
        "next": null,
        "previous": null,
        "results": [
            ...
            {
                "id": 3,
                "name": "Best #1 (old, unused)",
                "balances": {
                    "RUB": 2650.56,
                    "TRY": 0
                },
                "usdt_erc20_address": "",
                "usdt_trc20_address": "",
                "btc_address": "",
                "eth_address": ""
            },
            {
                "id": 2,
                "name": "Kryptex #1",
                "balances": {
                    "RUB": 0,
                    "TRY": 0
                },
                "usdt_erc20_address": "",
                "usdt_trc20_address": "",
                "btc_address": "",
                "eth_address": ""
            },
            {
                "id": 1,
                "name": "Coinschan1",
                "balances": {
                    "RUB": 445905.33,
                    "TRY": 0
                },
                "usdt_erc20_address": "",
                "usdt_trc20_address": "TTQPCE5GmQW8rngzKAmuJX8k3k3AahDJzt",
                "btc_address": "",
                "eth_address": ""
            }
        ]
    }
    
  2. Получение информации о операторе.

    **GET** "<https://api.kryptex.com/api/v1/p2p/operators/3/>"
    
    response = {
        "id": 3,
        "name": "Best #1 (old, unused)",
        "balances": {
            "RUB": 2650.56,
            "TRY": 0
        },
        "usdt_erc20_address": "",
        "usdt_trc20_address": "",
        "btc_address": "",
        "eth_address": ""
    }
    
  3. Получение списка трансферов.

    **GET** "<https://api.kryptex.com/api/v1/p2p/transfers/>"
    
    {
        "count": 399,
        "next": "<https://api.kryptex.com/api/v1/p2p/transfers/?limit=100&offset=100>",
        "previous": null,
        "results": [
            {
                "id": 399,
                "date": "2022-05-11T15:16:45.960547Z",
                "coin": "USDT (TRC20)",
                "amount_sent": "5000.00000000",
                "currency": "RUB",
                "amount_rcvd": "335699.0000",
                "rate_market": "68.51000000",
                "rate_used": "67.13980000",
                "fee": "6851.0000",
                "recipient": 1
            },
            {
                "id": 398,
                "date": "2022-05-10T13:15:19.440730Z",
                "coin": "USDT (TRC20)",
                "amount_sent": "5000.00000000",
                "currency": "RUB",
                "amount_rcvd": "344960.0000",
                "rate_market": "70.40000000",
                "rate_used": "68.99200000",
                "fee": "7040.0000",
                "recipient": 6
            },
    				...
        ]
    }
    
  4. Получение трансферов для оператора

    **GET** "<https://api.kryptex.com/api/v1/p2p/transfers/?recipient=3>"
    
    response = {
        "count": 22,
        "next": null,
        "previous": null,
        "results": [
            {
                "id": 72,
                "date": "2021-10-19T06:52:19.670038Z",
                "coin": "USDT (ERC20)",
                "amount_sent": "10000.00000000",
                "currency": "RUB",
                "amount_rcvd": "698737.0000",
                "rate_market": "71.29970000",
                "rate_used": "69.87370000",
                "fee": "14260.0000",
                "recipient": 3
            },
            {
                "id": 53,
                "date": "2021-10-12T06:44:53.639622Z",
                "coin": "USDT (ERC20)",
                "amount_sent": "10000.00000000",
                "currency": "RUB",
                "amount_rcvd": "704306.0000",
                "rate_market": "71.86800000",
                "rate_used": "70.43060000",
                "fee": "14374.0000",
                "recipient": 3
            },
    				...
    	]
    }
    
  5. Получение информации о трансфере

    **GET** "<https://api.kryptex.com/api/v1/p2p/transfers/58/>"
    
    response = {
        "id": 58,
        "date": "2021-10-13T20:43:35.246542Z",
        "coin": "USDT (ERC20)",
        "amount_sent": "10000.00000000",
        "currency": "RUB",
        "amount_rcvd": "704914.0000",
        "rate_market": "71.93000000",
        "rate_used": "70.49140000",
        "fee": "14386.0000",
        "recipient": 1
    }
    
  6. Получение списка ордеров

    **GET** "<https://api.kryptex.com/api/v1/p2p/orders/>"
    
    response = {
        "count": 5071,
        "next": "<https://api.kryptex.com/api/v1/p2p/orders/?limit=100&offset=100>",
        "previous": null,
        "results": [
            {
                "id": 5071,
                "status": "CREATED",
                "amount": "3655.71",
                "fee": "50.00",
                "currency": "RUB",
                "number": "...",
                "bank": "Сбербанк",
                "name": "...",
                "phone": "...",
                "operator": null,
                "date_created": "2021-10-13T21:02:31.561623Z",
                "date_closed": null.
    						"tx_id": ""
            },
            {
                "id": 5070,
                "status": "SENT",
                "amount": "4663.37",
                "fee": "50.00",
                "currency": "RUB",
                "number": "...",
                "bank": "Сбербанк",
                "name": "...",
                "phone": "...",
                "operator": 4,
                "date_created": "2021-10-13T20:53:31.123328Z",
                "date_closed": "2021-10-13T20:59:42.488287Z",
    						"tx_id": "..."
            },
            ...
            {
                "id": 4972,
                "status": "SENT",
                "amount": "6168.27",
                "fee": "50.00",
                "currency": "RUB",
                "number": ...",
                "bank": "Альфа-Банк",
                "name": "...",
                "phone": "...",
                "operator": 1,
                "date_created": "2021-10-12T20:42:29.387994Z",
                "date_closed": "2021-10-13T12:19:20.898874Z",
    						"tx_id": "..."
            }
        ]
    }
    
  7. Получение списка ордеров c фильтрацией по статусу, по оператору, по банку, по валюте и сортировкой по дате создания

    **GET** "<https://api.kryptex.com/api/v1/p2p/orders/?bank=Sberbank&operator=3&ordering=date_created&status=SENT&currency=RUB>"
    
    response = {
        "count": 529,
        "next": "<https://api.kryptex.com/api/v1/p2p/orders/?bank=Sberbank&currency=RUB&limit=100&offset=100&operator=3&ordering=date_created&status=SENT>",
        "previous": null,
        "results": [
            {
                "id": 4,
                "status": "SENT",
                "amount": "40000.00",
                "fee": "50.00",
                "currency": "RUB",
                "number": "4274 3200 6349 4531",
                "bank": "Sberbank",
                "name": "MAXIM MALYSH",
                "phone": "",
                "operator": 3,
                "date_created": "2021-09-18T20:03:25.608937Z",
                "date_closed": "2021-09-19T15:21:48.448643Z",
                "tx_id": ""
            },
            {
                "id": 35,
                "status": "SENT",
                "amount": "11920.58",
                "fee": "50.00",
                "currency": "RUB",
                "number": "4817 7603 2089 3443",
                "bank": "Sberbank",
                "name": "",
                "phone": "",
                "operator": 3,
                "date_created": "2021-09-21T13:22:19.285767Z",
                "date_closed": "2021-09-21T13:32:03.597706Z",
                "tx_id": ""
            },
    				...
        ]
    }
    
  8. Получение информации об ордере

    **GET** "<https://api.kryptex.com/api/v1/p2p/orders/5071/>"
    
    response = {
        "id": 5071,
        "status": "SENT",
        "amount": "3655.71",
        "fee": "50.00",
        "currency": "RUB",
        "number": "...",
        "bank": "Сбербанк",
        "name": "...",
        "phone": "...",
        "operator": 4,
        "date_created": "2021-10-13T21:02:31.561623Z",
        "date_closed": "2021-10-13T21:11:35.939943Z",
    		"tx_id": "..."
    }
    
  9. Взятия ордера на себя (перевод в статус PROCESSED).

    **POST** "<https://api.kryptex.com/api/v1/p2p/orders/5071/process/>"
    
    response = None [HTTP 200 OK]
    response = {"order": "Invalid order status: \\"PROCESSED\\"."} [HTTP 400 Bad Request]
    
  10. Отправка ордера (перевод в статус SENT).

    **POST** "<https://api.kryptex.com/api/v1/p2p/orders/5071/sent/>"
    **BODY**: {"tx_id": "идентификатор в вашей системе"}
    
    response = None [HTTP 200 OK]
    response = {"order": "Invalid order status: \\"CREATED\\"."} [HTTP 400 Bad Request]
    response = {"operator": "Invalid order operator: \\"2\\""} [HTTP 400 Bad Request]
    
  11. Отмена ордера (перевод в статус CANCELED).

    **POST** "<https://api.kryptex.com/api/v1/p2p/orders/5071/cancel/>"
    
    response = None [HTTP 200 OK]
    response = {"order": "Invalid order status: \\"CREATED\\"."} [HTTP 400 Bad Request]
    response = {"operator": "Invalid order operator: \\"2\\""} [HTTP 400 Bad Request]
    

Схема работы

Движение ордеров по статусам:

[CREATED] -> [PROCESSED] -> [SENT]
												 -> [CANCELED]
  1. Получение списка ордеров: **GET**"<https://api.kryptex.com/api/v1/p2p/orders/?operator=3&ordering=date_created&status=CREATED&currency=RUB>"