# TradeLocker Public Api Documentation > Documentation for TradeLocker Public Api ## Guides: documentation - [Getting Started with TradeLocker Public API](https://public-api.tradelocker.com/docs/getting-started.md): This page will help you get started with TradeLocker Public API. You'll be up and running in a jiffy! - [Difference between order(id) and position(id)](https://public-api.tradelocker.com/docs/difference-between-orderid-and-positionid.md): Here we discuss order and position creation and the difference between `orderId` and `positionId` ## API Reference: Trading API - Auth - [Fetch JWT token](https://public-api.tradelocker.com/reference/getjwttokens.md): Returns JWT `accessToken` and `refreshToken`. - [Refresh JWT token](https://public-api.tradelocker.com/reference/getjwtrefreshtokens.md): Generate new JWT accessToken and refreshToken - [List all accounts](https://public-api.tradelocker.com/reference/getallaccounts.md): List all of the users accounts, find the accNum for making requests to the /trade api - Config - [Get configuration](https://public-api.tradelocker.com/reference/getconfigusingget.md) - Account - [Get account details](https://public-api.tradelocker.com/reference/getaccounts.md): Detailed information about the account selected by accNum. - [Get list of instruments](https://public-api.tradelocker.com/reference/getinstruments.md): Get the list of the instruments that are available for trading with the specified account. - [Get non-final orders](https://public-api.tradelocker.com/reference/getorders.md): Get non-final orders for the account. The column names are defined in the `ordersConfig` part of the `/trade/config` route - [Get orders history](https://public-api.tradelocker.com/reference/getordershistory.md): Get orders history for an account. Returns all user's orders with a final status (rejected, filled, canceled). The column names are defined in the `ordersHistoryConfig` part of the `/trade/config`… - [Get open positions](https://public-api.tradelocker.com/reference/getpositions.md): Get all currently open positions for an account. The column names are defined in the `positionsConfig` part of the `/trade/config` route - [Get account's current details](https://public-api.tradelocker.com/reference/getstate.md): Get current account state, such as balance, available funds, PnL, etc. Field names can be fetched from /config route. - Instruments and Sessions - [Get instrument details](https://public-api.tradelocker.com/reference/getinstrumentdetails.md): Get detailed instrument settings, such as lot steps and sizes, quoting currency, trade session id, etc. - [Get trade session information](https://public-api.tradelocker.com/reference/gettradesession.md): Get detailed information about a specific trade session. - [Get allowed orders operation](https://public-api.tradelocker.com/reference/getsessionstatususingget.md): Get information about the orders operations (new, modify, cancel) and types (manual, market, stop, limit, stop limit, trailing stop) allowed in some session, given its session status. - Market data - [Get current daily bar](https://public-api.tradelocker.com/reference/getdailybar.md): Get current daily bar. - [Get the historical bars](https://public-api.tradelocker.com/reference/gethistory.md): Get the historical bars for an instrument. Any request that would result in a response with more than `20,000` bars will be rejected.
Each property of the response object is a table column. Bar… - [Get current prices](https://public-api.tradelocker.com/reference/getquotes.md): Get current prices of the instrument. - Trading - [Place a new order](https://public-api.tradelocker.com/reference/placeorder.md): Place a new order.
Fields `qty, routeId, side, validity, type, tradableInstrumentId` are mandatory inside of the request body. Price can be set to 0 for market orders. If using a `stop` type of… - [Cancel all orders](https://public-api.tradelocker.com/reference/cancelallorders.md): Cancel all existing orders. - [Close all positions](https://public-api.tradelocker.com/reference/closeallpositions.md): Place closing orders for all open positions. Isn't guaranteed to close all positions, or close them immediately. Will attempt to place an IOC, then GTC closing order, so the execution might be… - [Cancel an existing order](https://public-api.tradelocker.com/reference/cancelorder.md): Cancel an existing order. Only available before an order is executed. - [Modify an existing order](https://public-api.tradelocker.com/reference/modifyorder.md): Modify an existing order. For more details on each of the fields in the body, look at their definitions in the `POST /trade/accounts/{accountId}/orders` route. - [Close a position](https://public-api.tradelocker.com/reference/closeposition.md): Place an order to close an existing position. Isn't guaranteed to close the positions, or close it immediately. Will attempt to place an IOC, then GTC closing order, so the execution might be… - [Modify position](https://public-api.tradelocker.com/reference/modifyposition.md): Modify an existing position's stop loss, take profit, or both. To remove stop loss or take profit you need to set the parameter to `null`. ## API Reference: Studio Creator API - Bot - [List all seller bots](https://public-api.tradelocker.com/reference/get_seller_created_bots_marketplace_seller_bots_get.md): Get all bots created by seller - [Get a bot by ID](https://public-api.tradelocker.com/reference/get_bot_marketplace_seller_bot__botid__get.md): Get the bot - [List all seller bots with enriched data](https://public-api.tradelocker.com/reference/get_seller_created_bots_enriched_marketplace_seller_bots_enriched_get.md): Get all bots created by seller with enriched data - Subscription - [List all seller subscriptions](https://public-api.tradelocker.com/reference/get_seller_created_subscriptions_marketplace_seller_subscriptions_get.md): Get all subscriptions created by seller - [Get a subscription](https://public-api.tradelocker.com/reference/get_subscription_marketplace_seller_subscription__botid___buyerid__get.md): Get the subscription created by seller - [Update a subscription](https://public-api.tradelocker.com/reference/patch_subscription_marketplace_seller_subscription__botid___buyerid__patch.md): Update the subscription - [Create a subscription](https://public-api.tradelocker.com/reference/post_subscription_marketplace_seller_subscription_post.md): Create the subscription - Subscription Request - [List all subscription requests](https://public-api.tradelocker.com/reference/get_seller_subscription_requests_marketplace_seller_subscription_requests_get.md): Get all subscription requests for seller's bots - [Update a subscription request status](https://public-api.tradelocker.com/reference/patch_seller_subscription_request_marketplace_seller_subscription_request__subreqid__patch.md): Update subscription request status ## Recipes - [Open and close a position](https://public-api.tradelocker.com/recipes/open-and-close-a-position.md)