{"id":"a2ce72b4-f684-48c8-996b-261c44e60463","description":"
Vis\u00e3o Geral<\/b><\/summary>

\r\n\r\nA API oferece informa\u00e7\u00f5es sobre a gest\u00e3o de posi\u00e7\u00f5es (saldos) em t\u00edtulos p\u00fablicos de investidores do Tesouro Direto, permitindo ao utilizador acompanhar a situa\u00e7\u00e3o dos investimentos desses investidores.\r\n\r\n**Importante:** A API est\u00e1 em constante atualiza\u00e7\u00e3o, expandindo seu conjunto de funcionalidades dispon\u00edveis conforme an\u00e1lise e prioriza\u00e7\u00e3o de demandas.\r\n\r\n**Funcionalidades dispon\u00edveis** \r\nAcesse aba \"M\u00e9todos\" para obter detalhes dos m\u00e9todos dispon\u00edveis.\r\n\r\n\r\n<\/p><\/details>\r\n\r\n

Host<\/b><\/summary>

\r\n\r\n**Acesso por meio da Internet:**\r\n- Certifica\u00e7\u00e3o: https:\/\/api-tesourodireto.cert.netb3.com.br\/ \r\n- Produ\u00e7\u00e3o: https:\/\/api-tesourodireto.netb3.com.br\/.\r\n\r\n<\/p><\/details>\r\n\r\n

Modelo de Autentica\u00e7\u00e3o<\/b><\/summary>

\r\n\r\n[Clique aqui](\/index.php?option=com_content&view=article&id=43) para mais informa\u00e7\u00f5es sobre o Modelo de Autentica\u00e7\u00e3o utilizado.\r\n\r\n<\/p><\/details>\r\n\r\n\r\n\r\n","deprecated":false,"apiVersion":"1.0.0-rc1","swaggerVersion":"1.1","basePath":"https:\/\/developers.b3.com.br:8065","resourcePath":"\/homebroker\/api\/positions\/v1","models":{"PositionSyntheticRspGet":{"type":"object","required":["data","links"],"properties":{"data":{"type":"array","items":{"$ref":"#\/definitions\/PositionSyntheticMCRspGet"}},"meta":{"$ref":"#\/definitions\/Meta"},"links":{"$ref":"#\/definitions\/Link"}}},"PositionsBlockedGet":{"type":"object","required":["data","links"],"properties":{"data":{"type":"array","items":{"$ref":"#\/definitions\/PositionsBlockedRspGet"}},"meta":{"$ref":"#\/definitions\/Meta"},"links":{"$ref":"#\/definitions\/Link"}}},"Meta":{"type":"object","required":["totalPages","totalRecords"],"properties":{"totalRecords":{"type":"integer","format":"int32","example":25,"description":"Total number of records","minimum":-2147483648,"maximum":2147483647},"totalPages":{"type":"integer","format":"int32","example":4,"description":"Total number of pages","minimum":-2147483648,"maximum":2147483647}}},"PositionSyntheticMCRspGet":{"type":"object","required":["cartTypeCode","cpfNumber","participantCode","treasuryBondCode","treasuryBondQuantity"],"properties":{"participantCode":{"type":"string","example":"asperiores","description":"Operational participant code","maxLength":60},"cpfNumber":{"type":"string","example":"officiis","description":"CPF document number.","maxLength":11},"cartTypeCode":{"type":"integer","format":"int32","example":392766061,"description":"Cart Type Code","minimum":-2147483648,"maximum":2147483647},"treasuryBondCode":{"type":"integer","format":"int32","example":861987890,"description":"Defines the Bond code.","minimum":-2147483648,"maximum":2147483647},"treasuryBondQuantity":{"type":"number","format":"double","example":9.99,"description":"Treasury Bond quantity"}}},"CartsTypesRspGet":{"type":"object","required":["links"],"properties":{"data":{"type":"array","items":{"$ref":"#\/definitions\/CartTypesGet"}},"meta":{"$ref":"#\/definitions\/Meta"},"links":{"$ref":"#\/definitions\/Link"}}},"CartTypesGet":{"type":"object","required":["cartTypeCode","cartTypeName"],"properties":{"cartTypeCode":{"type":"integer","format":"int32","example":1058416741,"description":"Cart Type Code","minimum":-2147483648,"maximum":2147483647},"cartTypeName":{"type":"string","example":"itaque","description":"Cart type name","maxLength":50}}},"Error":{"type":"object","required":["code","detail","title"],"properties":{"code":{"type":"string","example":"natus","description":"C\u00f3digo do erro.","maxLength":10},"title":{"type":"string","example":"aspernatur","description":"Mensagem do erro.","maxLength":100},"detail":{"type":"string","example":"perspiciatis","description":"Informa\u00e7\u00f5es complementares sobre o erro.","maxLength":2000}}},"PositionsBlockedRspGet":{"type":"object","required":["cartTypeCode","cpfNumber","participantCode","treasuryBondCode","treasuryBondQuantity"],"properties":{"participantCode":{"type":"string","example":"libero","description":"Operational participant code","maxLength":60},"cpfNumber":{"type":"string","example":"est","description":"CPF document number.","maxLength":11},"cartTypeCode":{"type":"integer","format":"int32","example":1917138084,"description":"Cart Type Code","minimum":-2147483648,"maximum":2147483647},"treasuryBondCode":{"type":"integer","format":"int32","example":646218337,"description":"Defines the Bond code.","minimum":-2147483648,"maximum":2147483647},"treasuryBondQuantity":{"type":"number","format":"double","example":9.99,"description":"Treasury Bond quantity"}}},"Link":{"type":"object","required":["self"],"properties":{"self":{"type":"string","example":"eligendi","description":"Current page link","maxLength":2000},"first":{"type":"string","example":"incidunt","description":"First page link","maxLength":2000},"prev":{"type":"string","example":"pariatur","description":"Next page link","maxLength":2000},"next":{"type":"string","example":"voluptate","description":"Next page link","maxLength":2000},"last":{"type":"string","example":"consequatur","description":"Last page link","maxLength":2000}}},"errors":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#\/definitions\/Error"}}}}},"consumes":[],"produces":[],"authorizations":{"_default":{"scopes":[{"scope":"resource.WRITE"},{"scope":"resource.READ"}],"grantTypes":{"clientCredentials":{"url":"https:\/\/localhost:8089\/api\/oauth\/token","tokenName":"access_token"}},"type":"oauth2"}},"name":"Positions","summary":"Essa api tem funcionalidades relacionadas a posi\u00e7\u00f5es (saldos) em t\u00edtulos p\u00fablicos de investidores no Tesouro Direto.","securityProfile":{"devices":[{"type":"oauth","typeDisplayName":"OAuth 2.0","name":"OAuth","order":1,"scopes":["resource.READ","resource.WRITE"],"scopesMatching":"Any","accessTokenLocation":"HEADER","authorizationHeaderPrefix":"Bearer","accessTokenLocationQueryString":"","clientCredentialsGrantTokenName":"access_token","clientCredentialsGrantTokenEndpointUrl":"https:\/\/localhost:8089\/api\/oauth\/token"}]},"basePaths":["https:\/\/developers.b3.com.br:8065"],"state":"published","cors":true,"expired":false,"retirementDate":0,"retired":false,"tags":{"Tipo":["PUBLICA"],"Grupo":["TESOURODIRETO"]},"availableApiDefinitions":{"Swagger 1.1":"\/discovery\/swagger\/api\/id\/a2ce72b4-f684-48c8-996b-261c44e60463?swaggerVersion=1.1&filename=Positions.json","Swagger 2.0":"\/discovery\/swagger\/api\/id\/a2ce72b4-f684-48c8-996b-261c44e60463?swaggerVersion=2.0&filename=Positions.json"},"availableSDK":{"ios-swift":"\/discovery\/sdk\/a2ce72b4-f684-48c8-996b-261c44e60463\/ios-swift","android":"\/discovery\/sdk\/a2ce72b4-f684-48c8-996b-261c44e60463\/android","nodejs":"\/discovery\/sdk\/a2ce72b4-f684-48c8-996b-261c44e60463\/nodejs"},"apis":[{"path":"\/homebroker\/api\/positions\/v1\/synthetic\/{participantCode}\/{cpfNumber}\/{cartTypeCode}\/{treasuryBondCode}","name":"\/synthetic\/{participantCode}\/{cpfNumber}\/{cartTypeCode}\/{treasuryBondCode}","operations":[{"id":"19f989b9-c902-4056-88b5-4e8c456d9de7","description":"","httpMethod":"GET","nickname":"PositionsSyntheticGet","summary":"Places available to an investor","responseClass":"PositionSyntheticRspGet","errorResponses":[{"code":200,"reason":"Ok"},{"code":422,"reason":"Business Error."}],"consumes":[],"produces":["application\/json"],"tags":{},"securityProfile":{"devices":[{"type":"oauth","typeDisplayName":"OAuth 2.0","name":"OAuth","order":1,"scopes":["resource.READ","resource.WRITE"],"scopesMatching":"Any","accessTokenLocation":"HEADER","authorizationHeaderPrefix":"Bearer","accessTokenLocationQueryString":"","clientCredentialsGrantTokenName":"access_token","clientCredentialsGrantTokenEndpointUrl":"https:\/\/localhost:8089\/api\/oauth\/token"}]},"cors":true,"parameters":[{"description":"Operational participant code","required":true,"maxLength":60,"name":"participantCode","dataType":"string","paramType":"path","allowMultiple":false},{"description":"CPF document number.","required":true,"maxLength":11,"name":"cpfNumber","dataType":"string","paramType":"path","allowMultiple":false},{"description":"Cart Type Code","format":"int32","required":true,"name":"cartTypeCode","dataType":"int","paramType":"path","allowMultiple":false},{"description":"Defines the Bond code.","format":"int32","required":true,"name":"treasuryBondCode","dataType":"int","paramType":"path","allowMultiple":false}]}]},{"path":"\/homebroker\/api\/positions\/v1\/blocked\/synthetic\/{participantCode}\/{cpfNumber}\/{cartTypeCode}\/{treasuryBondCode}","name":"\/blocked\/synthetic\/{participantCode}\/{cpfNumber}\/{cartTypeCode}\/{treasuryBondCode}","operations":[{"id":"1806ef5c-164b-4595-90f6-7cde09911dc9","description":"","httpMethod":"GET","nickname":"PositionBlockedGet","summary":"Return information about locked positions to an investor in a synthetic form.","responseClass":"PositionsBlockedGet","errorResponses":[{"code":200,"reason":"Ok"},{"code":422,"reason":"Business Error."}],"consumes":[],"produces":["application\/json"],"tags":{},"securityProfile":{"devices":[{"type":"oauth","typeDisplayName":"OAuth 2.0","name":"OAuth","order":1,"scopes":["resource.WRITE","resource.READ"],"scopesMatching":"Any","accessTokenLocation":"HEADER","authorizationHeaderPrefix":"Bearer","accessTokenLocationQueryString":"","clientCredentialsGrantTokenName":"access_token","clientCredentialsGrantTokenEndpointUrl":"https:\/\/localhost:8089\/api\/oauth\/token"}]},"cors":true,"parameters":[{"description":"Operational participant code","required":true,"maxLength":60,"name":"participantCode","dataType":"string","paramType":"path","allowMultiple":false},{"description":"CPF document number.","required":true,"maxLength":11,"name":"cpfNumber","dataType":"string","paramType":"path","allowMultiple":false},{"description":"Cart Type Code","format":"int32","required":true,"name":"cartTypeCode","dataType":"int","paramType":"path","allowMultiple":false},{"description":"Defines the Bond code.","format":"int32","required":true,"name":"treasuryBondCode","dataType":"int","paramType":"path","allowMultiple":false}]}]},{"path":"\/homebroker\/api\/positions\/v1\/enums\/carttypes","name":"\/enums\/carttypes","operations":[{"id":"b6116c9c-9cef-40f4-9a67-16ab2cbbb31b","description":"","httpMethod":"GET","nickname":"CartTypesGet","summary":"Return list of enumerations that define a public title type.","responseClass":"CartsTypesRspGet","errorResponses":[{"code":200,"reason":"Ok"},{"code":400,"reason":"Bad Request"},{"code":401,"reason":"Unauthorized"},{"code":403,"reason":"Forbidden"},{"code":404,"reason":"Not Found"},{"code":405,"reason":"Method Not Allowed"},{"code":422,"reason":"Business Error"}],"consumes":[],"produces":["application\/json"],"tags":{},"securityProfile":{"devices":[{"type":"oauth","typeDisplayName":"OAuth 2.0","name":"OAuth","order":1,"scopes":["resource.WRITE","resource.READ"],"scopesMatching":"Any","accessTokenLocation":"HEADER","authorizationHeaderPrefix":"Bearer","accessTokenLocationQueryString":"","clientCredentialsGrantTokenName":"access_token","clientCredentialsGrantTokenEndpointUrl":"https:\/\/localhost:8089\/api\/oauth\/token"}]},"cors":true,"parameters":[]}]}],"createDate":1718989179142,"accessGrantedDate":1718989180764,"type":"rest","enableInlineTryIt":true}