Download OpenAPI specification:Download
A API é uma solução que permite acesso aos dados de informações relacionadas ao aplicativo Oplab, onde você possui o acesso ao portfólio, gráficos, posições, entre outras informações. Ela é de uso individual, os dados obtidos pela API não pode ser distribuidos sem prévia autorização e seu uso está vinculada aos termos de serviços da Oplab que pode ser obtido no rodapé do website ou neste link direto https://www.oplab.com.br/termos-de-servico
Para fazer as chamadas na API, é necessário que você esteja autenticado com sua conta do Oplab. Estar autenticado, significa passar um
header do tipo Access-Token
em cada request.
Uma vez que você já possua cadastro no Oplab, existem duas formas para se obter esse Access-Token
:
https://oplab.com.br/users/:seuid/access_token
, trocando :seuid pelo seu id de usuário. "curl -X post -d '{"email": "exemplo@exemplo.com.br", "password": "exemplo123"}' https://api.oplab.com.br/v2/users/authenticate"
O Access-Token
tem TTL de 2 semanas. Após esse período, será necessário renová-lo com
curl -X GET -H 'Access-Token: P85w4/j6vYELJpQdRI9JtLhGxpvj2aAqVmB5ARnLHFnRS6wg9USK/+aWm2WTcj7N6ovN8pgPQH6uQVUkQBsXGQ==--TCJMJ5UFzrkb91z21smXw==--YpYFE5c+anh2+xfMBjIrSQ==' 'https://api.oplab.com.br/v2/users/authorize'
Endpoint description
Email required | string Example: exemplo@exemplo.com.br |
Senha required | string Example: exemplo123 |
OK
curl -i -X POST -d {"email": "exemplo@exemplo.com.br", "password": "exemplo123 "}"https://api.oplab.com.br/v2/users/authenticate"
{- "access-token": "idRiRrQ5+XfCbOq/S0alOSx+Gz5gosvNK9R8838PeP9pc426fD6BzceEWkx20YHJoGXncmaUfVih/CwRx7FXVA==--WCljLkMdPa9PU0/27UDjSQ==--nikje9cSbF0fHtjlaZxahQ==",
- "category": "MAX",
- "data-access": "REAL_TIME",
- "datafeed-access-token": "M0zRluxYaeL2q2HELb6hrJDS6dG84DJ0l581MFzrdW+F0UPQrqkKb0eov7vp/7D4yi0vK6hGHla1zS8TY3Ymfg==--2ZuhPW2yEvKEo2I+QVD9Jw==--Eyc+GYA7CnCvkt0g5QcD7w==",
- "days-to-expiration": 49,
- "display-name": "Desenvolvedor Oplab",
- "email": "dev@oplab.com.br",
- "id": "10518,",
- "last-login": "2019-03-26T00:35:02.243Z",
- "name": "Desenvolvedor Oplab",
- "preferences": { },
- "versions": {
- "WEB_PWA_APP": 2.15
}
}
Endpoint description
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
spot_symbol | string |
brokerage | integer |
interest_rate | number |
is_notifications_enabled | boolean |
name | string |
orders_attributes | string |
OK
{- "preferences": {
- "interest-rate-type": "SELIC",
- "interest-rate-value": 0,
- "brokerage-fee": 10,
- "order-amount": 100000,
- "notify-on-maturity-date-by-email": false,
- "notify-on-strategy-change-by-email": false,
- "notify-on-maturity-date-by-push": true,
- "notify-on-strategy-change-by-push": true,
- "simulate-price-strategy": "BID_ASK",
- "simulate-with-brokerage-and-fees": true
}
}
{ }
Endpoint description
symbol required | string |
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X GET -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/studies/:symbol'
{- "id": 60407,
- "target": null,
- "symbol": "PETR4",
- "time": 1573171237000,
- "prefix": "PETR",
- "open": 30.45,
- "name": "PETROBRAS PN",
- "high": 30.79,
- "low": 30.2,
- "close": 30.65,
- "volume": 25016600,
- "variation": -0.81,
- "financial-volume": 762476177,
- "iv-1y-min": 25.38,
- "iv-1y-max": 51.77,
- "iv-1y-rank": 12.807881773399021,
- "iv-1y-percentile": 22.22,
- "iv-6m-min": 25.38,
- "iv-6m-max": 37.09,
- "iv-6m-rank": 28.864218616567044,
- "iv-6m-percentile": 42.06,
- "iv-current": 28.76,
- "ewma-1y-min": 28.78,
- "ewma-1y-max": 54.51,
- "ewma-1y-rank": 1.91,
- "ewma-1y-percentile": 1.98,
- "ewma-6m-min": 28.78,
- "ewma-6m-max": 41.7,
- "ewma-6m-rank": 3.8,
- "ewma-6m-percentile": 3.97,
- "ewma-current": 29.27,
- "short-term-trend": -1,
- "middle-term-trend": 1,
- "portfolio": {
- "average-price": null,
- "amount": null
}, - "sector": "Petróleo, Gás e Biocombustíveis",
- "subsector": "Petróleo, Gás e Biocombustíveis",
- "segment": "Exploração, Refino e Distribuição",
- "interest-rate-id": "CETIP",
- "interest-rate": 4.9,
- "locked-days-to-maturity": -1,
- "locked-spot-price": -1,
- "locked-volatility": -1,
- "ui-settings": "{\"columns\":[{\"colId\":\"_actions\",\"hide\":false,\"aggFunc\":null,\"width\":75,\"pivotIndex\":null,\"pinned\":\"left\",\"rowGroupIndex\":null},{\"colId\":\"symbol\",\"hide\":false,\"aggFunc\":null,\"width\":100,\"pivotIndex\":null,\"pinned\":\"left\",\"rowGroupIndex\":null},{\"colId\":\"moneyness\",\"hide\":false,\"aggFunc\":null,\"width\":60,\"pivotIndex\":null,\"pinned\":null,\"rowGroupIndex\":null},{\"colId\":\"strike\",\"hide\":false,\"aggFunc\":null,\"width\":70,\"pivotIndex\":null,\"pinned\":null,\"rowGroupIndex\":null},{\"colId\":\"close\",\"hide\":false,\"aggFunc\":null,\"width\":70,\"pivotIndex\":null,\"pinned\":null,\"rowGroupIndex\":null},{\"colId\":\"variation\",\"hide\":false,\"aggFunc\":null,\"width\":80,\"pivotIndex\":null,\"pinned\":null,\"rowGroupIndex\":null},{\"colId\":\"financial-volume\",\"hide\":false,\"aggFunc\":null,\"width\":90,\"pivotIndex\":null,\"pinned\":null,\"rowGroupIndex\":null},{\"colId\":\"bid\",\"hide\":false,\"aggFunc\":null,\"width\":50,\"pivotIndex\":null,\"pinned\":null,\"rowGroupIndex\":null},{\"colId\":\"ask\",\"hide\":false,\"aggFunc\":null,\"width\":50,\"pivotIndex\":null,\"pinned\":null,\"rowGroupIndex\":null},{\"colId\":\"implied-volatility\",\"hide\":false,\"aggFunc\":null,\"width\":90,\"pivotIndex\":null,\"pinned\":null,\"rowGroupIndex\":null},{\"colId\":\"bs-price\",\"hide\":false,\"aggFunc\":null,\"width\":70,\"pivotIndex\":null,\"pinned\":null,\"rowGroupIndex\":null},{\"colId\":\"delta\",\"hide\":false,\"aggFunc\":null,\"width\":70,\"pivotIndex\":null,\"pinned\":null,\"rowGroupIndex\":null},{\"colId\":\"gamma\",\"hide\":false,\"aggFunc\":null,\"width\":70,\"pivotIndex\":null,\"pinned\":null,\"rowGroupIndex\":null},{\"colId\":\"theta\",\"hide\":false,\"aggFunc\":null,\"width\":70,\"pivotIndex\":null,\"pinned\":null,\"rowGroupIndex\":null},{\"colId\":\"vega\",\"hide\":false,\"aggFunc\":null,\"width\":72,\"pivotIndex\":null,\"pinned\":null,\"rowGroupIndex\":null},{\"colId\":\"liquidity-level\",\"hide\":false,\"aggFunc\":null,\"width\":60,\"pivotIndex\":null,\"pinned\":null,\"rowGroupIndex\":null},{\"colId\":\"vi\",\"hide\":false,\"aggFunc\":null,\"width\":60,\"pivotIndex\":null,\"pinned\":null,\"rowGroupIndex\":null},{\"colId\":\"ve\",\"hide\":false,\"aggFunc\":null,\"width\":60,\"pivotIndex\":null,\"pinned\":null,\"rowGroupIndex\":null},{\"colId\":\"volume\",\"hide\":false,\"aggFunc\":null,\"width\":90,\"pivotIndex\":null,\"pinned\":null,\"rowGroupIndex\":null},{\"colId\":\"profit-rate\",\"hide\":false,\"aggFunc\":null,\"width\":70,\"pivotIndex\":null,\"pinned\":null,\"rowGroupIndex\":null},{\"colId\":\"protection-rate\",\"hide\":false,\"aggFunc\":null,\"width\":70,\"pivotIndex\":null,\"pinned\":null,\"rowGroupIndex\":null},{\"colId\":\"rho\",\"hide\":false,\"aggFunc\":null,\"width\":70,\"pivotIndex\":null,\"pinned\":null,\"rowGroupIndex\":null},{\"colId\":\"probability-of-exercise\",\"hide\":false,\"aggFunc\":null,\"width\":70,\"pivotIndex\":null,\"pinned\":null,\"rowGroupIndex\":null},{\"colId\":\"open\",\"hide\":false,\"aggFunc\":null,\"width\":50,\"pivotIndex\":null,\"pinned\":null,\"rowGroupIndex\":null},{\"colId\":\"high\",\"hide\":false,\"aggFunc\":null,\"width\":50,\"pivotIndex\":null,\"pinned\":null,\"rowGroupIndex\":null},{\"colId\":\"low\",\"hide\":false,\"aggFunc\":null,\"width\":50,\"pivotIndex\":null,\"pinned\":null,\"rowGroupIndex\":null},{\"colId\":\"time\",\"hide\":false,\"aggFunc\":null,\"width\":80,\"pivotIndex\":null,\"pinned\":null,\"rowGroupIndex\":null}]}",
- "series": null,
- "PETRL_20201221": {
- "id": 79,
- "name": "PETRL",
- "due-date": "2020-12-21",
- "days-to-maturity": 274,
- "type": "CALL",
- "options": null,
- "PETRL210": {
- "maturity-type": "AMERICAN",
- "close": 0,
- "strike": 20.14,
- "variation": 0,
- "volume": 0,
- "financial-volume": 0,
- "spot-price": 30.9,
- "bid": 0,
- "ask": 0,
- "open": 0,
- "high": 0,
- "low": 0
}, - "PETRL220": {
- "maturity-type": "AMERICAN",
- "close": 0,
- "strike": 21.14,
- "variation": 0,
- "volume": 0,
- "financial-volume": 0,
- "spot-price": 30.9,
- "bid": 0,
- "ask": 0,
- "open": 0,
- "high": 0,
- "low": 0
}, - "PETRL389": {
- "maturity-type": "EUROPEAN",
- "close": 0,
- "strike": 32.89,
- "variation": 0,
- "volume": 0,
- "financial-volume": 0,
- "spot-price": 30.9,
- "bid": 3.3,
- "ask": 0,
- "open": 0,
- "high": 0,
- "low": 0
}, - "PETRL276": {
- "maturity-type": "AMERICAN",
- "close": 0,
- "strike": 27.64,
- "variation": 0,
- "volume": 0,
- "financial-volume": 0,
- "spot-price": 30.9,
- "bid": 0,
- "ask": 0,
- "open": 0,
- "high": 0,
- "low": 0
}, - "PETRL253": {
- "maturity-type": "AMERICAN",
- "close": 0,
- "strike": 25.14,
- "variation": 0,
- "volume": 0,
- "financial-volume": 0,
- "spot-price": 30.9,
- "bid": 0,
- "ask": 0,
- "open": 0,
- "high": 0,
- "low": 0
}, - "PETRL281": {
- "maturity-type": "AMERICAN",
- "close": 0,
- "strike": 28.14,
- "variation": 0,
- "volume": 0,
- "financial-volume": 0,
- "spot-price": 30.9,
- "bid": 5.6,
- "ask": 0,
- "open": 0,
- "high": 0,
- "low": 0
}, - "PETRL258": {
- "maturity-type": "EUROPEAN",
- "close": 0,
- "strike": 25.89,
- "variation": 0,
- "volume": 0,
- "financial-volume": 0,
- "spot-price": 30.9,
- "bid": 0,
- "ask": 0,
- "open": 0,
- "high": 0,
- "low": 0
}, - "PETRL338": {
- "maturity-type": "EUROPEAN",
- "close": 0,
- "strike": 33.89,
- "variation": 0,
- "volume": 0,
- "financial-volume": 0,
- "spot-price": 30.9,
- "bid": 2.95,
- "ask": 0,
- "open": 0,
- "high": 0,
- "low": 0
}, - "PETRL29": {
- "maturity-type": "AMERICAN",
- "close": 5.45,
- "strike": 29.64,
- "variation": 3.03,
- "volume": 10300,
- "financial-volume": 57527,
- "spot-price": 30.41,
- "bid": 5.2,
- "ask": 5.56,
- "open": 5.61,
- "high": 5.61,
- "low": 5.45
}, - "PETRL240": {
- "maturity-type": "AMERICAN",
- "close": 0,
- "strike": 23.14,
- "variation": 0,
- "volume": 0,
- "financial-volume": 0,
- "spot-price": 30.9,
- "bid": 8.5,
- "ask": 0,
- "open": 0,
- "high": 0,
- "low": 0
}, - "PETRL250": {
- "maturity-type": "AMERICAN",
- "close": 8.63,
- "strike": 24.14,
- "variation": -2.38,
- "volume": 7400,
- "financial-volume": 62954,
- "spot-price": 30.73,
- "bid": 8.53,
- "ask": 8.95,
- "open": 8.5,
- "high": 8.65,
- "low": 8.5
}, - "PETRL260": {
- "maturity-type": "AMERICAN",
- "close": 7.47,
- "strike": 25.64,
- "variation": -4.84,
- "volume": 200,
- "financial-volume": 1494,
- "spot-price": 30.6,
- "bid": 7.5,
- "ask": 8.3,
- "open": 7.47,
- "high": 7.47,
- "low": 7.47
}, - "PETRL280": {
- "maturity-type": "AMERICAN",
- "close": 6.73,
- "strike": 27.14,
- "variation": -2.46,
- "volume": 100,
- "financial-volume": 673,
- "spot-price": 30.6,
- "bid": 6.62,
- "ask": 6.97,
- "open": 6.73,
- "high": 6.73,
- "low": 6.73
}, - "PETRL200": {
- "maturity-type": "AMERICAN",
- "close": 0,
- "strike": 19.14,
- "variation": 0,
- "volume": 0,
- "financial-volume": 0,
- "spot-price": 30.9,
- "bid": 8,
- "ask": 0,
- "open": 0,
- "high": 0,
- "low": 0
}, - "PETRL296": {
- "maturity-type": "EUROPEAN",
- "close": 0,
- "strike": 29.39,
- "variation": 0,
- "volume": 0,
- "financial-volume": 0,
- "spot-price": 30.9,
- "bid": 5,
- "ask": 0,
- "open": 0,
- "high": 0,
- "low": 0
}, - "PETRL330": {
- "maturity-type": "AMERICAN",
- "close": 0,
- "strike": 32.14,
- "variation": 0,
- "volume": 0,
- "financial-volume": 0,
- "spot-price": 30.9,
- "bid": 3.6,
- "ask": 4.7,
- "open": 0,
- "high": 0,
- "low": 0
}, - "PETRL266": {
- "maturity-type": "AMERICAN",
- "close": 0,
- "strike": 26.14,
- "variation": 0,
- "volume": 0,
- "financial-volume": 0,
- "spot-price": 30.9,
- "bid": 6.75,
- "ask": 7.58,
- "open": 0,
- "high": 0,
- "low": 0
}, - "PETRL289": {
- "maturity-type": "AMERICAN",
- "close": 0,
- "strike": 28.64,
- "variation": 0,
- "volume": 0,
- "financial-volume": 0,
- "spot-price": 30.9,
- "bid": 5.4,
- "ask": 0,
- "open": 0,
- "high": 0,
- "low": 0
}, - "PETRL309": {
- "maturity-type": "AMERICAN",
- "close": 0,
- "strike": 30.64,
- "variation": 0,
- "volume": 0,
- "financial-volume": 0,
- "spot-price": 30.9,
- "bid": 4.3,
- "ask": 0,
- "open": 0,
- "high": 0,
- "low": 0
}, - "PETRL314": {
- "maturity-type": "AMERICAN",
- "close": 0,
- "strike": 31.14,
- "variation": 0,
- "volume": 0,
- "financial-volume": 0,
- "spot-price": 30.9,
- "bid": 4.38,
- "ask": 0,
- "open": 0,
- "high": 0,
- "low": 0
}, - "PETRL359": {
- "maturity-type": "AMERICAN",
- "close": 0,
- "strike": 35.64,
- "variation": 0,
- "volume": 0,
- "financial-volume": 0,
- "spot-price": 30.9,
- "bid": 2.2,
- "ask": 0,
- "open": 0,
- "high": 0,
- "low": 0
}, - "PETRL339": {
- "maturity-type": "AMERICAN",
- "close": 3.67,
- "strike": 33.64,
- "variation": 26.12,
- "volume": 1000,
- "financial-volume": 3670,
- "spot-price": 30.75,
- "bid": 3.32,
- "ask": 3.74,
- "open": 3.67,
- "high": 3.67,
- "low": 3.67
}, - "PETRL349": {
- "maturity-type": "AMERICAN",
- "close": 0,
- "strike": 34.64,
- "variation": 0,
- "volume": 0,
- "financial-volume": 0,
- "spot-price": 30.9,
- "bid": 3.05,
- "ask": 0,
- "open": 0,
- "high": 0,
- "low": 0
}, - "PETRL291": {
- "maturity-type": "EUROPEAN",
- "close": 0,
- "strike": 28.89,
- "variation": 0,
- "volume": 0,
- "financial-volume": 0,
- "spot-price": 30.9,
- "bid": 5.32,
- "ask": 0,
- "open": 0,
- "high": 0,
- "low": 0
}
}
}
Endpoint description
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X GET -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/interest_rates'
[- {
- "id": 2,
- "uid": "SELIC",
- "value": 4.9
}, - {
- "id": 1,
- "uid": "CETIP",
- "value": 4.9
}
]
Request body description
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X GET -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/series'
[- {
- "id": 62,
- "name": "K",
- "due-date": "2019-11-13T00:00:00.000Z",
- "block-date": "2019-11-13T00:00:00.000Z",
- "days-to-maturity": 3,
- "type": "CALL"
}
]
Request body description
symbol required | string |
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X GET -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/series/:symbol'
[- {
- "id": 39,
- "name": "PETRK",
- "due-date": "2019-11-18T00:00:00.000Z",
- "block-date": "2019-11-18T00:00:00.000Z",
- "days-to-maturity": 5,
- "type": "CALL"
}
]
Request body description
symbol required | string |
series_id required | string |
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X GET -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/options/:symbol/series_id/:series_id'
{- "status": "OK"
}
Request body description
symbol required | string |
option_type required | string |
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X GET -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/series/:symbol/option_type/:option_type'
{- "status": "OK"
}
Request body description
id required | number |
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X POST -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/studies/:id/save_ui'
{- "status": "OK"
}
Endpoint description
id required | string |
series_id required | string |
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X DELETE -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/studies/:id/remove_series/:series_id'
{- "status": "OK"
}
Endpoint description
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X GET -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/positions/closed'
[- {
- "id": 89248,
- "uid": "P89248",
- "name": "PUT Petr4",
- "spot-symbol": "PETR4",
- "brokerage": 0,
- "interest-rate": 5.9,
- "notifications-enabled": false,
- "notification-method": "none",
- "notify-above": null,
- "notify-below": null,
- "days-to-maturity": 0,
- "due-date": "2019-09-16T00:00:00.000Z",
- "created-at": "2019-08-21T00:00:00.000Z",
- "closed": true,
- "realized": 0,
- "locked": true,
- "group": false,
- "horizontal": false,
- "initial": -889.68,
- "final": 0,
- "result": -889.68,
- "percentage-result": -100,
- "spot-price": 30.9,
- "spot-iv": 28.81,
- "spot-ewma": 29.27,
- "spot-variation": 4.01,
- "orders": [
- {
- "symbol": "PETRU237",
- "type": "BUY",
- "action": "BUY",
- "instrument-type": "PUT",
- "strike": 23.52,
- "spot-price": 24.3,
- "amount": 400,
- "days-to-maturity": 0,
- "due-date": "2019-09-16T00:00:00.000Z",
- "id": 318276,
- "price-in": null,
- "price-out": null,
- "price": 0.4292,
- "closed": false,
- "days-to-maturity-from-creation": 0,
- "close": 0,
- "bid": 0,
- "ask": 0,
- "volume": 0,
- "financial-volume": 0,
- "maturity-type": ""
}, - {
- "symbol": "PETRU237",
- "type": "BUY",
- "action": "BUY",
- "instrument-type": "PUT",
- "strike": 23.52,
- "spot-price": 24.3,
- "amount": 1000,
- "days-to-maturity": 0,
- "due-date": "2019-09-16T00:00:00.000Z",
- "id": 318275,
- "price-in": null,
- "price-out": null,
- "price": 0.45,
- "closed": false,
- "days-to-maturity-from-creation": 0,
- "close": 0,
- "bid": 0,
- "ask": 0,
- "volume": 0,
- "financial-volume": 0,
- "maturity-type": ""
}, - {
- "symbol": "PETRU237",
- "type": "BUY",
- "action": "BUY",
- "instrument-type": "PUT",
- "strike": 23.52,
- "spot-price": 25.49,
- "amount": 100,
- "days-to-maturity": 0,
- "due-date": "2019-09-16T00:00:00.000Z",
- "id": 318274,
- "price-in": null,
- "price-out": null,
- "price": 0.18,
- "closed": false,
- "days-to-maturity-from-creation": 0,
- "close": 0,
- "bid": 0,
- "ask": 0,
- "volume": 0,
- "financial-volume": 0,
- "maturity-type": ""
}, - {
- "symbol": "PETRU237",
- "type": "BUY",
- "action": "BUY",
- "instrument-type": "PUT",
- "strike": 23.52,
- "spot-price": 0,
- "amount": 500,
- "days-to-maturity": 0,
- "due-date": "2019-09-16T00:00:00.000Z",
- "id": 314418,
- "price-in": null,
- "price-out": null,
- "price": 0.5,
- "closed": false,
- "days-to-maturity-from-creation": 0,
- "close": 0,
- "bid": 0,
- "ask": 0,
- "volume": 0,
- "financial-volume": 0,
- "maturity-type": ""
}
], - "details": {
- "legs": [
- {
- "symbol": "PETRU237",
- "type": "BUY",
- "action": "BUY",
- "instrument-type": "PUT",
- "strike": 23.52,
- "spot-price": 24.3,
- "amount": 0,
- "days-to-maturity": 0,
- "due-date": "2019-09-16T00:00:00.000Z",
- "price-in": 0.44,
- "price-out": 0,
- "days-to-maturity-from-creation": 0,
- "initial": -889.6800000000001,
- "current": 0,
- "close": 0,
- "bid": 0,
- "ask": 0,
- "volume": 0,
- "financial-volume": 0,
- "maturity-type": ""
}
], - "in": [
- {
- "symbol": "PETRU237",
- "type": "BUY",
- "action": "BUY",
- "instrument-type": "PUT",
- "strike": 23.52,
- "spot-price": 24.3,
- "amount": 400,
- "days-to-maturity": 0,
- "due-date": "2019-09-16T00:00:00.000Z",
- "id": 318276,
- "price-in": null,
- "price-out": null,
- "price": 0.4292,
- "closed": false,
- "days-to-maturity-from-creation": 0,
- "close": 0,
- "bid": 0,
- "ask": 0,
- "volume": 0,
- "financial-volume": 0,
- "maturity-type": ""
}, - {
- "symbol": "PETRU237",
- "type": "BUY",
- "action": "BUY",
- "instrument-type": "PUT",
- "strike": 23.52,
- "spot-price": 24.3,
- "amount": 1000,
- "days-to-maturity": 0,
- "due-date": "2019-09-16T00:00:00.000Z",
- "id": 318275,
- "price-in": null,
- "price-out": null,
- "price": 0.45,
- "closed": false,
- "days-to-maturity-from-creation": 0,
- "close": 0,
- "bid": 0,
- "ask": 0,
- "volume": 0,
- "financial-volume": 0,
- "maturity-type": ""
}, - {
- "symbol": "PETRU237",
- "type": "BUY",
- "action": "BUY",
- "instrument-type": "PUT",
- "strike": 23.52,
- "spot-price": 25.49,
- "amount": 100,
- "days-to-maturity": 0,
- "due-date": "2019-09-16T00:00:00.000Z",
- "id": 318274,
- "price-in": null,
- "price-out": null,
- "price": 0.18,
- "closed": false,
- "days-to-maturity-from-creation": 0,
- "close": 0,
- "bid": 0,
- "ask": 0,
- "volume": 0,
- "financial-volume": 0,
- "maturity-type": ""
}, - {
- "symbol": "PETRU237",
- "type": "BUY",
- "action": "BUY",
- "instrument-type": "PUT",
- "strike": 23.52,
- "spot-price": 0,
- "amount": 500,
- "days-to-maturity": 0,
- "due-date": "2019-09-16T00:00:00.000Z",
- "id": 314418,
- "price-in": null,
- "price-out": null,
- "price": 0.5,
- "closed": false,
- "days-to-maturity-from-creation": 0,
- "close": 0,
- "bid": 0,
- "ask": 0,
- "volume": 0,
- "financial-volume": 0,
- "maturity-type": ""
}
], - "out": [
- {
- "symbol": "PETRU237",
- "type": "SELL",
- "action": "SELL",
- "instrument-type": "PUT",
- "strike": 23.52,
- "spot-price": 24.3,
- "amount": 2000,
- "days-to-maturity": 0,
- "due-date": "2019-09-16T00:00:00.000Z",
- "id": 350559,
- "price-in": null,
- "price-out": null,
- "price": 0,
- "closed": false,
- "days-to-maturity-from-creation": 0,
- "close": 0,
- "bid": 0,
- "ask": 0,
- "volume": 0,
- "financial-volume": 0,
- "maturity-type": ""
}
]
}
}
]
Endpoint description
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X GET -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/positions/evolution'
[- 1556668799000,
- 202500
]
Endpoint description
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X GET -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/groups'
{- "id": "313,",
- "uid": "G313,",
- "name": "saasassa,",
- "spot-symbol": "",
- "brokerage": "1.0,",
- "interest-rate": "5.4,",
- "notifications-enabled": "false,",
- "notification-method": "none,",
- "notify-above": "0,",
- "notify-below": "0,",
- "days-to-maturity": "4,",
- "due-date": "2019-11-18,",
- "created-at": "2019-11-08,",
- "closed": "false,",
- "realized": "0,",
- "locked": "true,",
- "group": "true,",
- "horizontal": "false,",
- "spot-price": "30.16,",
- "spot-iv": "30.49,",
- "spot-ewma": "29.5,",
- "spot-variation": "0.47,",
- "orders": [
- {
- "symbol": "PETRK298",
- "type": "BUY",
- "action": "BUY",
- "instrument-type": "CALL",
- "strike": 29.56,
- "spot-price": 30.39,
- "amount": 200,
- "days-to-maturity": 4,
- "due-date": "2019-11-18T00:00:00.000Z",
- "id": 406997,
- "price-in": null,
- "price-out": null,
- "price": 1.231,
- "closed": false,
- "days-to-maturity-from-creation": 4,
- "close": 0.98,
- "bid": 0.95,
- "ask": 0.98,
- "volume": 144000,
- "financial-volume": 130901,
- "maturity-type": "AMERICAN"
}
], - "details": {
- "legs": [
- {
- "symbol": "PETRK298",
- "type": "BUY",
- "action": "BUY",
- "instrument-type": "CALL",
- "strike": 29.56,
- "spot-price": 30.39,
- "amount": 200,
- "days-to-maturity": 4,
- "due-date": "2019-11-18T00:00:00.000Z",
- "price-in": 1.23,
- "price-out": null,
- "days-to-maturity-from-creation": 4,
- "initial": -246.20000000000002,
- "current": 0,
- "close": 0.98,
- "bid": 0.95,
- "ask": 0.98,
- "volume": 144000,
- "financial-volume": 130901,
- "maturity-type": "AMERICAN"
}
], - "in": [
- {
- "symbol": "PETRK298",
- "type": "BUY",
- "action": "BUY",
- "instrument-type": "CALL",
- "strike": 29.56,
- "spot-price": 30.39,
- "amount": 200,
- "days-to-maturity": 4,
- "due-date": "2019-11-18T00:00:00.000Z",
- "id": 406997,
- "price-in": null,
- "price-out": null,
- "price": 1.231,
- "closed": false,
- "days-to-maturity-from-creation": 4,
- "close": 0.98,
- "bid": 0.95,
- "ask": 0.98,
- "volume": 144000,
- "financial-volume": 130901,
- "maturity-type": "AMERICAN"
}
], - "out": [ ]
}, - "positions": [
- {
- "id": 115185,
- "name": "exemplo",
- "uid": "P115185"
}
]
}
Endpoint description
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X POST -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/groups/'
{- "id": "318,",
- "uid": "G318,",
- "name": "dale,",
- "spot-symbol": "PETR4,",
- "brokerage": "1.0,",
- "interest-rate": "5.4,",
- "notifications-enabled": "false,",
- "notification-method": "none,",
- "notify-above": "0,",
- "notify-below": "0,",
- "days-to-maturity": "4,",
- "due-date": "2019-11-18,",
- "created-at": "2019-11-11,",
- "closed": "false,",
- "realized": "0,",
- "locked": "true,",
- "group": "true,",
- "horizontal": "false,",
- "spot-price": "30.02,",
- "spot-iv": "29.61,",
- "spot-ewma": "29.5,",
- "spot-variation": "-2.85,",
- "orders": [
- {
- "symbol": "PETRK298",
- "type": "BUY",
- "action": "BUY",
- "instrument-type": "CALL",
- "strike": 29.56,
- "spot-price": 30.39,
- "amount": 200,
- "days-to-maturity": 4,
- "due-date": "2019-11-18T00:00:00.000Z",
- "id": 406997,
- "price-in": null,
- "price-out": null,
- "price": 1.231,
- "closed": false,
- "days-to-maturity-from-creation": 4,
- "close": 0.91,
- "bid": 0.91,
- "ask": 0.91,
- "volume": 3263300,
- "financial-volume": 3792626,
- "maturity-type": "AMERICAN"
}
], - "details": {
- "legs": [
- {
- "symbol": "PETRK298",
- "type": "BUY",
- "action": "BUY",
- "instrument-type": "CALL",
- "strike": 29.56,
- "spot-price": 30.39,
- "amount": 200,
- "days-to-maturity": 4,
- "due-date": "2019-11-18T00:00:00.000Z",
- "price-in": 1.23,
- "price-out": null,
- "days-to-maturity-from-creation": 4,
- "initial": -246.20000000000002,
- "current": 0,
- "close": 0.91,
- "bid": 0.91,
- "ask": 0.91,
- "volume": 3263300,
- "financial-volume": 3792626,
- "maturity-type": "AMERICAN"
}
], - "in": [
- {
- "symbol": "PETRK298",
- "type": "BUY",
- "action": "BUY",
- "instrument-type": "CALL",
- "strike": 29.56,
- "spot-price": 30.39,
- "amount": 200,
- "days-to-maturity": 4,
- "due-date": "2019-11-18T00:00:00.000Z",
- "id": 406997,
- "price-in": null,
- "price-out": null,
- "price": 1.231,
- "closed": false,
- "days-to-maturity-from-creation": 4,
- "close": 0.91,
- "bid": 0.91,
- "ask": 0.91,
- "volume": 3263300,
- "financial-volume": 3792626,
- "maturity-type": "AMERICAN"
}
], - "out": [ ]
}, - "positions": [
- {
- "id": 117271,
- "name": "ASSASAAS",
- "uid": "P117271"
}
]
}
Endpoint description
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X GET -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/positions/'
{- "days-to-maturity": "null",
- "due-date": "null",
- "created-at": "2019-11-09T00:00:00.000Z",
- "closed": false,
- "realized": 0,
- "locked": true,
- "group": false,
- "horizontal": false,
- "spot-price": 44.2,
- "spot-iv": 40.84,
- "spot-ewma": 41.18,
- "spot-variation": 0.89,
- "orders": [
- {
- "symbol": "MGLU3"
}, - {
- "type": "BUY"
}, - {
- "action": "BUY"
}, - {
- "instrument-type": "TARGET"
}, - {
- "strike": 43.81
}, - {
- "spot-price": 43.81
}, - {
- "amount": 200
}, - {
- "days-to-maturity": "null"
}, - {
- "due-date": "null"
}, - {
- "id": 412740
}, - {
- "price-in": "null"
}, - {
- "price-out": "null"
}, - {
- "price": 5
}, - {
- "closed": false
}, - {
- "days-to-maturity-from-creation": "null"
}, - {
- "close": 44.2
}, - {
- "bid": 44.19
}, - {
- "ask": 44.24
}, - {
- "volume": 1380900
}, - {
- "financial-volume": 60381955
}, - {
- "maturity-type": ""
}
], - "details": {
- "legs": [
- {
- "symbol": "MGLU3"
}, - {
- "type": "BUY"
}, - {
- "action": "BUY"
}, - {
- "instrument-type": "TARGET"
}, - {
- "strike": 43.81
}, - {
- "spot-price": 43.81
}, - {
- "amount": 200
}, - {
- "days-to-maturity": "null"
}, - {
- "due-date": "null"
}, - {
- "price-in": 5
}, - {
- "price-out": "null"
}, - {
- "days-to-maturity-from-creation": "null"
}, - {
- "initial": -1000
}, - {
- "current": 0
}, - {
- "close": 44.2
}, - {
- "bid": 44.19
}, - {
- "ask": 44.24
}, - {
- "volume": 1380900
}, - {
- "financial-volume": 60381955
}, - {
- "maturity-type": " "
}
], - "in": [
- {
- "symbol": "MGLU3"
}, - {
- "type": "BUY"
}, - {
- "action": "BUY"
}, - {
- "instrument-type": "TARGET"
}, - {
- "strike": 43.81
}, - {
- "spot-price": 43.81
}, - {
- "amount": 200
}, - {
- "days-to-maturity": "null"
}, - {
- "due-date": "null"
}, - {
- "id": 412740
}, - {
- "price-in": "null"
}, - {
- "price-out": "null"
}, - {
- "price": 5
}, - {
- "closed": false
}, - {
- "days-to-maturity-from-creation": "null"
}, - {
- "close": 44.2
}, - {
- "bid": 44.19
}, - {
- "ask": 44.24
}, - {
- "volume": 1380900
}, - {
- "financial-volume": 60381955
}, - {
- "maturity-type": ""
}
], - "out": [ ]
}
}
Endpoint description
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
spot_symbol | string |
brokerage | integer |
interest_rate | number |
is_notifications_enabled | boolean |
name | string |
orders_attributes | Array of any |
OK
{- "position": {
- "spot_symbol": "IBOV",
- "brokerage": 1,
- "interest_rate": 4.9,
- "is_notifications_enabled": false,
- "name": "EXEMPLO",
- "orders_attributes": {
- "0": {
- "action": "BUY",
- "amount": 200,
- "due_date": "2019-11-13T00:00:00.000Z",
- "instrument_type": "CALL",
- "price": 4316.7684,
- "spot_price": 106325.45,
- "strike": 102000,
- "symbol": "IBOVK102",
- "spot_symbol": "IBOV",
- "version": 2
}
}
}
}
{- "status": 200
}
Endpoint description
id required | number |
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X POST -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/positions/:id/notifications/enable'
{- "status": 200
}
Endpoint description
id required | string |
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X POST -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/positions/:id/notifications/disable'
{- "status": 200
}
Endpoint description
position_id required | string |
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X POST -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/positions/:position_id/orders'
{- "status": { }
}
Endpoint description
id required | string |
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X PATCH -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/positions/:id'
{- "status": 200
}
Endpoint description
id required | string |
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X GET -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/positions/:id'
{- "status": 200
}
Endpoint description
id required | string |
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X DELETE -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/positions/:id/'
{- "status": 200
}
Endpoint description
id required | string |
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X PUT -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/positions/:id/rename'
{- "status": 200
}
Endpoint description
id required | string |
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X PUT -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/positions/:id/close'
{- "closed": true
}
Endpoint description
id required | string |
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X PUT -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/groups/:id/rename'
{- "status": 200
}
Endpoint description
id required | string |
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X DELETE -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/portfolio/groups/:id/rename'
{- "status": 200
}
Endpoint description
position_id required | number |
id required | string |
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X PATCH -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/positions/:position_id/orders/:id'
{- "id": 319,
- "uid": "G319",
- "name": "AAAAAA",
- "spot-symbol": "COGN3",
- "brokerage": 1,
- "interest-rate": 4.9,
- "notifications-enabled": false,
- "notification-method": "none",
- "notify-above": 0,
- "notify-below": 0,
- "days-to-maturity": 4,
- "due-date": "2019-11-18T00:00:00.000Z",
- "created-at": "2019-11-11T00:00:00.000Z",
- "closed": false,
- "realized": 0,
- "locked": true,
- "group": true,
- "horizontal": false,
- "spot-price": 9.82,
- "spot-iv": 36.05,
- "spot-ewma": 26.9,
- "spot-variation": -1.8,
- "orders": [
- {
- "symbol": "COGNK40"
}, - {
- "type": "BUY"
}, - {
- "action": "BUY"
}, - {
- "instrument-type": "CALL"
}, - {
- "strike": 10.47
}, - {
- "spot-price": 9.78
}, - {
- "amount": 200
}, - {
- "days-to-maturity": 4
}, - {
- "due-date": "2019-11-18T00:00:00.000Z"
}, - {
- "id": 413552
}, - {
- "price-in": null
}, - {
- "price-out": null
}, - {
- "price": 0.01
}, - {
- "closed": false
}, - {
- "days-to-maturity-from-creation": 4
}, - {
- "close": 0.08
}, - {
- "bid": 0.07
}, - {
- "ask": 0.09
}, - {
- "volume": 176900
}, - {
- "financial-volume": 15529
}, - {
- "maturity-type": "AMERICAN"
}
], - "details": {
- "legs": [
- {
- "symbol": "COGNK98"
}, - {
- "type": "BUY"
}, - {
- "action": "BUY"
}, - {
- "instrument-type": "CALL"
}, - {
- "strike": 9.77
}, - {
- "spot-price": 9.77
}, - {
- "amount": 0
}, - {
- "days-to-maturity": 4
}, - {
- "due-date": "2019-11-18T00:00:00.000Z"
}, - {
- "price-in": 0.13
}, - {
- "price-out": null
}, - {
- "days-to-maturity-from-creation": 4
}, - {
- "initial": -53.34
}, - {
- "current": 0
}, - {
- "close": 0.32
}, - {
- "bid": 0.23
}, - {
- "ask": 0
}, - {
- "volume": 204900
}, - {
- "financial-volume": 70405
}, - {
- "maturity-type": "AMERICAN"
}
], - "in": [
- {
- "symbol": "COGNK40"
}, - {
- "type": "BUY"
}, - {
- "action": "BUY"
}, - {
- "instrument-type": "CALL"
}, - {
- "strike": 10.47
}, - {
- "spot-price": 9.78
}, - {
- "amount": 200
}, - {
- "days-to-maturity": 4
}, - {
- "due-date": "2019-11-18T00:00:00.000Z"
}, - {
- "id": 413552
}, - {
- "price-in": null
}, - {
- "price-out": null
}, - {
- "price": 0.01
}, - {
- "closed": false
}, - {
- "days-to-maturity-from-creation": 4
}, - {
- "close": 0.08
}, - {
- "bid": 0.07
}, - {
- "ask": 0.09
}, - {
- "volume": 176900
}, - {
- "financial-volume": 15529
}, - {
- "maturity-type": "AMERICAN"
}
], - "out": [ ]
}
}
Endpoint description
position_id required | number |
id required | string |
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X PUT -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/positions/:position_id/orders/:id'
{ }
Endpoint description
position_id required | number |
id required | string |
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X DELETE -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/positions/:position_id/orders/:id'
{ }
Endpoint description
id required | string |
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X PUT -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/groups/:id'
{- "id": 319,
- "uid": "G319",
- "name": "AAAAAA",
- "spot-symbol": "COGN3",
- "brokerage": 1,
- "interest-rate": 4.9,
- "notifications-enabled": false,
- "notification-method": "none",
- "notify-above": 0,
- "notify-below": 0,
- "days-to-maturity": 4,
- "due-date": "2019-11-18T00:00:00.000Z",
- "created-at": "2019-11-11T00:00:00.000Z",
- "closed": false,
- "realized": 0,
- "locked": true,
- "group": true,
- "horizontal": false,
- "spot-price": 9.82,
- "spot-iv": 36.05,
- "spot-ewma": 26.9,
- "spot-variation": -1.8,
- "orders": [
- {
- "symbol": "COGNK40"
}, - {
- "type": "BUY"
}, - {
- "action": "BUY"
}, - {
- "instrument-type": "CALL"
}, - {
- "strike": 10.47
}, - {
- "spot-price": 9.78
}, - {
- "amount": 200
}, - {
- "days-to-maturity": 4
}, - {
- "due-date": "2019-11-18T00:00:00.000Z"
}, - {
- "id": 413552
}, - {
- "price-in": null
}, - {
- "price-out": null
}, - {
- "price": 0.01
}, - {
- "closed": false
}, - {
- "days-to-maturity-from-creation": 4
}, - {
- "close": 0.08
}, - {
- "bid": 0.07
}, - {
- "ask": 0.09
}, - {
- "volume": 176900
}, - {
- "financial-volume": 15529
}, - {
- "maturity-type": "AMERICAN"
}
], - "details": {
- "legs": [
- {
- "symbol": "COGNK98"
}, - {
- "type": "BUY"
}, - {
- "action": "BUY"
}, - {
- "instrument-type": "CALL"
}, - {
- "strike": 9.77
}, - {
- "spot-price": 9.77
}, - {
- "amount": 0
}, - {
- "days-to-maturity": 4
}, - {
- "due-date": "2019-11-18T00:00:00.000Z"
}, - {
- "price-in": 0.13
}, - {
- "price-out": null
}, - {
- "days-to-maturity-from-creation": 4
}, - {
- "initial": -53.34
}, - {
- "current": 0
}, - {
- "close": 0.32
}, - {
- "bid": 0.23
}, - {
- "ask": 0
}, - {
- "volume": 204900
}, - {
- "financial-volume": 70405
}, - {
- "maturity-type": "AMERICAN"
}
], - "in": [
- {
- "symbol": "COGNK40"
}, - {
- "type": "BUY"
}, - {
- "action": "BUY"
}, - {
- "instrument-type": "CALL"
}, - {
- "strike": 10.47
}, - {
- "spot-price": 9.78
}, - {
- "amount": 200
}, - {
- "days-to-maturity": 4
}, - {
- "due-date": "2019-11-18T00:00:00.000Z"
}, - {
- "id": 413552
}, - {
- "price-in": null
}, - {
- "price-out": null
}, - {
- "price": 0.01
}, - {
- "closed": false
}, - {
- "days-to-maturity-from-creation": 4
}, - {
- "close": 0.08
}, - {
- "bid": 0.07
}, - {
- "ask": 0.09
}, - {
- "volume": 176900
}, - {
- "financial-volume": 15529
}, - {
- "maturity-type": "AMERICAN"
}
], - "out": [ ]
}, - "positions": [
- {
- "id": 117762
}, - {
- "name": "AAAAAAA"
}, - {
- "uid": "P117762"
}
]
}
Endpoint description
id required | string |
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X PATCH -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/groups/:id'
{- "id": 319,
- "uid": "G319",
- "name": "AAAAAA",
- "spot-symbol": "COGN3",
- "brokerage": 1,
- "interest-rate": 4.9,
- "notifications-enabled": false,
- "notification-method": "none",
- "notify-above": 0,
- "notify-below": 0,
- "days-to-maturity": 4,
- "due-date": "2019-11-18T00:00:00.000Z",
- "created-at": "2019-11-11T00:00:00.000Z",
- "closed": false,
- "realized": 0,
- "locked": true,
- "group": true,
- "horizontal": false,
- "spot-price": 9.82,
- "spot-iv": 36.05,
- "spot-ewma": 26.9,
- "spot-variation": -1.8,
- "orders": [
- {
- "symbol": "COGNK40"
}, - {
- "type": "BUY"
}, - {
- "action": "BUY"
}, - {
- "instrument-type": "CALL"
}, - {
- "strike": 10.47
}, - {
- "spot-price": 9.78
}, - {
- "amount": 200
}, - {
- "days-to-maturity": 4
}, - {
- "due-date": "2019-11-18T00:00:00.000Z"
}, - {
- "id": 413552
}, - {
- "price-in": null
}, - {
- "price-out": null
}, - {
- "price": 0.01
}, - {
- "closed": false
}, - {
- "days-to-maturity-from-creation": 4
}, - {
- "close": 0.08
}, - {
- "bid": 0.07
}, - {
- "ask": 0.09
}, - {
- "volume": 176900
}, - {
- "financial-volume": 15529
}, - {
- "maturity-type": "AMERICAN"
}
], - "details": {
- "legs": [
- {
- "symbol": "COGNK98"
}, - {
- "type": "BUY"
}, - {
- "action": "BUY"
}, - {
- "instrument-type": "CALL"
}, - {
- "strike": 9.77
}, - {
- "spot-price": 9.77
}, - {
- "amount": 0
}, - {
- "days-to-maturity": 4
}, - {
- "due-date": "2019-11-18T00:00:00.000Z"
}, - {
- "price-in": 0.13
}, - {
- "price-out": null
}, - {
- "days-to-maturity-from-creation": 4
}, - {
- "initial": -53.34
}, - {
- "current": 0
}, - {
- "close": 0.32
}, - {
- "bid": 0.23
}, - {
- "ask": 0
}, - {
- "volume": 204900
}, - {
- "financial-volume": 70405
}, - {
- "maturity-type": "AMERICAN"
}
], - "in": [
- {
- "symbol": "COGNK40"
}, - {
- "type": "BUY"
}, - {
- "action": "BUY"
}, - {
- "instrument-type": "CALL"
}, - {
- "strike": 10.47
}, - {
- "spot-price": 9.78
}, - {
- "amount": 200
}, - {
- "days-to-maturity": 4
}, - {
- "due-date": "2019-11-18T00:00:00.000Z"
}, - {
- "id": 413552
}, - {
- "price-in": null
}, - {
- "price-out": null
}, - {
- "price": 0.01
}, - {
- "closed": false
}, - {
- "days-to-maturity-from-creation": 4
}, - {
- "close": 0.08
}, - {
- "bid": 0.07
}, - {
- "ask": 0.09
}, - {
- "volume": 176900
}, - {
- "financial-volume": 15529
}, - {
- "maturity-type": "AMERICAN"
}
], - "out": [ ]
}, - "positions": [
- {
- "id": 117762
}, - {
- "name": "AAAAAAA"
}, - {
- "uid": "P117762"
}
]
}
Endpoint description
id required | string |
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X DELETE -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/groups/:id'
{- "status": { }
}
Endpoint description
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X GET -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/portfolio/hedge/orders'
{ }
Endpoint description
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X POST -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/portfolio/hedge/orders'
{ }
Endpoint description
id required | string |
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X GET -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/portfolio/hedge/orders/:id'
{ }
Esse endpoint lista todos os portfolios existentes.
type required | string Enum: "managed" "unmanaged" Portfolio Type. Pode ser gerenciado( |
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X GET -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/portfolios?type=managed'
{- "id": 1,
- "user_id": 10518,
- "created_at": "2019-11-08T12:51:25.032Z",
- "updated_at": "2019-11-08T12:51:25.032Z",
- "alpha": null,
- "h": null
}
Endpoint description
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
Portfolio.
portfolio | object |
OK
{- "portfolio": {
- "type": "UnmanagedPortfolio",
- "name": "string"
}
}
{ }
Endpoint description
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X GET -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/portfolio'
{- "status": { }
}
Endpoint description
symbol required | string |
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
amount | integer |
average-price | number |
close | number |
name | string |
symbol | string |
variation | number |
OK
{- "amount": 100,
- "average-price": 35,
- "close": 33.57,
- "name": "BRADESCO PN",
- "symbol": "BBDC4",
- "variation": -1.73
}
{ }
Endpoint description
symbol required | string |
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X DELETE -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/portfolio/:symbol'
{ }
Endpoint description
id required | string |
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X GET -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/portfolios/:id'
{- "id": 1,
- "user_id": 10518,
- "=eated_at": "2019-11-08T12:51:25.032Z",
- "updated_at": "2019-11-08T12:51:25.032Z",
- "alpha": null,
- "h": null
}
Endpoint description
id required | string |
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X PUT -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/portfolios/:id'
{ }
Endpoint description
id required | string |
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X PATCH -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/portfolios/:id'
{ }
Endpoint description
id required | string |
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X DELETE -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/portfolios/:id'
{ }
Endpoint description
id required | integer Example: 1 |
Access-Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X GET -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/portfolios/:id/orders'
[- {
- "symbol": "BBDC4",
- "amount": 1900,
- "price": 19.5,
- "status": "executed",
- "date": "2019-11-28T18:37:04.172Z",
- "type": "sell"
}
]
Endpoint description
id required | integer Example: 1 |
Access-Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
order | object |
OK
{- "order": {
- "symbol": "VVAR3",
- "amount": 100,
- "action": "buy",
- "price": 19.8,
- "brokerage": 0.3,
- "order_type": "Tenho que passar essa string.",
- "status": "executed"
}
}
{- "order": {
- "id": 112,
- "instrument_id": 596,
- "portfolio_id": 14915,
- "order_type": "Tenho que passar essa string.",
- "action": -1,
- "amount": 100,
- "price": 19.8,
- "status": "executed",
- "created_at": "2020-05-23T15:05:56.764-03:00",
- "updated_at": "2020-05-23T15:05:56.859-03:00",
- "brokerage": 0.3
}, - "position": {
- "symbol": "VVAR3",
- "name": "VIAVAREJO ON",
- "amount": 200,
- "close": 9.7,
- "weight": 8.37163012615988,
- "category": 1,
- "average-price": 14.3,
- "minimum-price": null,
- "maximum-price": null,
- "positive-scenario-probability": 50
}
}
Endpoint description
portfolio_id required | string |
id required | number |
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
amount | integer |
price | number |
OK
{- "instrument": {
- "amount": 5000,
- "price": 22.4
}
}
[- {
- "symbol": "BBDC4",
- "name": "BRADESCO PN",
- "amount": 10000,
- "close": 33.17,
- "weight": 81.8961892679431,
- "category": 1,
- "average-price": 22.4,
- "minimum-price": null,
- "maximum-price": null,
- "positive-scenario-probability": 50
}, - {
- "symbol": "PETR4",
- "name": "PETROBRAS PN",
- "amount": 1300,
- "close": 25.51,
- "weight": 18.1038107320569,
- "category": 1,
- "average-price": 38.09,
- "minimum-price": null,
- "maximum-price": null,
- "positive-scenario-probability": 50,
- "id": 6771
}, - {
- "name": "teste",
- "alpha": null,
- "h": null,
- "type": "ManagedPortfolio",
- "owner": 1,
- "initial": 273517,
- "current": 364863,
- "variation": 33.396827253881845,
- "instruments": null,
- "balancings": [
- {
- "id": 4,
- "category": {
- "id": 1,
- "name": "Ação"
}, - "amount": 50,
- "brokerage": 8
}, - {
- "id": 5,
- "category": {
- "id": 3,
- "name": "Bond"
}, - "amount": 50,
- "brokerage": 15
}
]
}
]
Endpoint description
portfolio_id required | string |
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
symbol | string |
amount | integer |
price | number |
OK
{- "instrument": {
- "symbol": "BBDC4",
- "amount": 5000,
- "price": 22.4
}
}
[- {
- "symbol": "BBDC4",
- "name": "BRADESCO PN",
- "amount": 10000,
- "close": 33.17,
- "weight": 81.8961892679431,
- "category": 1,
- "average-price": 22.4,
- "minimum-price": null,
- "maximum-price": null,
- "positive-scenario-probability": 50,
- "id": 6771
}, - {
- "name": "teste",
- "alpha": null,
- "h": null,
- "type": "ManagedPortfolio",
- "owner": 1,
- "initial": 273517,
- "current": 364863,
- "variation": 33.396827253881845,
- "instruments": null,
- "balancings": [
- {
- "id": 4,
- "category": {
- "id": 1,
- "name": "Ação"
}, - "amount": 50,
- "brokerage": 8
}, - {
- "id": 5,
- "category": {
- "id": 3,
- "name": "Bond"
}, - "amount": 50,
- "brokerage": 15
}
]
}
]
Endpoint description
id required | number |
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
amount | integer |
price | number |
OK
{- "instrument": {
- "amount": 5000,
- "price": 22.4
}
}
[- {
- "symbol": "BBDC4",
- "name": "BRADESCO PN",
- "amount": 10000,
- "close": 33.17,
- "weight": 81.8961892679431,
- "category": 1,
- "average-price": 22.4,
- "minimum-price": null,
- "maximum-price": null,
- "positive-scenario-probability": 50
}, - {
- "symbol": "PETR4",
- "name": "PETROBRAS PN",
- "amount": 1300,
- "close": 25.51,
- "weight": 18.1038107320569,
- "category": 1,
- "average-price": 38.09,
- "minimum-price": null,
- "maximum-price": null,
- "positive-scenario-probability": 50,
- "id": 6771
}, - {
- "name": "teste",
- "alpha": null,
- "h": null,
- "type": "ManagedPortfolio",
- "owner": 1,
- "initial": 273517,
- "current": 364863,
- "variation": 33.396827253881845,
- "instruments": null,
- "balancings": [
- {
- "id": 4,
- "category": {
- "id": 1,
- "name": "Ação"
}, - "amount": 50,
- "brokerage": 8
}, - {
- "id": 5,
- "category": {
- "id": 3,
- "name": "Bond"
}, - "amount": 50,
- "brokerage": 15
}
]
}
]
Endpoint description
id required | number |
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
amount | integer |
price | number |
OK
{- "instrument": {
- "amount": 5000,
- "price": 22.4
}
}
[- {
- "symbol": "BBDC4",
- "name": "BRADESCO PN",
- "amount": 10000,
- "close": 33.17,
- "weight": 81.8961892679431,
- "category": 1,
- "average-price": 22.4,
- "minimum-price": null,
- "maximum-price": null,
- "positive-scenario-probability": 50
}, - {
- "symbol": "PETR4",
- "name": "PETROBRAS PN",
- "amount": 1300,
- "close": 25.51,
- "weight": 18.1038107320569,
- "category": 1,
- "average-price": 38.09,
- "minimum-price": null,
- "maximum-price": null,
- "positive-scenario-probability": 50,
- "id": 6771
}, - {
- "name": "teste",
- "alpha": null,
- "h": null,
- "type": "ManagedPortfolio",
- "owner": 1,
- "initial": 273517,
- "current": 364863,
- "variation": 33.396827253881845,
- "instruments": null,
- "balancings": [
- {
- "id": 4,
- "category": {
- "id": 1,
- "name": "Ação"
}, - "amount": 50,
- "brokerage": 8
}, - {
- "id": 5,
- "category": {
- "id": 3,
- "name": "Bond"
}, - "amount": 50,
- "brokerage": 15
}
]
}
]
id required | number |
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
[- {
- "symbol": "BBDC4",
- "name": "BRADESCO PN",
- "amount": 10000,
- "close": 33.17,
- "weight": 81.8961892679431,
- "category": 1,
- "average-price": 22.4,
- "minimum-price": null,
- "maximum-price": null,
- "positive-scenario-probability": 50
}, - {
- "symbol": "PETR4",
- "name": "PETROBRAS PN",
- "amount": 1300,
- "close": 25.51,
- "weight": 18.1038107320569,
- "category": 1,
- "average-price": 38.09,
- "minimum-price": null,
- "maximum-price": null,
- "positive-scenario-probability": 50,
- "id": 6771
}, - {
- "name": "teste",
- "alpha": null,
- "h": null,
- "type": "ManagedPortfolio",
- "owner": 1,
- "initial": 273517,
- "current": 364863,
- "variation": 33.396827253881845,
- "instruments": null,
- "balancings": [
- {
- "id": 4,
- "category": {
- "id": 1,
- "name": "Ação"
}, - "amount": 50,
- "brokerage": 8
}, - {
- "id": 5,
- "category": {
- "id": 3,
- "name": "Bond"
}, - "amount": 50,
- "brokerage": 15
}
]
}
]
Endpoint description
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X GET -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/stocks'
{- "id": 661,
- "symbol": "ENAT3",
- "prefix": "ENAT",
- "open": 13.29,
- "high": 13.5,
- "low": 13.2,
- "close": 13.31,
- "volume": 222200,
- "variation": -0.6,
- "financial-volume": 2968388,
- "iv": 0,
- "iv-1y-max": 0,
- "iv-1y-min": 0,
- "iv-1y-rank": 0,
- "iv-1y-percentile": 0,
- "iv-6m-min": null,
- "iv-6m-max": null,
- "iv-6m-rank": null,
- "iv-6m-percentile": null,
- "ewma": 0,
- "ewma-1y-min": 0,
- "ewma-1y-max": 0,
- "ewma-1y-rank": 0,
- "ewma-1y-percentile": 0,
- "ewma-6m-min": null,
- "ewma-6m-max": null,
- "ewma-6m-rank": null,
- "ewma-6m-percentile": null,
- "short-term-trend": 1,
- "middle-term-trend": 0,
- "has-options": true,
- "name": "ENAUTA PART ON"
}
Endpoint description
id required | string |
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X GET -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/stocks/:id'
{- "id": 661,
- "symbol": "ENAT3",
- "prefix": "ENAT",
- "open": 13.29,
- "high": 13.5,
- "low": 13.2,
- "close": 13.31,
- "volume": 222200,
- "variation": -0.6,
- "financial-volume": 2968388,
- "iv": 0,
- "iv-1y-max": 0,
- "iv-1y-min": 0,
- "iv-1y-rank": 0,
- "iv-1y-percentile": 0,
- "iv-6m-min": null,
- "iv-6m-max": null,
- "iv-6m-rank": null,
- "iv-6m-percentile": null,
- "ewma": 0,
- "ewma-1y-min": 0,
- "ewma-1y-max": 0,
- "ewma-1y-rank": 0,
- "ewma-1y-percentile": 0,
- "ewma-6m-min": null,
- "ewma-6m-max": null,
- "ewma-6m-rank": null,
- "ewma-6m-percentile": null,
- "short-term-trend": 1,
- "middle-term-trend": 0,
- "has-options": true,
- "name": "ENAUTA PART ON",
- "sector": "Financeiro e Outros",
- "subsector": "Exploração de Imóveis",
- "segment": "Exploração de Imóveis"
}
Endpoint description
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X GET -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/study_templates'
{- "status": "ok",
- "data": {
- "name": "null,",
- "timestamp": 1573235666
}
}
Endpoint description
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X POST -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/study_templates'
{- "status": "ok"
}
Endpoint description
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X DELETE -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/study_templates'
{- "status": "ok"
}
Endpoint description
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X GET -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/charts'
{- "status": "ok",
- "data": [
- {
- "id": 3545
}, - {
- "name": null
}, - {
- "symbol": null
}, - {
- "resolution": null
}, - {
- "timestamp": 1573235679
}
]
}
Endpoint description
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X POST -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/charts'
{- "status": "ok"
}
Endpoint description
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X DELETE -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/charts'
{- "status": "ok"
}
Endpoint description
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X GET -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/data/quote'
{- "symbol": "PETR4",
- "open": 30.45,
- "high": 30.72,
- "low": 30.2,
- "close": 30.41,
- "volume": 18070900,
- "financial_volume": 548859155,
- "bid": 30.4,
- "ask": 30.41,
- "time": "2019-11-08T15:02:19.000Z"
}
Endpoint description
symbol required | string |
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X GET -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/charts/instruments/:symbol'
{- "name": "PETR4",
- "listed_exchange": "B3",
- "timezone": "America/Sao_Paulo",
- "pricescale": 100,
- "minmov": 1,
- "minmov2": 0,
- "has_intraday": true,
- "has_seconds": false,
- "has_daily": true,
- "has_weekly_and_monthly"": true,
- "has_no_volume": false,
- "volume_precision": 0,
- "data_status": "streaming",
- "expired": false
}
Endpoint description
expr required | string |
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X GET -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/charts/instruments/search/:expr'
{- "symbol": "PETR4",
- "fullname": "PETR4",
- "description": "Petrobras PN",
- "exchange": "B3",
- "ticker": "PETR4",
- "type": "Ação"
}
Endpoint description
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X GET -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/charts/data/time'
{- "now": "2019-11-08T10:10:29.000Z"
}
Endpoint description
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X GET -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/charts/data/info?from=YYYYMMDDHHmm'
{- "supports_search": true,
- "supports_group_request": false,
- "supports_marks": false,
- "exchanges": [
- {
- "value": "BOVESPA",
- "name": "BOVESPA",
- "desc": "Bolsa de Valores de São Paulo"
}
], - "symbolsTypes": [
- {
- "value": "VST"
}, - {
- "name": "Ações"
}
], - "supportedResolutions": [
- 1,
- 5,
- 15,
- 30,
- 60,
- 120,
- 240,
- "D",
- "W",
- "M",
- "Y"
], - "supports_timescale_marks": false,
- "supports_time": true,
- "data_source_id": "realtime",
- "update_rate": 0
}
Endpoint description
symbol required | string |
resolution required | string |
from required | string <YYYYMMDDHHmm> |
to | string |
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X GET -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/charts/data/:symbol/:resolution'
{- "symbol": "COGN3",
- "name": "COGN3",
- "resolution": "1d",
- "data": [
- {
- "time": 1538967600000,
- "open": 26.756173166557254,
- "high": 26.756173166557254,
- "low": 26.756173166557254,
- "close": 26.756173166557254,
- "volume": 0
}
]
}
Endpoint description
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X GET -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/watchlist/'
{- "symbol": "PETR4",
- "price": 30.02,
- "variation": 0,
- "weight": 0
}
Endpoint description
symbol required | string |
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X POST -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/watchlist/:symbol'
{- "symbol": "PETR4",
- "price": 30.02,
- "variation": 0,
- "weight": 0
}
Endpoint description
symbol required | string |
Access Token required | string Example: P85w4/j6vYELJpQdRI9JtLhGxAYGIaDGYADgAY7FA7Y7SdUASAdsfafUASHUASHaSUHIugruhe |
OK
curl -i -X DELETE -H 'Access-Token: YOUR ACCESS TOKEN' 'https://api.oplab.com.br/v2/watchlist/:symbol'