Portfolio positions
Send your users' portfolios and watchlists for personalized alerts.
Overview
For personalized alerts, publish your users' holdings to the Kafka topic user-portfolio-positions-external, using JSON Schema with the Schema Registry.
- One message per user, with all of that user's accounts, portfolios and watchlists.
- A later message for the same user replaces the earlier one.
- Send a
batchsnapshot of all users once a day, anddeltamessages when a single user changes.
You need write access to this topic and your tenantId, both provided by Bridgewise.
PORTFOLIO POSITIONS MESSAGE
{
"tenantId": "<tenant-id>",
"userId": "user-42",
"products": [1],
"accounts": [
{
"accountId": "acc-7781",
"advisorId": "adv-12",
"collections": [
{
"collectionId": "pf-1",
"collectionType": "Portfolio",
"baseCurrency": "USD",
"assets": [
{
"instrumentIdType": "ticker",
"tickerSymbol": "AAPL",
"exchangeSymbol": "NasdaqGS",
"assetType": "stock",
"currency": "USD",
"units": 10,
"executionPrice": 182.3,
"positionOpenDate": "2026-03-02"
},
{
"instrumentIdType": "isin",
"isin": "IE00B4L5Y983",
"exchangeSymbol": "Borsa Italiana",
"assetType": "fund",
"currency": "EUR",
"units": 25
}
]
}
]
}
],
"configurations": { "PreferredLanguages": ["fr-FR", "en-US"] },
"delivery": {
"type": "batch",
"businessDate": "2026-11-15",
"properties": { "batchId": "2026-11-15-1", "batchSize": 12500, "index": 1 }
}
}User and accounts
Attributes
tenantIdstringRequiredYour tenant ID, provided by Bridgewise.
userIdstringRequiredYour user's ID. Use a pseudonymous ID.
productsarray of integers1 = SignalWise. Only users with 1 receive SignalWise alerts. Empty means SignalWise only.accounts[].accountIdstringRequiredAccount ID.
accounts[].advisorIdstringAdvisor managing the account.
collections[].collectionIdstringRequiredPortfolio or watchlist ID.
collections[].collectionTypeenumRequiredPortfolio or Watchlist (case-insensitive).collections[].baseCurrencystringISO 4217 currency.
configurations.PreferredLanguagesarray of stringsLanguages of the alerts for this user, format
xx-XX, for example ["ja-JP", "en-US"]. Invalid entries are ignored.DELTA MESSAGE (ONE USER)
{
"tenantId": "<tenant-id>",
"userId": "user-42",
"products": [1],
"accounts": [ ... ],
"configurations": { "PreferredLanguages": ["en-US"] },
"delivery": {
"type": "delta",
"businessDate": "2026-11-16"
}
}Assets
Choose one identifier type per asset with instrumentIdType.
Attributes
instrumentIdTypeenumRequiredticker, isin, tase or asset.tickerSymbolstringWith
ticker: the ticker, for example AAPL.exchangeSymbolstringWith
ticker: the exchange code (NasdaqGS, NYSE). With isin: the full exchange name (Nasdaq Global Select, Borsa Italiana). With tase: TASE.isinstringWith
isin: the ISIN.securityNumberstringWith
tase: the Tel Aviv security number, digits only.assetIdstringWith
asset: your own ID, registered with Bridgewise.assetTypeenumstock, fund (including ETFs) or bond. Strongly recommended.currencystringRequiredISO 4217 currency of the position.
unitsnumberNumber of units, greater than 0. Expected for portfolios.
weightnumberWeight of the position in the collection.
executionPricenumberAverage buy price.
positionOpenDatedateYYYY-MM-DD.Unknown identifiers are skipped silently
An identifier that cannot be resolved is ignored, and the rest of the message is processed. No error is returned. Check coverage with your account manager.
IDENTIFIER EXAMPLES
[
{ "instrumentIdType": "ticker", "tickerSymbol": "AAPL",
"exchangeSymbol": "NasdaqGS", "assetType": "stock", "currency": "USD" },
{ "instrumentIdType": "isin", "isin": "US0378331005",
"exchangeSymbol": "Nasdaq Global Select", "assetType": "stock", "currency": "USD" },
{ "instrumentIdType": "tase", "securityNumber": "1081124",
"exchangeSymbol": "TASE", "assetType": "stock", "currency": "ILS" },
{ "instrumentIdType": "asset", "assetId": "INT-000123",
"assetType": "fund", "currency": "EUR" }
]Delivery
Attributes
delivery.typeenumRequiredbatch: a snapshot of all your users. delta: one user. Defaults to delta.delivery.businessDatedateRequiredClose-of-business date the positions represent,
YYYY-MM-DD.delivery.properties.batchIdstringRequired for
batch. Same value for every message of the batch.delivery.properties.batchSizeintegerRequired for
batch. Number of users in the batch (one message per user).delivery.properties.indexintegerRequired for
batch. Position of this message in the batch, starting at 1.ISIN resolution: when an ISIN is listed on several exchanges, SignalWise picks the listing that matches the currency, then the exchange name, then the primary listing.
PRODUCER (PYTHON)
from confluent_kafka import SerializingProducer
from confluent_kafka.schema_registry import SchemaRegistryClient
from confluent_kafka.schema_registry.json_schema import JSONSerializer
from confluent_kafka.serialization import StringSerializer
TOPIC = "user-portfolio-positions-external"
registry = SchemaRegistryClient({
"url": "<schema-registry-url>",
"basic.auth.user.info": "<registry-key>:<registry-secret>",
})
schema = registry.get_latest_version(f"{TOPIC}-value").schema.schema_str
producer = SerializingProducer({
"bootstrap.servers": "<bootstrap-server>",
"security.protocol": "SASL_SSL",
"sasl.mechanisms": "PLAIN",
"sasl.username": "<api-key>",
"sasl.password": "<api-secret>",
"key.serializer": StringSerializer("utf_8"),
"value.serializer": JSONSerializer(schema, registry, lambda obj, ctx: obj),
})
for index, user in enumerate(users, start=1):
message = build_message(user, batch_id, len(users), index)
producer.produce(TOPIC, key=user["userId"], value=message)
producer.flush()