Skip to main content
PUT
/
v1
/
config
/
watchlist
Java (SDK)
package hello.world;

import java.lang.Exception;
import java.util.List;
import org.openapis.openapi.AriesJava;
import org.openapis.openapi.models.components.WatchlistRequest;
import org.openapis.openapi.models.errors.ErrorResponse;
import org.openapis.openapi.models.operations.WatchlistCreateOrUpdateResponse;

public class Application {

    public static void main(String[] args) throws ErrorResponse, Exception {

        AriesJava sdk = AriesJava.builder()
                .bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
            .build();

        List<WatchlistRequest> req = List.of(
                WatchlistRequest.builder()
                    .name("Tech Stocks")
                    .symbols(List.of(
                        "AAPL",
                        "GOOGL",
                        "MSFT",
                        "AMZN"))
                    .build(),
                WatchlistRequest.builder()
                    .name("Crypto")
                    .symbols(List.of(
                        "BTC-USD",
                        "ETH-USD",
                        "SOL-USD"))
                    .build());

        WatchlistCreateOrUpdateResponse res = sdk.watchlists().upsert()
                .request(req)
                .call();

        if (res.watchlistResponse().isPresent()) {
            // handle response
        }
    }
}
{
  "user_id": 12345,
  "watchlist": [
    {
      "id": 1,
      "name": "Tech Stocks",
      "symbols": [
        "AAPL",
        "GOOGL",
        "MSFT",
        "AMZN"
      ]
    },
    {
      "id": 2,
      "name": "Crypto",
      "symbols": [
        "BTC-USD",
        "ETH-USD",
        "SOL-USD"
      ]
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://finance.dev/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Array of watchlists to create or update

name
string
required

Unique name for the watchlist

symbols
string[]
required

Array of stock symbols (must be unique)

Example:
["AAPL", "GOOGL", "MSFT"]

Response

Watchlists created or updated successfully

user_id
integer<int64>

User ID

watchlist
object[]

Array of watchlists