Skip to main content
POST
/
updateBotAllocations
updateBotAllocations
curl --request POST \
  --url https://alphainsider.com/api/updateBotAllocations \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "bot_id": "<string>",
  "allocations": [
    {
      "strategy_id": "<string>",
      "percent": 0.5
    }
  ]
}
'
{
  "success": true,
  "response": [
    {
      "bot_allocation_id": "g1DDEzc68EPrWyhSxRPHJ",
      "bot_id": "h_zZfeqsX9o8hgB8DVc0P",
      "strategy_id": "YbKCgktxu0ugmQ1QKCfA3",
      "percent": "0.6",
      "strategy_value": "1",
      "positions": [
        {
          "position_id": "G3nEoY0dAYGXpucdAMC5R",
          "strategy_id": "YbKCgktxu0ugmQ1QKCfA3",
          "type": "asset",
          "price": "1.000000000000000",
          "amount": "1.000000000000000",
          "total": "1.000000000000000",
          "updated_at": "2024-10-17T14:24:25.987Z",
          "created_at": "2024-10-17T14:24:25.987Z",
          "stock_id": "ubfhvYUsgvMIuJPwr76My",
          "figi_composite": null,
          "symbol": "USD",
          "name": "US Dollar",
          "sector": "Unallocated",
          "security": "",
          "exchange": "ALPHAINSIDER",
          "stock": "USD",
          "peg": "USD",
          "provider": "alphainsider",
          "slippage": "0.000000000000000",
          "fee": "0.000000000000000",
          "links": {},
          "stock_status": "active",
          "bid": "1.00",
          "ask": "1.00",
          "last": "1.00"
        }
      ],
      "updated_at": "2024-10-23T14:45:48.648Z",
      "created_at": "2024-10-23T14:45:48.648Z"
    },
    {
      "bot_allocation_id": "1Su_xi4PbyC2o4HhOmjxO",
      "bot_id": "h_zZfeqsX9o8hgB8DVc0P",
      "strategy_id": "WuRnay0CF3P1oPRSdogj5",
      "percent": "0.4",
      "strategy_value": "1",
      "positions": [
        {
          "position_id": "RSTqnGGFOBVONbKNzrLUq",
          "strategy_id": "WuRnay0CF3P1oPRSdogj5",
          "type": "asset",
          "price": "1.000000000000000",
          "amount": "1.000000000000000",
          "total": "1.000000000000000",
          "updated_at": "2024-10-22T20:44:42.391Z",
          "created_at": "2024-10-22T20:44:42.391Z",
          "stock_id": "ubfhvYUsgvMIuJPwr76My",
          "figi_composite": null,
          "symbol": "USD",
          "name": "US Dollar",
          "sector": "Unallocated",
          "security": "",
          "exchange": "ALPHAINSIDER",
          "stock": "USD",
          "peg": "USD",
          "provider": "alphainsider",
          "slippage": "0.000000000000000",
          "fee": "0.000000000000000",
          "links": {},
          "stock_status": "active",
          "bid": "1.00",
          "ask": "1.00",
          "last": "1.00"
        }
      ],
      "updated_at": "2024-10-23T14:45:48.648Z",
      "created_at": "2024-10-23T14:45:48.648Z"
    }
  ]
}

Headers

Authorization
string<JWT>
required

User API token.

Body

application/json
bot_id
string
required

Bot ID.

allocations
object[]
required

Array of allocations.

Maximum array length: 100

Response

Request was successful.