Coins.ph Coins Pro — System

Coins Pro — System API (TRADING v1.0.0) — part of the Coins.ph developer platform.

OpenAPI Specification

coinsph-system-openapi.json Raw ↑
{
  "openapi": "3.0.0",
  "info": {
    "title": "TRADING",
    "version": "1.0.0",
    "description": "API reference for General endpoints — Coins.ph"
  },
  "servers": [
    {
      "url": "https://api.pro.coins.ph",
      "description": "Production"
    },
    {
      "url": "https://api.9001.pl-qa.coinsxyz.me",
      "description": "Sandbox"
    }
  ],
  "x-readme": {
    "proxy-enabled": false
  },
  "tags": [
    {
      "name": "General",
      "description": "General endpoints for connectivity, server time, system status, and user IP."
    }
  ],
  "paths": {
    "/openapi/v1/ping": {
      "get": {
        "tags": [
          "General"
        ],
        "summary": "Test Connectivity",
        "description": "Test connectivity to the Rest API. This endpoint can be used to verify that the API\nis reachable and responsive. It returns an empty object on success and requires no\nparameters or authentication.\n\n---\n\n## Additional Info\n\n**Rate Limit** [📖 Learn More](https://api.docs.coins.ph/reference/general#api-limit-introduction)\n\nWeight: 1\n\n**Use Cases** [🧩 SDK](https://api.docs.coins.ph/reference/general#sdk)\n\n- **Health Check** — Verify API availability before executing trading logic.\n- **Connection Monitoring** — Use in watchdog scripts to detect API outages.\n- **Pre-flight Check** — Confirm connectivity before sending authenticated requests.\n\n**Best Practices**\n\n- Use response time as a latency indicator for your network connection to the API.\n- Do not use this endpoint as a substitute for WebSocket keep-alive mechanisms.\n",
        "operationId": "test_connectivity",
        "security": [],
        "parameters": [],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "Test connectivity",
            "source": "curl --location 'https://api.pro.coins.ph/openapi/v1/ping'\n"
          }
        ],
        "responses": {
          "200": {
            "description": "API is reachable. Returns an empty object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "example": {}
                },
                "examples": {
                  "success": {
                    "summary": "Successful ping",
                    "value": {}
                  }
                }
              }
            }
          },
          "default": {
            "description": "API error response. The `code` field contains the internal API error code (not an HTTP status code).\n\nFor the full list of error codes, see [Error Codes](https://api.docs.coins.ph/reference/error-codes).\n"
          }
        }
      }
    },
    "/openapi/v1/time": {
      "get": {
        "tags": [
          "General"
        ],
        "summary": "Check Server Time",
        "description": "Test connectivity to the Rest API and get the current server time. The returned\n`serverTime` value is a Unix timestamp in milliseconds and can be used to synchronize\nclient-side clocks for accurate signature generation.\n\n---\n\n## Additional Info\n\n**Rate Limit** [📖 Learn More](https://api.docs.coins.ph/reference/general#api-limit-introduction)\n\nWeight: 1\n\n**Use Cases** [🧩 SDK](https://api.docs.coins.ph/reference/general#sdk)\n\n- **Clock Synchronization** — Align local system clock with server time before signing requests.\n- **Signature Debugging** — Diagnose timestamp mismatch errors (-1021) by comparing server and local time.\n- **Latency Calculation** — Measure round-trip time to estimate request delivery delay.\n\n**Best Practices**\n\n- Sync your local clock with `serverTime` at startup and periodically during long-running sessions.\n- Account for network latency when calculating the effective timestamp offset.\n- Use `serverTime` as the base when generating `timestamp` parameters for signed endpoints.\n",
        "operationId": "check_server_time",
        "security": [],
        "parameters": [],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "Get server time",
            "source": "curl --location 'https://api.pro.coins.ph/openapi/v1/time'\n"
          }
        ],
        "responses": {
          "200": {
            "description": "Current server time returned successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "serverTime": {
                      "type": "integer",
                      "format": "int64",
                      "description": "Current server time as a Unix timestamp in milliseconds.",
                      "example": 1538323200000
                    }
                  }
                },
                "examples": {
                  "success": {
                    "summary": "Server time response",
                    "value": {
                      "serverTime": 1538323200000
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "API error response. The `code` field contains the internal API error code (not an HTTP status code).\n\nFor the full list of error codes, see [Error Codes](https://api.docs.coins.ph/reference/error-codes).\n"
          }
        }
      }
    },
    "/openapi/v1/user/ip": {
      "get": {
        "tags": [
          "General"
        ],
        "summary": "Get User IP",
        "description": "Get the IP address of the current request as seen by the API server. This endpoint\nis useful for diagnosing connectivity issues, verifying the IP address that will be\nvalidated against API key IP restrictions, and confirming the outbound IP when\noperating behind proxies or NAT.\n\n---\n\n## Additional Info\n\n**Rate Limit** [📖 Learn More](https://api.docs.coins.ph/reference/general#api-limit-introduction)\n\nWeight: 1\n\n**Use Cases** [🧩 SDK](https://api.docs.coins.ph/reference/general#sdk)\n\n- **IP Whitelist Verification** — Confirm the outbound IP before configuring API key IP restrictions.\n- **Proxy/NAT Diagnosis** — Identify the effective public IP when operating behind a proxy or NAT gateway.\n- **Security Audit** — Verify which IP address is being used for API calls in production.\n\n**Best Practices**\n\n- Call this endpoint after setting up a new server or VPN to confirm the correct IP is used.\n- Use the returned IP to pre-populate the IP whitelist when creating or updating API key restrictions.\n- Re-check after infrastructure changes (e.g., IP reassignment, new NAT gateway).\n",
        "operationId": "get_user_ip",
        "security": [],
        "parameters": [],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "Get user IP",
            "source": "curl --location 'https://api.pro.coins.ph/openapi/v1/user/ip'\n"
          }
        ],
        "responses": {
          "200": {
            "description": "User IP address returned successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ip": {
                      "type": "string",
                      "description": "The public IP address of the requesting client as seen by the API server.",
                      "example": "57.181.16.43"
                    }
                  }
                },
                "examples": {
                  "success": {
                    "summary": "User IP response",
                    "value": {
                      "ip": "57.181.16.43"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "API error response. The `code` field contains the internal API error code (not an HTTP status code).\n\nFor the full list of error codes, see [Error Codes](https://api.docs.coins.ph/reference/error-codes).\n"
          }
        }
      }
    },
    "/openapi/v1/check-sys-status": {
      "get": {
        "tags": [
          "General"
        ],
        "summary": "Check System Status",
        "description": "Check the system business status. Returns the current operational status for each\nsupported business type (SPOT, CONVERT). If no `businessType` parameter is provided,\nthe response includes the status for all business types. Use this endpoint to verify\nservice availability before placing orders or executing conversions.\n\n**businessStatus Values**\n\n- `on` — Business type is enabled and fully operational.\n- `off` — Business type is disabled or under maintenance.\n\n---\n\n## Additional Info\n\n**Rate Limit** [📖 Learn More](https://api.docs.coins.ph/reference/general#api-limit-introduction)\n\nWeight: 2 (UID)\n\n**Use Cases** [🧩 SDK](https://api.docs.coins.ph/reference/general#sdk)\n\n- **Pre-Trade Verification** — Check SPOT status before placing orders to avoid unnecessary failures.\n- **Maintenance Detection** — Detect planned or unplanned maintenance windows programmatically.\n- **Multi-Business Monitoring** — Monitor status of both SPOT and CONVERT in one call.\n\n**Best Practices**\n\n- Check this endpoint before initiating critical trading or conversion workflows.\n",
        "operationId": "check_system_status",
        "parameters": [
          {
            "in": "header",
            "name": "X-COINS-APIKEY",
            "required": true,
            "schema": {
              "type": "string",
              "example": "VGkCt1GWUqWsxsCtsTvqLP7xNxOikd6wd7uPbnMIk8RUHQZ2bNd4Gcmq6NgQ6VlK"
            },
            "description": "API key for authentication."
          },
          {
            "in": "query",
            "name": "businessType",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "SPOT",
                "CONVERT"
              ],
              "example": "SPOT"
            },
            "description": "Business type to query. Optional values: SPOT, CONVERT. If not provided, returns status for all business types.\n"
          },
          {
            "in": "query",
            "name": "recvWindow",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0,
              "maximum": 60000
            },
            "description": "Request validity window in milliseconds. Default: 5000, Maximum: 60000."
          },
          {
            "in": "query",
            "name": "timestamp",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0,
              "example": 1499827319559
            },
            "description": "Unix timestamp in milliseconds."
          },
          {
            "in": "query",
            "name": "signature",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "HMAC SHA256 signature of the request parameters [📖 Learn More](https://api.docs.coins.ph/reference/general#signed-endpoint-examples-for-post-openapiv1order)"
          }
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "Check all business types",
            "source": "curl --get --location 'https://api.pro.coins.ph/openapi/v1/check-sys-status' \\\n--header 'X-COINS-APIKEY: <your api key>' \\\n--data-urlencode 'timestamp=1499827319559' \\\n--data-urlencode 'signature=<calculated_signature>'\n"
          },
          {
            "lang": "Shell",
            "label": "Check specific business type (SPOT)",
            "source": "curl --location 'https://api.pro.coins.ph/openapi/v1/check-sys-status?businessType=SPOT'\n"
          }
        ],
        "responses": {
          "200": {
            "description": "System business status returned successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "businessType": {
                        "type": "string",
                        "description": "Business type: SPOT or CONVERT.",
                        "example": "SPOT"
                      },
                      "businessStatus": {
                        "type": "string",
                        "description": "Business status: on (enabled) or off (disabled).",
                        "example": "on"
                      }
                    }
                  }
                },
                "examples": {
                  "all_types": {
                    "summary": "All business types",
                    "value": [
                      {
                        "businessType": "SPOT",
                        "businessStatus": "on"
                      },
                      {
                        "businessType": "CONVERT",
                        "businessStatus": "on"
                      }
                    ]
                  },
                  "spot_only": {
                    "summary": "SPOT status only",
                    "value": [
                      {
                        "businessType": "SPOT",
                        "businessStatus": "on"
                      }
                    ]
                  },
                  "system_maintenance": {
                    "summary": "CONVERT under maintenance",
                    "value": [
                      {
                        "businessType": "SPOT",
                        "businessStatus": "on"
                      },
                      {
                        "businessType": "CONVERT",
                        "businessStatus": "off"
                      }
                    ]
                  }
                }
              }
            }
          },
          "default": {
            "description": "API error response. The `code` field contains the internal API error code (not an HTTP status code).\n\nFor the full list of error codes, see [Error Codes](https://api.docs.coins.ph/reference/error-codes).\n"
          }
        }
      }
    },
    "/openapi/v1/api-keys": {
      "get": {
        "tags": [
          "General"
        ],
        "summary": "Get API Keys (USER_DATA)",
        "description": "Retrieve all API keys associated with your account. You may have created multiple API keys\nwith different permissions and IP restrictions. This endpoint returns information about all\nof them, with the API key values partially masked for security.\n\n**Key Notes**\n\n- Returns all API keys associated with your account.\n- Each key includes its permission scopes (`apiType`), IP restrictions, and status.\n\n**API Key Status Values**\n\n| Status | Description |\n|---|---|\n| ENABLE | Active |\n| NOT_ENABLE | Disabled |\n\n**apiType Permission Values**\n\n| Value | Description |\n|---|---|\n| Read only | Read-only access |\n| Enable Spot | Spot trading |\n| Enable Convert | Convert operations |\n| Enable Crypto Wallet | Crypto wallet operations |\n| Enable Fiat | Fiat operations |\n| Enable Account | Account management |\n\n---\n\n## Additional Info\n\n**Rate Limit** [📖 Learn More](https://api.docs.coins.ph/reference/general#api-limit-introduction)\n\nWeight: 1\n\n**Use Cases** [🧩 SDK](https://api.docs.coins.ph/reference/general#sdk)\n\n- **Key Management** — View all API keys and their configurations in one call.\n- **Security Audit** — Review IP whitelist settings and permission levels across all keys.\n- **Status Monitoring** — Check which keys are active or disabled.\n\n**Best Practices**\n\n- Periodically review API keys and disable any that are no longer needed.\n- Verify IP whitelist settings are correctly configured for production environments.\n- Use the `apiName` field to label keys for easier identification (e.g., \"trading-bot\", \"read-only\").\n",
        "operationId": "get_api_keys",
        "parameters": [
          {
            "in": "header",
            "name": "X-COINS-APIKEY",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "API key for authentication."
          },
          {
            "in": "query",
            "name": "recvWindow",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0,
              "maximum": 60000
            },
            "description": "Request validity window in milliseconds. Default: 5000, Maximum: 60000."
          },
          {
            "in": "query",
            "name": "timestamp",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0,
              "example": 1499827319559
            },
            "description": "Unix timestamp in milliseconds."
          },
          {
            "in": "query",
            "name": "signature",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "HMAC SHA256 signature of the request parameters [📖 Learn More](https://api.docs.coins.ph/reference/general#signed-endpoint-examples-for-post-openapiv1order)"
          }
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "Get all API keys",
            "source": "curl --get --location 'https://api.pro.coins.ph/openapi/v1/api-keys' \\\n--header 'X-COINS-APIKEY: <your api key>' \\\n--data-urlencode 'timestamp=1499827319559' \\\n--data-urlencode 'signature=<calculated_signature>'\n"
          }
        ],
        "responses": {
          "200": {
            "description": "API keys retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "apiKey": {
                        "type": "string",
                        "description": "The API key value.",
                        "example": "QdGqqftMXzW3qKceYHqwR..."
                      },
                      "apiName": {
                        "type": "string",
                        "description": "User-assigned name for the API key.",
                        "example": "trading-bot"
                      },
                      "apiType": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Permission scopes granted to this key. Possible values: \"Read only\", \"Enable Spot\", \"Enable Convert\", \"Enable Crypto Wallet\", \"Enable Fiat\", \"Enable Account\".\n",
                        "example": [
                          "Enable Spot",
                          "Enable Convert"
                        ]
                      },
                      "createTime": {
                        "type": "string",
                        "description": "Key creation time as a numeric string (Unix milliseconds).",
                        "example": "1711520996538"
                      },
                      "ipAccessRestrictions": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Whitelisted IP addresses. Empty array if unrestricted.",
                        "example": [
                          "57.181.16.43",
                          "57.181.16.55"
                        ]
                      },
                      "status": {
                        "type": "string",
                        "description": "API key status: ENABLE = active, NOT_ENABLE = disabled.",
                        "example": "ENABLE"
                      }
                    }
                  }
                },
                "examples": {
                  "success": {
                    "summary": "API keys response",
                    "value": [
                      {
                        "apiKey": "QdGqqftMXzW3qKceYHqwR...",
                        "apiName": "trading-bot",
                        "apiType": [
                          "Enable Spot",
                          "Enable Convert"
                        ],
                        "createTime": "1711520996538",
                        "ipAccessRestrictions": [
                          "57.181.16.43",
                          "57.181.16.55"
                        ],
                        "status": "ENABLE"
                      }
                    ]
                  }
                }
              }
            }
          },
          "default": {
            "description": "API error response. The `code` field contains the internal API error code (not an HTTP status code).\n\n| Code | Description |\n|---|---|\n| -1022 | Signature for this request is not valid |\n| -1021 | Timestamp for this request is outside of the recvWindow |\n\nFor the full list of error codes, see [Error Codes](https://api.docs.coins.ph/reference/error-codes).\n"
          }
        }
      }
    }
  }
}