> For a complete page index, fetch https://docs.transak.com/llms.txt # Get User Limits GET https://api-gateway-stg.transak.com/api/v2/orders/user-limit The **Get User Limits** is an **authenticated API** call that allows you to **fetch the maximum transaction limits** a user can place over different time periods (1-day, 30-day, 365-day). These limits are determined by **KYC type**, **payment method**, and **fiat currency**, and provides a detailed overview based on **total**, **spent**, **remaining** and **exceeded limits**. Reference: https://docs.transak.com/api/whitelabel/user/get-user-limits ## Request ### Query parameters - `isBuyOrSell` (string, required, default: BUY) — Transaction direction for the limit check. Supported value is BUY. - `paymentCategory` (string, required) — Supported payment method from `/fiat/public/v1/currencies/fiat-currencies` - `kycType` (string, required) — Value should be SIMPLE or STANDARD - `fiatCurrency` (string, required) — Supported fiat currency symbol from `/fiat/public/v1/currencies/fiat-currencies` ### Headers - `x-user-ip` (string, required) — End user's originating IP. More details [here](/guides/mandatory-security-changes#user-ip-header-in-apis) - `x-api-key` (string, required) — Partner API Key present in Transak Dashboard. - `authorization` (string, optional) — Authorization token is the accessToken received from the API -` api/v2/auth/verify` Note: This is not applicable for [Auth Reliance Flows](/features/auth-reliance) - `x-user-identifier` (string, optional) — Your authenticated user Email Id address. Note: This is applicable only for [Auth Reliance Flows](/features/auth-reliance) - `x-access-token` (string, optional) — Your Partner Access Token. Please refer [here](/guides/how-to-create-partner-access-token) for a tutorial on generating your access token. Note: This is applicable only for [Auth Reliance Flows](/features/auth-reliance) ## Response ### 200 200 - Success - `data` (ApiV2OrdersUserLimitGetResponsesContentApplicationJsonSchemaData, required) ## Errors ### 400 Bad Request Error 400 - Invalid Payment Method - `error` (ApiV2OrdersUserLimitGetResponsesContentApplicationJsonSchemaError, required) ### 401 Unauthorized Error 401 - Unauthorized - `error` (ApiV2OrdersUserLimitGetResponsesContentApplicationJsonSchemaError, required) ### 404 Not Found Error 404 - User Not Found - `error` (ApiV2OrdersUserLimitGetResponsesContentApplicationJsonSchemaError, required) ### 500 Internal Server Error 500 - Internal Server Error - `error` (ApiV2OrdersUserLimitGetResponsesContentApplicationJsonSchemaError, required) ## Types ### ApiV2OrdersUserLimitGetResponsesContentApplicationJsonSchemaData - `limits` (ApiV2OrdersUserLimitGetResponsesContentApplicationJsonSchemaDataLimits, required) - `spent` (ApiV2OrdersUserLimitGetResponsesContentApplicationJsonSchemaDataSpent, required) - `remaining` (ApiV2OrdersUserLimitGetResponsesContentApplicationJsonSchemaDataRemaining, required) - `exceeded` (ApiV2OrdersUserLimitGetResponsesContentApplicationJsonSchemaDataExceeded, required) - `shortage` (ApiV2OrdersUserLimitGetResponsesContentApplicationJsonSchemaDataShortage, required) ### ApiV2OrdersUserLimitGetResponsesContentApplicationJsonSchemaError - `statusCode` (integer, required) - `message` (string, required) ### ApiV2OrdersUserLimitGetResponsesContentApplicationJsonSchemaDataLimits - `1` (double, required) - `30` (double, required) - `365` (double, required) ### ApiV2OrdersUserLimitGetResponsesContentApplicationJsonSchemaDataSpent - `1` (integer, required) - `30` (integer, required) - `365` (integer, required) ### ApiV2OrdersUserLimitGetResponsesContentApplicationJsonSchemaDataRemaining - `1` (double, required) - `30` (double, required) - `365` (double, required) ### ApiV2OrdersUserLimitGetResponsesContentApplicationJsonSchemaDataExceeded - `1` (boolean, required) - `30` (boolean, required) - `365` (boolean, required) ### ApiV2OrdersUserLimitGetResponsesContentApplicationJsonSchemaDataShortage ## Examples **Response** ```json { "data": { "limits": { "1": 519.6, "30": 1298.99, "365": 2597.98 }, "spent": { "1": 0, "30": 0, "365": 0 }, "remaining": { "1": 519.6, "30": 1298.99, "365": 2597.98 }, "exceeded": { "1": false, "30": false, "365": false }, "shortage": {} } } ``` **SDK Code** ```python Success User Limits import requests url = "https://api-gateway-stg.transak.com/api/v2/orders/user-limit" querystring = {"fiatCurrency":"","isBuyOrSell":"BUY","kycType":"","paymentCategory":""} headers = { "x-api-key": "", "x-user-ip": "" } response = requests.get(url, headers=headers, params=querystring) print(response.json()) ``` ```javascript Success User Limits const url = 'https://api-gateway-stg.transak.com/api/v2/orders/user-limit?fiatCurrency=&isBuyOrSell=BUY&kycType=&paymentCategory='; const options = {method: 'GET', headers: {'x-api-key': '', 'x-user-ip': ''}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Success User Limits package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api-gateway-stg.transak.com/api/v2/orders/user-limit?fiatCurrency=&isBuyOrSell=BUY&kycType=&paymentCategory=" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("x-api-key", "") req.Header.Add("x-user-ip", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Success User Limits require 'uri' require 'net/http' url = URI("https://api-gateway-stg.transak.com/api/v2/orders/user-limit?fiatCurrency=&isBuyOrSell=BUY&kycType=&paymentCategory=") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["x-api-key"] = '' request["x-user-ip"] = '' response = http.request(request) puts response.read_body ``` ```java Success User Limits import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api-gateway-stg.transak.com/api/v2/orders/user-limit?fiatCurrency=&isBuyOrSell=BUY&kycType=&paymentCategory=") .header("x-api-key", "") .header("x-user-ip", "") .asString(); ``` ```php Success User Limits request('GET', 'https://api-gateway-stg.transak.com/api/v2/orders/user-limit?fiatCurrency=&isBuyOrSell=BUY&kycType=&paymentCategory=', [ 'headers' => [ 'x-api-key' => '', 'x-user-ip' => '', ], ]); echo $response->getBody(); ``` ```csharp Success User Limits using RestSharp; var client = new RestClient("https://api-gateway-stg.transak.com/api/v2/orders/user-limit?fiatCurrency=&isBuyOrSell=BUY&kycType=&paymentCategory="); var request = new RestRequest(Method.GET); request.AddHeader("x-api-key", ""); request.AddHeader("x-user-ip", ""); IRestResponse response = client.Execute(request); ``` ```swift Success User Limits import Foundation let headers = [ "x-api-key": "", "x-user-ip": "" ] let request = NSMutableURLRequest(url: NSURL(string: "https://api-gateway-stg.transak.com/api/v2/orders/user-limit?fiatCurrency=&isBuyOrSell=BUY&kycType=&paymentCategory=")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```