SeaDragon APIs Documentation
This document outlines the APIs provided by the SeaDragon WordPress plugin, enabling users to interact with various services such as market data, account management, and order processing.
Authentication
All API requests require basic authentication. Users must provide their username
and password
to access the endpoints.
1. Get Current Price
Endpoint Description:
Retrieves the current price of a specified cryptocurrency symbol, such as BTCUSDT.
HTTP Method: GET
Endpoint URL:
{{base_url}}/wp-json/seadragon/v1/current-price?symbol=BTCUSDT
Parameters:
- symbol
: Cryptocurrency symbol (e.g., BTCUSDT).
Authentication:
Basic Authentication with username
and password
.
Sample Request:
GET {{base_url}}/wp-json/seadragon/v1/current-price?symbol=BTCUSDT
Authorization: Basic [encoded username and password]
Response:
The response will contain the current price of the specified cryptocurrency.
2. Get Account Info
Endpoint Description:
Retrieves information about the user's account.
HTTP Method: GET
Endpoint URL:
{{base_url}}/wp-json/seadragon/v1/account-info/
Authentication:
Basic Authentication with username
and password
.
Sample Request:
GET {{base_url}}/wp-json/seadragon/v1/account-info/
Authorization: Basic [encoded username and password]
Response:
The response includes details about the user's account such as balance, transaction history, etc.
3. Get Trade History
Endpoint Description:
Retrieves the trade history for a specified cryptocurrency symbol.
HTTP Method: GET
Endpoint URL:
{{base_url}}/wp-json/seadragon/v1/trade-history/?symbol=XRPUSDT
Parameters:
- symbol
: Cryptocurrency symbol (e.g., XRPUSDT).
Authentication:
Basic Authentication with username
and password
.
Sample Request:
GET {{base_url}}/wp-json/seadragon/v1/trade-history/?symbol=XRPUSDT
Authorization: Basic [encoded username and password]
Response:
The response includes the trade history of the specified cryptocurrency symbol.
4. Place Limit Order
Endpoint Description:
Allows the user to place a trading order with specified details such as symbol, side, type, quantity, and price.
HTTP Method: POST
Endpoint URL:
{{base_url}}/wp-json/seadragon/v1/place-order/
Request Body:
{
"symbol": "XRPUSDT",
"side": "SELL",
"type": "LIMIT",
"quantity": "10",
"price": "0.53300000",
"timeInForce": "GTC",
"source": "Shark",
"reduceOnly": "false"
}
Authentication:
Basic Authentication with username
and password
.
Sample Request:
POST {{base_url}}/wp-json/seadragon/v1/place-order/
Content-Type: application/json
Authorization: Basic [encoded username and password]
{
"symbol": "XRPUSDT",
"side": "SELL",
"type": "LIMIT",
"quantity": "10",
"price": "0.53300000",
"timeInForce": "GTC",
"source": "Shark",
"reduceOnly": "false"
}
Response:
The response will confirm the placement of the order along with its details.
5. Place Market Order
Endpoint Description:
This endpoint is used to place a market order for a specified cryptocurrency symbol, side, and quantity.
HTTP Method: POST
Endpoint URL:
{{base_url}}/wp-json/seadragon/v1/place-order/
Request Body:
{
"symbol": "ETHUSDT",
"side": "SELL",
"type": "MARKET",
"quantity": "1",
"source": "BTC_Bully",
"reduceOnly": "true"
}
Authentication:
Basic Authentication with username
and password
.
Sample Request:
POST {{base_url}}/wp-json/seadragon/v1/place-order/
Content-Type: application/json
Authorization: Basic [encoded username and password]
{
"symbol": "ETHUSDT",
"side": "SELL",
"type": "MARKET",
"quantity": "1",
"source": "BTC_Bully",
"reduceOnly": "true"
}
Response:
The response confirms the placement of the market order with its details.
6. Place Order with Fixed Amount
Endpoint Description:
Enables placing an order with a fixed amount, specifying the symbol, side, and other order details.
HTTP Method: POST
Endpoint URL:
{{base_url}}/wp-json/seadragon/v1/place-order-with-fixed-amount/
Request Body:
{
"symbol": "ETHUSDT",
"side": "BUY",
"source": "XRPKING",
"reduceOnly": "false"
}
Authentication:
Basic Authentication with username
and password
.
Sample Request:
POST {{base_url}}/wp-json/seadragon/v1/place-order-with-fixed-amount/
Content-Type: application/json
Authorization: Basic [encoded username and password]
{
"symbol": "ETHUSDT",
"side": "BUY",
"source": "XRPKING",
"reduceOnly": "false"
}
Response:
The response will confirm the placement of the order with a fixed amount along with its details.
7. Check Order Status
Endpoint Description:
This endpoint allows users to check the status of an order using its symbol and order ID.
HTTP Method: GET
Endpoint URL:
{{base_url}}/wp-json/seadragon/v1/order-status/?symbol=XRPUSDT&orderId=257028265
Parameters:
- symbol
: Cryptocurrency symbol (e.g., XRPUSDT).
- orderId
: The specific order ID to check.
Authentication:
Basic Authentication with username
and password
.
Sample Request:
GET {{base_url}}/wp-json/seadragon/v1/order-status/?symbol=XRPUSDT&orderId=257028265
Authorization: Basic [encoded username and password]
Response:
The response includes the current status of the specified order.
8. Get 24hr Ticker Price Change Statistics
Endpoint Description:
Provides statistics for the price change of a specified cryptocurrency symbol over the last 24 hours.
HTTP Method: GET
Endpoint URL:
{{base_url}}/wp-json/seadragon/v1/24hr-ticker-stats/?symbol=BTCUSDT
Parameters:
- symbol
: Cryptocurrency symbol (e.g., BTCUSDT).
Authentication:
Basic Authentication with username
and password
.
Sample Request:
GET {{base_url}}/wp-json/seadragon/v1/24hr-ticker-stats/?symbol=BTCUSDT
Authorization: Basic [encoded username and password]
Response:
The response includes statistics like price change, high price, low price, and volume for the past 24 hours of the specified symbol.
9. Get Exchange Information
Endpoint Description:
Retrieves general information about the exchange, including supported symbols and order types.
HTTP Method: GET
Endpoint URL:
{{base_url}}/wp-json/seadragon/v1/exchange-info/
Authentication:
Basic Authentication with username
and password
.
Sample Request:
GET {{base_url}}/wp-json/seadragon/v1/exchange-info/
Authorization: Basic [encoded username and password]
Response:
The response provides detailed information about the exchange, including trading pairs, symbol details, and order types.
10. Get All Orders
Endpoint Description:
Retrieves all orders for a specific cryptocurrency symbol, including both open and historically closed orders.
HTTP Method: GET
Endpoint URL:
{{base_url}}/wp-json/seadragon/v1/all-orders/?symbol=ETHUSDT
Parameters:
- symbol
: Cryptocurrency symbol (e.g., ETHUSDT).
Authentication:
Basic Authentication with username
and password
.
Sample Request:
GET {{base_url}}/wp-json/seadragon/v1/all-orders/?symbol=ETHUSDT
Authorization: Basic [encoded username and password]
Response:
The response includes details of all orders placed for the specified symbol.
Summary
This documentation provided an overview of the various endpoints available in the SeaDragon APIs. These endpoints allow users to interact with market data, manage accounts, place orders, check order statuses, and get exchange information, among other functionalities. Each endpoint requires basic authentication and follows a specific HTTP request format as outlined.
Closing Remarks
The SeaDragon APIs offer a robust set of tools for interacting with cryptocurrency market data and managing trading activities. Proper implementation and usage of these APIs can significantly enhance trading strategies and overall market interaction. For any further inquiries or support, users should contact us.