curl -X POST "https://api.strike.markets/long" \
-H "X-API-Key: stk_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"margin": "100.0",
"leverage": 10,
"symbol": "BTC-USD"
}'
{
"success": true,
"message": "Long position created successfully",
"txHash": "0x1234567890abcdef1234567890abcdef12345678",
"gasUsed": 180000,
"positionId": 12345,
"symbol": "BTC-USD",
"szi": "0.002217",
"margin": "100.0",
"entryPrice": "45123.50",
"liquidationPrice": "41234.15",
"status": "open",
"createdAt": "2024-01-15T14:30:00Z",
"spread": "5.25"
}
Overview
Create a long position with specified margin and leverage. Profits when price increases.
Authentication required: API key
Request Body
Margin amount in USD. Must be a positive number as a string.Minimum: 1 USD equivalent
Example: “100.0”
Leverage multiplier for the position.Range: 1 to 1000
Example: 10
Trading pair symbol.Supported values: “BTC-USD”, “ETH-USD”, “SOL-USD”, “BNB-USD”, “XRP-USD”, “HYPE-USD”
Example: “BTC-USD”
Response Fields
Indicates if the position was created successfully
Success message describing the operation
Blockchain transaction hash for the position creation
Amount of gas consumed for the transaction
Position size in base asset units (positive for long, negative for short)
Leverage multiplier applied to the position
Position direction - “LONG” for long positions
Unique identifier for the created position
Price at which the position will be liquidated
Complete position object with detailed information:
id: Position ID
wallet_address: Owner’s wallet address
symbol: Trading pair symbol
szi: Position size in base asset units
margin: Margin amount used
entry_price: Entry price
liquidation_price: Liquidation price
status: Position status (“open”)
created_at: ISO timestamp
leverage: Calculated leverage
position_value: Total position value
Error Responses
Invalid request parameters or insufficient balance{
"error": 400,
"message": "Insufficient balance for margin requirement"
}
Missing or invalid authentication token{
"error": 401,
"message": "Authorization header missing"
}
Rate limit exceeded (10 requests per minute for trading endpoints){
"error": "RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded. Please wait 45 seconds.",
"retry_after": 45
}
Next Steps
After creating a long position:
- Monitor Position - Use Get Positions to track your position
- Check Dashboard - View comprehensive data with Dashboard
- Close Position - Manually close with Close Position
- Emergency Exit - Use Emergency Exit if needed
Long positions are suitable when you expect the asset price to increase. Consider market conditions, volatility, and your risk tolerance when choosing leverage levels.
Strike Protocol API key authentication
Leverage multiplier (1-1000)
Required range: 1 <= x <= 1000
Market symbol (e.g., BTC-USD)
Position created successfully