Existing-data adoption
Import existing Byk account data
Adopt portfolio and watchlist records plus historical closed or cancelled positions through one signed-in account operation. Every Byk surface submits the same raw JSON document to the same owner-scoped boundary.
The operational hold remains in force. This import records history and planning data only. It cannot create an active position, order, execution, transfer, broker connection, paid entitlement, token, live-trading setting, or autonomous economy operation.
Where to find the action
| Surface | Location | What it calls |
|---|---|---|
| Web | Sign in at trade.wisent.ai, then use Import existing Byk account data. The same optional action appears during first use. | The web client forwards the file to its authenticated account-import proxy, which pins scope=byk. |
| macOS | Sign in to Byk Desktop and choose Import in any destination, or Import existing account data… during first use. | BykTradingClient.importAccountData. |
| iOS | Use Import existing account data… during first use, or open Settings → Account data later. | AccountDataImportClient.importDocument. |
| CLI | Run byk import --file … after byk login, or provide an owner-only token file for automation. | bin/byk.mjs, independent of the held economy runtime. |
Skipping the optional first-use action leaves an empty usable account. Import acceptance does not itself complete the native assistant-result walkthroughs; those complete only after the product returns the account book or trading-assistant result each journey names.
CLI installation and invocation
The CLI belongs to wisent-ai/wisent-trade. The package fetches its onboarding dependency from a pinned GitHub revision; no sibling checkout is required:
git clone https://github.com/wisent-ai/wisent-trade.git
cd wisent-trade
npm install
npm install --global .
Configure the established Byk Supabase project with BYK_SUPABASE_URL and BYK_SUPABASE_ANON_KEY, then sign in and import:
byk login --email you@example.com
byk import --file /absolute/path/to/account-data.json
byk sign-out
byk login reads the email one-time code from a hidden interactive terminal prompt and writes the rotated session to ~/.config/byk/session.json with owner-only permissions. For automation, byk import --file FILE --token-file OWNER_ONLY_FILE accepts an owner-owned regular token file at most 64 KiB; it does not accept raw token values or document bytes through argv or standard input.
The CLI always sets scope=byk on the HTTPS import endpoint. BYK_ACCOUNT_IMPORT_URL may select another credential-free HTTPS endpoint, but cannot remove or replace the Byk scope. Installing or invoking this CLI does not start agent_runtime, issue a token, place a trade, or operate the held autonomous economy.
For the command-by-command contract, see the canonical Byk CLI reference and its import command page.
Accepted document
The selected input must be a regular, non-symbolic-link JSON file no larger than 10 MiB. The raw top-level document is sent unchanged; it is not wrapped in another object.
formatmust equalwisent.app.account-data.v1.exportedAtis a required timestamp.portfolios,watchlist, andpositionsare optional collections. Unknown top-level keys are refused.- Every record requires stable
sourceOwnerIdandsourceIdvalues. Those values, not array order, provide repeat-import identity. - Portfolio records accept the account, risk, exposure, protection, and timestamp fields in the canonical schema;
allowAutoLivemust not enable automatic live operation. - Watchlist records accept
symbol,side,notes,createdAt, andupdatedAt. - Position records may refer to an imported portfolio by source identity and carry the canonical persisted position fields, but
statusmust beCLOSEDorCANCELLED.
The Byk-scoped endpoint refuses nonempty characters, conversations, or projects collections. A Byk client cannot use this operation to mutate data owned by another product.
What is never imported
- active or otherwise non-
CLOSED/CANCELLEDpositions; liveor automatic-live settings, orders, executions, cash or fund transfers, and broker connections;- position signal or strategy foreign keys and synthetic destination foreign keys;
- nonempty protective order IDs, nonzero protected quantity, or a protective OCA group;
- credentials, service-role access, model-router authority, checkout, paid entitlements, token issuance, or autonomous production execution.
Atomic results and refusal meanings
The account owner validates the complete file, every field and enum, every source identity, and every portfolio reference before mutation. It then performs one atomic write. Existing destination data wins by default.
| Record status | Meaning |
|---|---|
imported | The new source record was accepted and written. |
unchanged | The same source identity already has identical accepted content. Repeating the import creates no duplicate. |
conflicting | The source identity or destination collides with different existing content. Existing account data is preserved. |
rejected | The record, field, enum, reference, scope, or safety boundary is unsupported. |
Any conflict or rejection refuses the complete import; no partial rows are committed. Graphical clients show the exact imported, unchanged, conflicting, and rejected counts plus the first refused record's kind, source ID, and reason. The CLI prints the complete service JSON report. A complete preflight refusal returns HTTP 422 and CLI exit status 4; CLI, authentication, transport, endpoint, or other service failures exit 1.
A refusal is not a prompt to switch on live operation or edit away the scope. Correct the export at its source, keep unsupported operational records out of the document, and submit the complete corrected file again. An authentication refusal means the signed-in session or owner-only token file must be repaired; a service-unavailable message means no import outcome was established.