diff --git a/docs/build/zano-trade-api/_category_.json b/docs/build/zano-trade-api/_category_.json new file mode 100644 index 0000000..259bac9 --- /dev/null +++ b/docs/build/zano-trade-api/_category_.json @@ -0,0 +1,3 @@ +{ + "label": "Zano trade Api" +} diff --git a/docs/build/zano-trade-api/apply-for-matched-order/_category_.json b/docs/build/zano-trade-api/apply-for-matched-order/_category_.json new file mode 100644 index 0000000..56d30a7 --- /dev/null +++ b/docs/build/zano-trade-api/apply-for-matched-order/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "Apply for matched order", + "position": 6 +} diff --git a/docs/build/zano-trade-api/apply-for-matched-order/apply-for-matched-order.md b/docs/build/zano-trade-api/apply-for-matched-order/apply-for-matched-order.md new file mode 100644 index 0000000..049628a --- /dev/null +++ b/docs/build/zano-trade-api/apply-for-matched-order/apply-for-matched-order.md @@ -0,0 +1,28 @@ +# Apply for matched order + +> Use this method to apply if another side hasn't done it yet. +> You can check if they applied by the **transaction** field in applyTips. If it's `false`, you can apply for it; otherwise, you are the finalizer and should use the **Confirm transaction** method. + +- **METHOD**: POST +- **PATH**: `/api/orders/apply-order` + +#### Request: +```typescript +{ + token: string; + orderData: { + id: string; + connected_order_id: string; + hex_raw_proposal: string; + }; +} +``` + +>Explanation of Fields: +>- to get `hex_raw_proposal` create [ionic swap proposal](https://docs.zano.org/docs/build/rpc-api/wallet-rpc-api/ionic_swap_generate_proposal/) via Zano wallet API; +>- hex_raw_proposal - Hex-encoded proposal raw data(encrypted with common shared key). Includes half-created transaction template and some extra information that would be needed counterparty to finialize and sign transaction +#### Response: +```typescript + success: boolean; + data?: string // error message +``` \ No newline at end of file diff --git a/docs/build/zano-trade-api/confirm-transaction/_category_.json b/docs/build/zano-trade-api/confirm-transaction/_category_.json new file mode 100644 index 0000000..d446b7c --- /dev/null +++ b/docs/build/zano-trade-api/confirm-transaction/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "Сonfirm transaction", + "position": 7 +} diff --git a/docs/build/zano-trade-api/confirm-transaction/confirm-transaction.md b/docs/build/zano-trade-api/confirm-transaction/confirm-transaction.md new file mode 100644 index 0000000..1a04080 --- /dev/null +++ b/docs/build/zano-trade-api/confirm-transaction/confirm-transaction.md @@ -0,0 +1,19 @@ +# Confirm transaction + +> Use this method to confirm that you have finalized the transaction (order or part). You can get its id from the **get-active-tx-by-orders-ids** method. + +- **METHOD**: POST +- **PATH**: `/api/transactions/confirm` + +#### Request: +```typescript +{ + token: string; + transactionId: number; +} +``` +#### Response: +```typescript + success: boolean; + data?: string // error message +``` \ No newline at end of file diff --git a/docs/build/zano-trade-api/create-new-order/_category_.json b/docs/build/zano-trade-api/create-new-order/_category_.json new file mode 100644 index 0000000..a94f717 --- /dev/null +++ b/docs/build/zano-trade-api/create-new-order/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "Create new order", + "position": 4 +} diff --git a/docs/build/zano-trade-api/create-new-order/create-new-order.md b/docs/build/zano-trade-api/create-new-order/create-new-order.md new file mode 100644 index 0000000..298fa82 --- /dev/null +++ b/docs/build/zano-trade-api/create-new-order/create-new-order.md @@ -0,0 +1,24 @@ +# Create new order + +- **METHOD**: POST +- **PATH**: `/api/orders/create` + +#### Request: +```typescript +{ + token: string; + orderData: { + type: 'buy' | 'sell'; + side: 'limit'; // field naming will be fixed soon. It won't affect bots, both field names will work + price: string; + amount: string; + pairId: number; + }; +} +``` + +#### Response: +```typescript + success: boolean; + data?: string // error message +``` \ No newline at end of file diff --git a/docs/build/zano-trade-api/delete-your-order/_category_.json b/docs/build/zano-trade-api/delete-your-order/_category_.json new file mode 100644 index 0000000..261f6e9 --- /dev/null +++ b/docs/build/zano-trade-api/delete-your-order/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "Delete your order", + "position": 5 +} diff --git a/docs/build/zano-trade-api/delete-your-order/delete-your-order.md b/docs/build/zano-trade-api/delete-your-order/delete-your-order.md new file mode 100644 index 0000000..d4a2f4d --- /dev/null +++ b/docs/build/zano-trade-api/delete-your-order/delete-your-order.md @@ -0,0 +1,17 @@ +# Delete your order + +- **METHOD**: POST +- **PATH**: `/api/orders/cancel` + +#### Request: +```typescript +{ + token: string; + orderId: number; +} +``` +#### Response: +```typescript + success: boolean; + data?: string // error message +``` diff --git a/docs/build/zano-trade-api/get-active-orders/_category_.json b/docs/build/zano-trade-api/get-active-orders/_category_.json new file mode 100644 index 0000000..b6dc6a4 --- /dev/null +++ b/docs/build/zano-trade-api/get-active-orders/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "Get your active orders", + "position": 3 +} diff --git a/docs/build/zano-trade-api/get-active-orders/get-active-orders.md b/docs/build/zano-trade-api/get-active-orders/get-active-orders.md new file mode 100644 index 0000000..ffe5339 --- /dev/null +++ b/docs/build/zano-trade-api/get-active-orders/get-active-orders.md @@ -0,0 +1,51 @@ +# Get your active orders +- **METHOD**: POST +- **PATH**: `/api/orders/get-user-page` + +#### Request: +```typescript +{ + token: string; + pairId: number; +} +#### Response: +```typescript + success: boolean; + data: { + orders: { + id: number; + type: string; + timestamp: string; + side: string; + price: string; + amount: string; + total: string; + pair_id: number; + user_id: number; + status: string; + left: string; + hasNotification: boolean; + createdAt: string; + updatedAt: string; + isInstant: boolean; + }[]; + + applyTips: { + id: number; + left: string; + price: string; + user: { + alias: string; + address: string; + createdAt: string; + updatedAt: string; + }; + type: string; + total: string; + connected_order_id: number; + transaction: boolean; + hex_raw_proposal: string; + isInstant: boolean; + }[]; + } +``` \ No newline at end of file diff --git a/docs/build/zano-trade-api/get-active-tx-by-id/_category_.json b/docs/build/zano-trade-api/get-active-tx-by-id/_category_.json new file mode 100644 index 0000000..305726b --- /dev/null +++ b/docs/build/zano-trade-api/get-active-tx-by-id/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "Get active Tx by orders' Ids", + "position": 10 +} diff --git a/docs/build/zano-trade-api/get-active-tx-by-id/get-active-tx-by-id.md b/docs/build/zano-trade-api/get-active-tx-by-id/get-active-tx-by-id.md new file mode 100644 index 0000000..a98bf2e --- /dev/null +++ b/docs/build/zano-trade-api/get-active-tx-by-id/get-active-tx-by-id.md @@ -0,0 +1,29 @@ +# Get active Tx by orders' Ids + +> Get active transaction data by matching 2 orders. +> So you can check if the transaction is already confirmed by another user and/or get proposal hex. + +- **METHOD**: POST +- **PATH**: `/api/transactions/get-active-tx-by-orders-ids` + +#### Request: +```typescript +{ + token: string; + firstOrderId: number; + secondOrderId: number; +} +``` +#### Response: +```typescript + success: boolean; + data?: { + buy_order_id: number; + sell_order_id: number; + amount: string; + timestamp: number; + status: string; + creator: string; + hex_raw_proposal: string; + } | string // error message +``` \ No newline at end of file diff --git a/docs/build/zano-trade-api/get-dex-trading-pair/_category_.json b/docs/build/zano-trade-api/get-dex-trading-pair/_category_.json new file mode 100644 index 0000000..fe78865 --- /dev/null +++ b/docs/build/zano-trade-api/get-dex-trading-pair/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "Get info about a DEX trading pair", + "position": 8 +} diff --git a/docs/build/zano-trade-api/get-dex-trading-pair/get-dex-trading-pair.md b/docs/build/zano-trade-api/get-dex-trading-pair/get-dex-trading-pair.md new file mode 100644 index 0000000..ac31ca2 --- /dev/null +++ b/docs/build/zano-trade-api/get-dex-trading-pair/get-dex-trading-pair.md @@ -0,0 +1,11 @@ +# Get info about a DEX trading pair + +- **METHOD**: POST +- **PATH**: `/api/dex/get-pair` + +#### Request: +```typescript +{ + id: number; +} +``` diff --git a/docs/build/zano-trade-api/overview/_category_.json b/docs/build/zano-trade-api/overview/_category_.json new file mode 100644 index 0000000..e224ed8 --- /dev/null +++ b/docs/build/zano-trade-api/overview/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "Overview", + "position": 1 +} diff --git a/docs/build/zano-trade-api/overview/overview.md b/docs/build/zano-trade-api/overview/overview.md new file mode 100644 index 0000000..5634613 --- /dev/null +++ b/docs/build/zano-trade-api/overview/overview.md @@ -0,0 +1,9 @@ +# Trade API for custom bots + +## Additional Resources +- [Zano Trade Dex](https://trade.zano.org) +- [Zano Documentation](https://docs.zano.org) +- [Ionic Swaps Overview](https://docs.zano.org/docs/build/confidential-assets/ionic-swaps) + +## RestAPI ENDPOINTS +**base URL** - https://trade.zano.org \ No newline at end of file diff --git a/docs/build/zano-trade-api/ping-activity-checker/_category_.json b/docs/build/zano-trade-api/ping-activity-checker/_category_.json new file mode 100644 index 0000000..c68eef3 --- /dev/null +++ b/docs/build/zano-trade-api/ping-activity-checker/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "Ping activity checker", + "position": 9 +} diff --git a/docs/build/zano-trade-api/ping-activity-checker/ping-activity-checker.md b/docs/build/zano-trade-api/ping-activity-checker/ping-activity-checker.md new file mode 100644 index 0000000..efb51f0 --- /dev/null +++ b/docs/build/zano-trade-api/ping-activity-checker/ping-activity-checker.md @@ -0,0 +1,22 @@ +# Ping activity checker + +> *You should call this method every 10 seconds to keep the `instant` icon active, so users know that your bot will accept the order immediately.* + +> ![instant icon](../../../../static/img/build/zano-trade-api/ping-activity-checker/instant.jpg) + +- **METHOD**: POST +- **PATH**: `/api/dex/renew-bot` + +#### Request: +```typescript +{ + token: string; + orderId: number; +} +``` + +#### Response: +```typescript + sucess: boolean; + data?: string // error message +``` \ No newline at end of file diff --git a/docs/build/zano-trade-api/trade-api/_category_.json b/docs/build/zano-trade-api/trade-api/_category_.json new file mode 100644 index 0000000..40bb974 --- /dev/null +++ b/docs/build/zano-trade-api/trade-api/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "Authenticate in System", + "position": 2 +} diff --git a/docs/build/zano-trade-api/trade-api/trade-api.md b/docs/build/zano-trade-api/trade-api/trade-api.md new file mode 100644 index 0000000..4670727 --- /dev/null +++ b/docs/build/zano-trade-api/trade-api/trade-api.md @@ -0,0 +1,25 @@ +# Authenticate in System +- **METHOD**: POST +- **PATH**: `/api/auth` + +#### Request: +```typescript +{ + data: { + address: string; + alias: string; + message: string; + signature: string; + }; + neverExpires: boolean; +} +``` + +>Explanation of Fields: +>- To get ```data``` you should [sign some message using Zano wallet](https://docs.zano.org/docs/build/rpc-api/wallet-rpc-api/sign_message/) (random string) + +#### Response: +```typescript + success: boolean; + data?: string // error message +``` \ No newline at end of file diff --git a/static/img/build/zano-trade-api/ping-activity-checker/instant.jpg b/static/img/build/zano-trade-api/ping-activity-checker/instant.jpg new file mode 100644 index 0000000..396dddf Binary files /dev/null and b/static/img/build/zano-trade-api/ping-activity-checker/instant.jpg differ