🔌 API Documentation

REST API for programmatic access to prices, account data, and trading. All responses are JSON.

Base URL: https://mail.goypall.net/api/v1
Get API Key: /account/api-keys
Table of Contents: Authentication Public Endpoints (Prices, Markets) Account Endpoints Spot Trading Margin Trading Futures Trading Binary Trading Copy Trading Error Codes Code Examples

🔐 Authentication

Authenticated endpoints require your API key in the API-KEY header. Create keys at Account → API Keys.

curl -H "API-KEY: your_api_key_here" \
     https://mail.goypall.net/api/v1/account

Permissions:

📊 Public Endpoints NO AUTH

GET/api/v1/prices

Get all market prices.

curl https://mail.goypall.net/api/v1/prices

Response:

{
  "success": true,
  "data": {
    "BTC": {"symbol":"BTC","name":"Bitcoin","price_usd":67000.00,"change_24h":2.5,"volume_24h":1200000000},
    "ETH": {"symbol":"ETH","name":"Ethereum","price_usd":3200.00,"change_24h":1.8,"volume_24h":800000000}
  }
}
GET/api/v1/price/{symbol}

Get price for a specific symbol.

curl https://mail.goypall.net/api/v1/price/BTC
GET/api/v1/markets

List all tradeable pairs.

curl https://mail.goypall.net/api/v1/markets

👤 Account AUTH: read

GET/api/v1/account

Get account info.

curl -H "API-KEY: xxx" https://mail.goypall.net/api/v1/account
GET/api/v1/account/balances

Get all wallet balances (including chain info for multi-chain coins).

curl -H "API-KEY: xxx" https://mail.goypall.net/api/v1/account/balances

Response:

{
  "success": true,
  "data": [
    {"currency":"BTC","chain":"BTC","balance":"0.05000000"},
    {"currency":"USDT","chain":"MATIC","balance":"125.50000000"},
    {"currency":"USDT","chain":"TRON","balance":"0.00000000"}
  ]
}
GET/api/v1/account/orders?type=spot&status=open&limit=50

Get user orders. Query params: type (spot|margin|futures|binary), status, limit (max 100).

curl -H "API-KEY: xxx" "https://mail.goypall.net/api/v1/account/orders?type=futures&status=open"

💱 Spot Trading AUTH: trade

POST/api/v1/spot/order

Place a spot order.

curl -X POST -H "API-KEY: xxx" -H "Content-Type: application/json" \
     -d '{"market":"BTC","pair":"USDT","side":"buy","order_type":"market","amount":"0.01"}' \
     https://mail.goypall.net/api/v1/spot/order

Body:

POST/api/v1/spot/cancel

Cancel a spot order.

curl -X POST -H "API-KEY: xxx" -H "Content-Type: application/json" \
     -d '{"order_id": 123}' \
     https://mail.goypall.net/api/v1/spot/cancel

📈 Margin Trading AUTH: trade

POST/api/v1/margin/order

Open a margin position.

curl -X POST -H "API-KEY: xxx" -H "Content-Type: application/json" \
     -d '{"market":"ETH","pair":"USDT","side":"long","order_type":"market","amount":"0.1","leverage":10}' \
     https://mail.goypall.net/api/v1/margin/order

Body:

🚀 Futures Trading AUTH: trade

POST/api/v1/futures/order

Open a futures position.

curl -X POST -H "API-KEY: xxx" -H "Content-Type: application/json" \
     -d '{"market":"SOL","pair":"USDT","side":"long","order_type":"market","amount":"1","leverage":20,"duration_hours":24}' \
     https://mail.goypall.net/api/v1/futures/order

Body: Same as margin plus duration_hours (expiry in hours, default 24).

⏱️ Binary Trading AUTH: trade

POST/api/v1/binary/order

Place a binary bid.

curl -X POST -H "API-KEY: xxx" -H "Content-Type: application/json" \
     -d '{"market":"BTC","pair":"USDT","direction":"long","amount":"10","duration_minutes":5}' \
     https://mail.goypall.net/api/v1/binary/order

Body:

👥 Copy Trading

GET/api/v1/copy/tradersAUTH: read

List all active lead traders.

curl -H "API-KEY: xxx" https://mail.goypall.net/api/v1/copy/traders
POST/api/v1/copy/startAUTH: trade

Start copying a lead trader. Locks USDT from your wallet.

curl -X POST -H "API-KEY: xxx" -H "Content-Type: application/json" \
     -d '{"lead_trader_id": 1, "copy_amount": 100}' \
     https://mail.goypall.net/api/v1/copy/start
POST/api/v1/copy/stopAUTH: trade

Stop copying and refund remaining USDT.

curl -X POST -H "API-KEY: xxx" -H "Content-Type: application/json" \
     -d '{"lead_trader_id": 1}' \
     https://mail.goypall.net/api/v1/copy/stop

⚠️ Error Codes

HTTP CodeMeaning
200Success
400Bad request (invalid parameters)
401Missing or invalid API key
403Insufficient permissions or IP not whitelisted
404Endpoint or resource not found
500Server error

💻 Code Examples

Python

import requests

BASE = "https://mail.goypall.net/api/v1"
API_KEY = "your_api_key_here"
HEADERS = {"API-KEY": API_KEY}

# Get prices
r = requests.get(f"{BASE}/prices")
print(r.json())

# Get account balances
r = requests.get(f"{BASE}/account/balances", headers=HEADERS)
print(r.json())

# Place futures order
order = {
    "market": "BTC",
    "pair": "USDT",
    "side": "long",
    "order_type": "market",
    "amount": "0.001",
    "leverage": 10,
    "duration_hours": 24
}
r = requests.post(f"{BASE}/futures/order", json=order, headers=HEADERS)
print(r.json())

JavaScript (Node.js)

const BASE = "https://mail.goypall.net/api/v1";
const API_KEY = "your_api_key_here";

async function getPrices() {
  const r = await fetch(`${BASE}/prices`);
  return r.json();
}

async function placeFuturesOrder() {
  const r = await fetch(`${BASE}/futures/order`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      "API-KEY": API_KEY
    },
    body: JSON.stringify({
      market: "ETH",
      pair: "USDT",
      side: "long",
      order_type: "market",
      amount: "0.1",
      leverage: 10
    })
  });
  return r.json();
}

PHP

<?php
$base = "https://mail.goypall.net/api/v1";
$apiKey = "your_api_key_here";

function apiCall($path, $method = 'GET', $body = null) {
    global $base, $apiKey;
    $ch = curl_init($base . $path);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_HTTPHEADER, [
        "API-KEY: {$apiKey}",
        "Content-Type: application/json"
    ]);
    if ($method === 'POST') {
        curl_setopt($ch, CURLOPT_POST, true);
        curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($body));
    }
    $response = curl_exec($ch);
    curl_close($ch);
    return json_decode($response, true);
}

// Get balances
$balances = apiCall('/account/balances');
print_r($balances);

// Place binary order
$result = apiCall('/binary/order', 'POST', [
    'market' => 'BTC',
    'pair' => 'USDT',
    'direction' => 'long',
    'amount' => '10',
    'duration_minutes' => 5
]);
print_r($result);

Need help? Contact support