{"_id":"556df857d02e0b190042f111","parentDoc":null,"version":{"_id":"556dd000d0f4740d00380e00","project":"556dd000d0f4740d00380dfd","__v":14,"createdAt":"2015-06-02T15:47:12.583Z","releaseDate":"2015-06-02T15:47:12.583Z","categories":["556dd001d0f4740d00380e01","556e17023f11b01900a36978","556eff53fc3aa80d00e1aa67","557078cf910c090d00c43414","557078dc9ea7860d008b24ed","5571a533dbb3632100974aed","5571c4ed6d8908230061f39e","5575b9b10b81dc230069c981","5580706cbe698419008f2ca7","55a4117d53611017004387d4","58502492f744712700462b20","588279ccd63d450f00e1aa58","59e76819193831002803721e","5a6899886b88e400403c3ce5"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2"},"project":"556dd000d0f4740d00380dfd","__v":2,"category":{"_id":"556dd001d0f4740d00380e01","project":"556dd000d0f4740d00380dfd","__v":5,"pages":["556dd001d0f4740d00380e03","556df7a4d0f4740d00380e6e","556df857d02e0b190042f111","556df8893f11b01900a36927","556dfab7d0f4740d00380e7a"],"version":"556dd000d0f4740d00380e00","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-06-02T15:47:13.092Z","from_sync":false,"order":0,"slug":"overview","title":"Overview"},"user":"550e28af11e8d00d00b803f2","githubsync":"","metadata":{"title":"","description":"","image":[]},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-06-02T18:39:19.479Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":2,"body":"In the interest of simplicity, we've done our best to follow standard REST structures for our APIs.  This entails leveraging simple resource endpoints and employing HTTP verbs where possible to make the endpoints intutitive.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Parameters\"\n}\n[/block]\nAll endpoints require authentication and should include the `Authorization` header and be authenticated using HTTP Basic Authentication.  See [Authentication](doc:authentication) \n\nPath parameters are widely used throughout the API.  Mostly for specifying Id's of ownership.  I.e. `/a/v1/accounts/54685251/balances` would be a request for balances on account 54685251.\n\nAdditional parameters may be sent on the query string for `GET` requests.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET /a/v1/accounts?filter=approved HTTP/1.1\\nAuthorization: Basic a2FHQTY1c0lsNzlJZFh4cjNsbkdzN0oyQzlDeXdRdEo6dWVlS3pKT0VoMGZoNkRoOA==\\nHost: api.tradier.com\\nConnection: close\",\n      \"language\": \"http\"\n    }\n  ]\n}\n[/block]\nWhen submitting `POST` or `PUT` requests for creating or updating records **all bodies must be valid, well-formed JSON.** Typically, it will be the same JSON you can expect for a `GET` request from the same resource.\n\nFor example, to create a new webhook, you would send the following request:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /a/v1/webhooks HTTP/1.1\\nAuthorization: Basic a2FHQTY1c0lsNzlJZFh4cjNsbkdzN0oyQzlDeXdRdEo6dWVlS3pKT0VoMGZoNkRoOA==\\nContent-Type: application/json\\nHost: api.tradier.com\\nConnection: close\\n\\n{\\n    \\\"url\\\": \\\"http://tradier.com/example/webhook\\\",\\n}\",\n      \"language\": \"http\",\n      \"name\": \"Create a Webhook\"\n    }\n  ]\n}\n[/block]","excerpt":"General information about API requests to the Tradier Brokerage API","slug":"requests","type":"basic","title":"Requests"}

Requests

General information about API requests to the Tradier Brokerage API

In the interest of simplicity, we've done our best to follow standard REST structures for our APIs. This entails leveraging simple resource endpoints and employing HTTP verbs where possible to make the endpoints intutitive. [block:api-header] { "type": "basic", "title": "Parameters" } [/block] All endpoints require authentication and should include the `Authorization` header and be authenticated using HTTP Basic Authentication. See [Authentication](doc:authentication) Path parameters are widely used throughout the API. Mostly for specifying Id's of ownership. I.e. `/a/v1/accounts/54685251/balances` would be a request for balances on account 54685251. Additional parameters may be sent on the query string for `GET` requests. [block:code] { "codes": [ { "code": "GET /a/v1/accounts?filter=approved HTTP/1.1\nAuthorization: Basic a2FHQTY1c0lsNzlJZFh4cjNsbkdzN0oyQzlDeXdRdEo6dWVlS3pKT0VoMGZoNkRoOA==\nHost: api.tradier.com\nConnection: close", "language": "http" } ] } [/block] When submitting `POST` or `PUT` requests for creating or updating records **all bodies must be valid, well-formed JSON.** Typically, it will be the same JSON you can expect for a `GET` request from the same resource. For example, to create a new webhook, you would send the following request: [block:code] { "codes": [ { "code": "POST /a/v1/webhooks HTTP/1.1\nAuthorization: Basic a2FHQTY1c0lsNzlJZFh4cjNsbkdzN0oyQzlDeXdRdEo6dWVlS3pKT0VoMGZoNkRoOA==\nContent-Type: application/json\nHost: api.tradier.com\nConnection: close\n\n{\n \"url\": \"http://tradier.com/example/webhook\",\n}", "language": "http", "name": "Create a Webhook" } ] } [/block]