---
name: client-portal-web-api
description: "Client Portal Web API skill. Use when working with Client Portal Web for fyi, trsrv, ws. Covers 83 endpoints."
version: 1.0.0
generator: lapsh
---

# Client Portal Web API
API version: 1.0.0

## Auth
No authentication required.

## Base URL
http://localhost:5000/v1/api

## Setup
1. No auth setup needed
2. GET /fyi/unreadnumber -- verify access
3. POST /fyi/settings/{typecode} -- create first settings

## Endpoints

83 endpoints across 12 groups. See references/api-spec.lap for full details.

### fyi
| Method | Path | Description |
|--------|------|-------------|
| GET | /fyi/unreadnumber | Get unread number of fyis. The HTTP method POST is also supported. |
| GET | /fyi/settings | Get a list of subscriptions |
| POST | /fyi/settings/{typecode} | Enable/Disable certain subscription |
| GET | /fyi/disclaimer/{typecode} | Get disclaimer for a certain kind of fyi |
| PUT | /fyi/disclaimer/{typecode} | Mark disclaimer read |
| GET | /fyi/deliveryoptions | Get delivery options |
| PUT | /fyi/deliveryoptions/email | Enable/Disable email option |
| POST | /fyi/deliveryoptions/device | Enable/Disable device option |
| DELETE | /fyi/deliveryoptions/{deviceId} | Delete a device |
| GET | /fyi/notifications | Get a list of notifications |
| GET | /fyi/notifications/more | Get more notifications based on a certain one |
| PUT | /fyi/notifications/{notificationId} | Get a list of notifications |

### trsrv
| Method | Path | Description |
|--------|------|-------------|
| POST | /trsrv/secdef | Secdef by Conid |
| GET | /trsrv/secdef/schedule | Get trading schedule for symbol |
| GET | /trsrv/futures | Security Futures by Symbol |
| GET | /trsrv/stocks | Security Stocks by Symbol |

### ws
| Method | Path | Description |
|--------|------|-------------|
| POST | /ws | Websocket Endpoint |

### tickle
| Method | Path | Description |
|--------|------|-------------|
| POST | /tickle | Ping the server to keep the session open |

### logout
| Method | Path | Description |
|--------|------|-------------|
| POST | /logout | Ends the current session |

### ccp
| Method | Path | Description |
|--------|------|-------------|
| POST | /ccp/auth/init | Start CCP Session |
| POST | /ccp/auth/response | Complete CCP Session |
| GET | /ccp/status | CCP Status |
| GET | /ccp/account | Brokerage Accounts |
| GET | /ccp/positions | Positions |
| GET | /ccp/orders | Order Status |
| POST | /ccp/order | Submit Order |
| DELETE | /ccp/order | Delete Order |
| PUT | /ccp/order | Update Order |
| GET | /ccp/trades | Trades |

### hmds
| Method | Path | Description |
|--------|------|-------------|
| GET | /hmds/history | Market Data History (Beta) |
| POST | /hmds/scanner | Run Scanner (Beta) |

### sso
| Method | Path | Description |
|--------|------|-------------|
| GET | /sso/validate | Validate SSO |

### md
| Method | Path | Description |
|--------|------|-------------|
| GET | /md/snapshot | Market Data Snapshot (Beta) |

### pa
| Method | Path | Description |
|--------|------|-------------|
| POST | /pa/performance | Account Performance |
| POST | /pa/summary | Account Balance's Summary (Deprecated) |
| POST | /pa/transactions | Position's Transaction History |

### portfolio
| Method | Path | Description |
|--------|------|-------------|
| GET | /portfolio/accounts | Portfolio Accounts |
| GET | /portfolio/subaccounts | List of Sub-Accounts |
| GET | /portfolio/subaccounts2 | List of Sub-Accounts (Large Accounts) |
| GET | /portfolio/{accountId}/meta | Account Information |
| GET | /portfolio/{accountId}/allocation | Account Allocation |
| POST | /portfolio/allocation | Account Alloction (All Accounts) |
| GET | /portfolio/{accountId}/positions/{pageId} | Portfolio Positions |
| GET | /portfolio/{accountId}/position/{conid} | Position by Conid |
| POST | /portfolio/{accountId}/positions/invalidate | Invalidates the backend cache of the Portfolio |
| GET | /portfolio/{accountId}/summary | Account Summary |
| GET | /portfolio/{accountId}/ledger | Account Ledger |
| GET | /portfolio/positions/{conid} | Positions by Conid |

### iserver
| Method | Path | Description |
|--------|------|-------------|
| POST | /iserver/auth/status | Authentication Status |
| POST | /iserver/reauthenticate | Tries to re-authenticate to Brokerage |
| GET | /iserver/account/trades | List of Trades for the selected account |
| GET | /iserver/accounts | Brokerage Accounts |
| POST | /iserver/account | Switch Account |
| POST | /iserver/account/{accountId}/alert | Create or modify alert |
| GET | /iserver/account/:accountId/alerts | Get a list of available alerts |
| POST | /iserver/account/:accountId/alert/activate | Activate or deactivate an alert |
| DELETE | /iserver/account/:accountId/alert/:alertId | Delete an alert |
| GET | /iserver/account/alert/:id | Get details of an alert |
| GET | /iserver/account/mta | Get MTA alert |
| GET | /iserver/account/orders | Live Orders |
| POST | /iserver/account/{accountId}/order | Place Order (Deprecated) |
| POST | /iserver/account/{accountId}/orders | Place Orders |
| POST | /iserver/account/orders/{faGroup} | Place Orders for FA |
| POST | /iserver/reply/{replyid} | Place Order Reply |
| POST | /iserver/account/{accountId}/order/whatif | Preview Order (Deprecated) |
| POST | /iserver/account/{accountId}/orders/whatif | Preview Orders |
| GET | /iserver/account/order/status/{orderId} | Order Status |
| POST | /iserver/account/{accountId}/order/{orderId} | Modify Order |
| DELETE | /iserver/account/{accountId}/order/{orderId} | Cancel Order |
| GET | /iserver/marketdata/snapshot | Market Data |
| GET | /iserver/marketdata/{conid}/unsubscribe | Market Data Cancel (Single) |
| GET | /iserver/marketdata/unsubscribeall | Market Data Cancel (All) |
| GET | /iserver/marketdata/history | Market Data History |
| GET | /iserver/contract/{conid}/info | Contract Details |
| POST | /iserver/secdef/search | Search by Symbol or Name |
| GET | /iserver/secdef/strikes | Search Strikes |
| GET | /iserver/secdef/info | Secdef Info |
| GET | /iserver/contract/{conid}/algos | IB Algo Params |
| POST | /iserver/contract/rules | Contract Rules |
| GET | /iserver/contract/{conid}/info-and-rules | Info and Rules |
| GET | /iserver/scanner/params | Scanner Parameters |
| POST | /iserver/scanner/run | Scanner Run |
| GET | /iserver/account/pnl/partitioned | PnL for the selected account |

## Common Questions

Match user requests to endpoints in references/api-spec.lap. Key patterns:
- "List all unreadnumber?" -> GET /fyi/unreadnumber
- "List all settings?" -> GET /fyi/settings
- "Get disclaimer details?" -> GET /fyi/disclaimer/{typecode}
- "Update a disclaimer?" -> PUT /fyi/disclaimer/{typecode}
- "List all deliveryoptions?" -> GET /fyi/deliveryoptions
- "Create a device?" -> POST /fyi/deliveryoptions/device
- "Delete a deliveryoption?" -> DELETE /fyi/deliveryoptions/{deviceId}
- "List all notifications?" -> GET /fyi/notifications
- "List all more?" -> GET /fyi/notifications/more
- "Update a notification?" -> PUT /fyi/notifications/{notificationId}
- "Create a secdef?" -> POST /trsrv/secdef
- "List all schedule?" -> GET /trsrv/secdef/schedule
- "List all futures?" -> GET /trsrv/futures
- "List all stocks?" -> GET /trsrv/stocks
- "Create a w?" -> POST /ws
- "Create a tickle?" -> POST /tickle
- "Create a logout?" -> POST /logout
- "Create a init?" -> POST /ccp/auth/init
- "List all history?" -> GET /hmds/history
- "Create a response?" -> POST /ccp/auth/response
- "List all status?" -> GET /ccp/status
- "List all account?" -> GET /ccp/account
- "List all positions?" -> GET /ccp/positions
- "List all orders?" -> GET /ccp/orders
- "Create a order?" -> POST /ccp/order
- "List all trades?" -> GET /ccp/trades
- "List all validate?" -> GET /sso/validate
- "Create a scanner?" -> POST /hmds/scanner
- "List all snapshot?" -> GET /md/snapshot
- "Create a performance?" -> POST /pa/performance
- "Create a summary?" -> POST /pa/summary
- "Create a transaction?" -> POST /pa/transactions
- "List all accounts?" -> GET /portfolio/accounts
- "List all subaccounts?" -> GET /portfolio/subaccounts
- "List all subaccounts2?" -> GET /portfolio/subaccounts2
- "List all meta?" -> GET /portfolio/{accountId}/meta
- "List all allocation?" -> GET /portfolio/{accountId}/allocation
- "Create a allocation?" -> POST /portfolio/allocation
- "Get position details?" -> GET /portfolio/{accountId}/positions/{pageId}
- "Get position details?" -> GET /portfolio/{accountId}/position/{conid}
- "Create a invalidate?" -> POST /portfolio/{accountId}/positions/invalidate
- "List all summary?" -> GET /portfolio/{accountId}/summary
- "List all ledger?" -> GET /portfolio/{accountId}/ledger
- "Get position details?" -> GET /portfolio/positions/{conid}
- "Create a status?" -> POST /iserver/auth/status
- "Create a reauthenticate?" -> POST /iserver/reauthenticate
- "List all trades?" -> GET /iserver/account/trades
- "List all accounts?" -> GET /iserver/accounts
- "Create a account?" -> POST /iserver/account
- "Create a alert?" -> POST /iserver/account/{accountId}/alert
- "List all alerts?" -> GET /iserver/account/:accountId/alerts
- "Create a activate?" -> POST /iserver/account/:accountId/alert/activate
- "List all :id?" -> GET /iserver/account/alert/:id
- "List all mta?" -> GET /iserver/account/mta
- "List all orders?" -> GET /iserver/account/orders
- "Create a order?" -> POST /iserver/account/{accountId}/order
- "Create a order?" -> POST /iserver/account/{accountId}/orders
- "Create a whatif?" -> POST /iserver/account/{accountId}/order/whatif
- "Create a whatif?" -> POST /iserver/account/{accountId}/orders/whatif
- "Get status details?" -> GET /iserver/account/order/status/{orderId}
- "Delete a order?" -> DELETE /iserver/account/{accountId}/order/{orderId}
- "List all snapshot?" -> GET /iserver/marketdata/snapshot
- "List all unsubscribe?" -> GET /iserver/marketdata/{conid}/unsubscribe
- "List all unsubscribeall?" -> GET /iserver/marketdata/unsubscribeall
- "List all history?" -> GET /iserver/marketdata/history
- "List all info?" -> GET /iserver/contract/{conid}/info
- "Create a search?" -> POST /iserver/secdef/search
- "List all strikes?" -> GET /iserver/secdef/strikes
- "List all info?" -> GET /iserver/secdef/info
- "List all algos?" -> GET /iserver/contract/{conid}/algos
- "Create a rule?" -> POST /iserver/contract/rules
- "List all info-and-rules?" -> GET /iserver/contract/{conid}/info-and-rules
- "List all params?" -> GET /iserver/scanner/params
- "Create a run?" -> POST /iserver/scanner/run
- "List all partitioned?" -> GET /iserver/account/pnl/partitioned

## Response Tips
- Check response schemas in references/api-spec.lap for field details
- List endpoints may support pagination; check for limit, offset, or cursor params
- Create/update endpoints typically return the created/updated object

## CLI

```bash
# Update this spec to the latest version
npx @lap-platform/lapsh get client-portal-web-api -o references/api-spec.lap

# Search for related APIs
npx @lap-platform/lapsh search client-portal-web-api
```

## References
- Full spec: See references/api-spec.lap for complete endpoint details, parameter tables, and response schemas

> Generated from the official API spec by [LAP](https://lap.sh)
