Skip to main content
POST
/
newOrder
newOrder
curl --request POST \
  --url https://alphainsider.com/api/newOrder \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "strategy_id": "<string>",
  "stock_id": "<string>",
  "action": "buy",
  "type": "limit",
  "amount": "<string>",
  "total": "<string>",
  "price": "<string>",
  "stop_price": "<string>"
}
'
{
  "success": true,
  "response": {
    "order_id": "qoppbNXH4lG0-4x21YLCp",
    "strategy_id": "7Wy5AzIKY9bCmkIqjcLSg",
    "type": "limit",
    "action": "sell",
    "stop_price": null,
    "price": "4000.000000000000000",
    "amount": "0.000200000000000",
    "total": null,
    "created_at": "2024-10-22T21:47:19.540Z",
    "stock_id": "v3lhjrwEhNuAOxPT29oxO",
    "figi_composite": null,
    "symbol": "ETH-USD",
    "name": "Ethereum",
    "sector": "Cryptocurrencies",
    "security": "cryptocurrency",
    "exchange": "COINBASE",
    "stock": "ETH",
    "peg": "USD",
    "provider": "coinbase",
    "slippage": "0.000000000000000",
    "fee": "0.002500000000000",
    "links": {
      "trading_view": "https://www.tradingview.com/symbols/ETHUSD/?exchange=COINBASE",
      "yahoo_finance": "https://finance.yahoo.com/quote/ETH-USD",
      "coin_marketcap": "https://coinmarketcap.com/currencies/ethereum/",
      "google_finance": "https://www.google.com/finance/quote/ETH-USD"
    },
    "stock_status": "active",
    "bid": "2633.43",
    "ask": "2633.43",
    "last": "2633.43"
  }
}

Headers

Authorization
string<JWT>
required

User API token.

Body

application/json
strategy_id
string
required

Strategy ID.

stock_id
string
required

Stock ID. "stock:exchange" or "stock_id"

action
enum<string>
required

Order action.

Available options:
buy,
sell
type
enum<string>
required

Type of order.

Available options:
limit,
market,
stop_limit,
stop_market,
oco
amount
string<double(30,15)>

Number of shares to trade (sell orders only).

total
string<double(30,15)>

Cash allocated towards order (buy orders only).

price
string<double(30,15)>

Price to make trade at.

stop_price
string<double(30,15)>

Price to trigger order.

Response

Request was successful.