Version: 1.0.0 ID: trade-alpha-matter Category: Economic Estimated Time: 2-5 minutes
Get current Alpha Matter market prices and conditions.
GET/structs/market/AlphaMatterschemas/markets.md#/markets/MarketDataExpected Response:
{
"currentPrice": "number",
"high24h": "number",
"low24h": "number",
"volume24h": "number",
"supply": "number",
"demand": "number",
"volatility": "number",
"trend": "string"
}
Determine if conditions are favorable for trading.
Price Comparison:
Supply/Demand Analysis:
Volatility Assessment:
Decision Matrix:
| Decision | Condition | Action |
|---|---|---|
| Buy | Price is low and trend is rising | Execute buy trade |
| Sell | Price is high and trend is falling | Execute sell trade |
| Wait | Conditions are uncertain | Wait for better conditions |
Verify Alpha Matter balance before trading.
GET/structs/player/{playerId}schemas/entities.md#/entities/PlayerChecks:
alphaMatterBalance: Verify current balancesufficientForTrade: Confirm balance covers trade amountPlace market order or execute immediate trade.
Execute trade immediately at current market price.
POST/cosmos/tx/v1beta1/txs/structs.structs.MsgTradeAlphaMatterschemas/trading.md#/tradingOperations/TradeAlphaMatterRequest Example:
{
"body": {
"body": {
"messages": [
{
"@type": "/structs.structs.MsgTradeAlphaMatter",
"creator": "structs1...",
"resource": "AlphaMatter",
"quantityMicrograms": "100000000",
"price": "0.001",
"type": "sell"
}
]
}
}
}
Place order at specific price (may take time to fill).
POST/cosmos/tx/v1beta1/txs/structs.structs.MsgPlaceMarketOrderschemas/trading.md#/tradingOperations/PlaceMarketOrderRequest Example:
{
"body": {
"body": {
"messages": [
{
"@type": "/structs.structs.MsgPlaceMarketOrder",
"creator": "structs1...",
"resource": "AlphaMatter",
"quantity": 100,
"price": 0.001,
"orderType": "sell"
}
]
}
}
}
Check if trade was executed successfully.
GET/structs/market/order/{orderId}schemas/markets.md#/markets/MarketOrderStatus Checks:
status: placed |
filled |
rejected |
filled: Whether the order has been filledquantityFilled: Amount filled so farVerify resource balance after trade.
GET/structs/player/{playerId}schemas/entities.md#/entities/PlayerVerification:
alphaMatterBalance: Confirm balance updatedtradeSuccessful: Confirm trade completed| Error | Code | Step | Solution | Retryable |
|---|---|---|---|---|
| Insufficient resources | INSUFFICIENT_RESOURCES |
3 | Check resource balance, mine more resources, or reduce trade quantity | Yes |
| Invalid price | INVALID_PRICE |
4 | Check current market prices, adjust price | Yes |
| Order not found | ORDER_NOT_FOUND |
5 | Verify order ID, check order status | No |