Advise Only API

Authentication

Requests that require authentication must pass an authentication token by setting the Authorization header.

$ curl -H "Authorization: Bearer TOKEN" https://api.adviseonly.com

Pagination

Requests that return multiple items will be paginated to 25 items by default. You can specify further pages with the ?page parameter. For some resources, you can also set a custom page size up to 100 with the ?per parameter. Note that for technical reasons not all endpoints respect the ?per parameter.

$ curl 'https://api.adviseonly.com/portfolios?page=2&per=100'

Note that page numbering is 1-based and that omitting the ?page parameter will return the first page.

Internationalization

You can specify the locale by setting the Accept-Language HTTP header in your request. We currently support en (default) and it.

Accept-Language: it

Versioning

By default, all requests receive the v1 version of the API. We encourage you to explicitly request this version via the Accept header.

Accept: application/vnd.adviseonly.v1

Partial responses

You can use the fields query parameter to request only relevant information.

$ curl 'https://api.adviseonly.com/portfolios?fields=id,name,owner(id,name)'

Resources

Aggregate portfolios
Investment summaries of users.

Resource Description
GET /me/aggregate_portfolio Get an aggregate portfolio.
GET /users/:user_id/aggregate_portfolio Get an aggregate portfolio.

Barometers
Barometers.

Resource Description
GET /barometers/:id Get a barometer's current value.

Cash flows
Portfolio cash flows.

Resource Description
GET /portfolios/:portfolio_id/cash_flows List cash flows for the specified portfolio.

Categories
Instrument categories.

Resource Description
GET /categories List categories.

Copies
Portfolio copies.

Resource Description
POST /portfolios/:portfolio_id/copies Create a copy of a portfolio.

Drafts
Portfolio drafts.

Resource Description
GET /portfolios/:portfolio_id/draft Get a portfolio draft.
PATCH /portfolios/:portfolio_id/draft Replace a portfolio draft.
PUT /portfolios/:portfolio_id/draft Replace a portfolio draft.
DELETE /portfolios/:portfolio_id/draft Delete the draft of a portfolio.

Favorites
Instruments in the favorites list.

Resource Description
GET /me/favorites List favorite instruments of the specified user.
GET /users/:user_id/favorites List favorite instruments of the specified user.
PATCH /me/favorites/:id Add an instrument to your favorites.
PUT /me/favorites/:id Add an instrument to your favorites.
PATCH /users/:user_id/favorites/:id Add an instrument to your favorites.
PUT /users/:user_id/favorites/:id Add an instrument to your favorites.
DELETE /me/favorites/:id Remove an instrument from your favorites.
DELETE /users/:user_id/favorites/:id Remove an instrument from your favorites.

Geo indicators
Geo indicators.

Resource Description
GET /geo_indicators/:id Get a set of geo indicators.

Global categories
Instrument global categories.

Resource Description
GET /global_categories List global categories.

Group categories
Instrument group categories.

Resource Description
GET /group_categories List group categories.

Indexes
Indexes.

Resource Description
GET /indexes List indexes.

Indicators
Indicators.

Resource Description
GET /instruments/:instrument_id/indicators/:id Get a set of indicators.
GET /portfolios/:portfolio_id/indicators/:id Get a set of indicators.

Instruments
Instruments.

Resource Description
GET /instruments List all the instruments in the specified collection.
GET /instruments/:id Get an instrument.

Models
Portfolio models.

Resource Description
GET /models List portfolio models.
GET /models/:id Get a model.

Orders
Orders.

Resource Description
POST /orders Create an order.
GET /me/orders List the orders of the current user.
GET /orders List the orders of the current user.
GET /users/:user_id/orders List the orders of the current user.
GET /orders/:id Get an order.

Parent updates
Parent updates.

Resource Description
POST /portfolios/:portfolio_id/parent_updates Update a portfolio with the composition of its parent.

Payed orders
Payed orders.

Resource Description
POST /payed_orders Set an order as payed.
GET /me/payed_orders List the orders in the specified collection.
GET /payed_orders List the orders in the specified collection.
GET /users/:user_id/payed_orders List the orders in the specified collection.

Portfolios
Portfolios.

Resource Description
POST /portfolios Create a portfolio.
GET /instruments/:instrument_id/portfolios List all the portfolios in the specified collection.
GET /me/portfolios List all the portfolios in the specified collection.
GET /portfolios List all the portfolios in the specified collection.
GET /users/:user_id/portfolios List all the portfolios in the specified collection.
GET /portfolios/:id Get a portfolio.
PATCH /portfolios/:id Update a portfolio.
PUT /portfolios/:id Update a portfolio.
DELETE /portfolios/:id Delete a portfolio.

Previews
Portfolio previews.

Resource Description
GET /models/:model_id/preview Get a portfolio preview.
GET /portfolios/:portfolio_id/draft/algorithms/:algorithm_id/preview Get a portfolio preview.
GET /portfolios/:portfolio_id/draft/preview Get a portfolio preview.
GET /portfolios/:portfolio_id/pending_parent_update/preview Get a portfolio preview.

Quizzes
Quizzes.

Resource Description
GET /quizzes/:id Get a quiz.

Receipts
Receipts of conversation messages.

Resource Description

Response set drafts
Response set drafts.

Resource Description
POST /quizzes/:quiz_id/response_set_drafts Create a response set draft.
GET /me/quizzes/:quiz_id/response_set_draft Get a response set draft.
GET /response_set_drafts/:id Get a response set draft.
GET /users/:user_id/quizzes/:quiz_id/response_set_draft Get a response set draft.
PATCH /response_set_drafts/:id Update a response set draft.
PUT /response_set_drafts/:id Update a response set draft.

Response sets
Response sets.

Resource Description
POST /quizzes/:quiz_id/response_sets Create a response set.
PATCH /response_sets/:id Update a response set.
PUT /response_sets/:id Update a response set.

Revisions
Revisions.

Resource Description
POST /portfolios/:portfolio_id/revisions Create a portfolio revision.

Search
Find users, portfolios and instruments.

Resource Description
GET /search Find users, portfolios and instruments.

Service activations
Service activations.

Resource Description
GET /me/service_activations List the service activations of the current user.
GET /service_activations List the service activations of the current user.
GET /users/:user_id/service_activations List the service activations of the current user.

Similar instruments
Similar instruments.

Resource Description
GET /instruments/:instrument_id/similar_instruments List instruments similar to a given instrument.

Time series
Time series.

Resource Description
GET /barometers/:barometer_id/time_series/:id Get a time series.
GET /categories/:category_id/time_series/:id Get a time series.
GET /indexes/:index_slug/time_series/:id Get a time series.
GET /instruments/:instrument_id/time_series/:id Get a time series.
GET /portfolios/:portfolio_id/time_series/:id Get a time series.

Trades
Trades.

Resource Description
GET /portfolios/:portfolio_id/trades List trades for the specified portfolio.
GET /portfolios/:portfolio_id/draft/trade Get a trade.
GET /portfolios/:portfolio_id/pending_parent_update/trade Get a trade.
GET /trades/:id Get a trade.

Users
Users.

Resource Description
GET /me Get a user.
GET /users/:id Get a user.
PATCH /users/:id Update a user.
PUT /users/:id Update a user.