Deposit into strategy
curl --request POST \
--url https://tars.loopscale.com/v1/markets/strategy/deposit \
--header 'Content-Type: application/json' \
--header 'User-Wallet: <user-wallet>' \
--data '
{
"strategy": "<string>",
"amount": 123
}
'import requests
url = "https://tars.loopscale.com/v1/markets/strategy/deposit"
payload = {
"strategy": "<string>",
"amount": 123
}
headers = {
"User-Wallet": "<user-wallet>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'User-Wallet': '<user-wallet>', 'Content-Type': 'application/json'},
body: JSON.stringify({strategy: '<string>', amount: 123})
};
fetch('https://tars.loopscale.com/v1/markets/strategy/deposit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://tars.loopscale.com/v1/markets/strategy/deposit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'strategy' => '<string>',
'amount' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"User-Wallet: <user-wallet>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://tars.loopscale.com/v1/markets/strategy/deposit"
payload := strings.NewReader("{\n \"strategy\": \"<string>\",\n \"amount\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("User-Wallet", "<user-wallet>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://tars.loopscale.com/v1/markets/strategy/deposit")
.header("User-Wallet", "<user-wallet>")
.header("Content-Type", "application/json")
.body("{\n \"strategy\": \"<string>\",\n \"amount\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tars.loopscale.com/v1/markets/strategy/deposit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["User-Wallet"] = '<user-wallet>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"strategy\": \"<string>\",\n \"amount\": 123\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"signatures": [
{
"publicKey": "<string>",
"signature": "<string>"
}
]
}"Invalid strategy address""Failed to deserialize the JSON body into the target type."Strategy
Deposit into strategy
Deposits additional principal into an existing lending strategy.
POST
/
markets
/
strategy
/
deposit
Deposit into strategy
curl --request POST \
--url https://tars.loopscale.com/v1/markets/strategy/deposit \
--header 'Content-Type: application/json' \
--header 'User-Wallet: <user-wallet>' \
--data '
{
"strategy": "<string>",
"amount": 123
}
'import requests
url = "https://tars.loopscale.com/v1/markets/strategy/deposit"
payload = {
"strategy": "<string>",
"amount": 123
}
headers = {
"User-Wallet": "<user-wallet>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'User-Wallet': '<user-wallet>', 'Content-Type': 'application/json'},
body: JSON.stringify({strategy: '<string>', amount: 123})
};
fetch('https://tars.loopscale.com/v1/markets/strategy/deposit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://tars.loopscale.com/v1/markets/strategy/deposit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'strategy' => '<string>',
'amount' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"User-Wallet: <user-wallet>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://tars.loopscale.com/v1/markets/strategy/deposit"
payload := strings.NewReader("{\n \"strategy\": \"<string>\",\n \"amount\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("User-Wallet", "<user-wallet>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://tars.loopscale.com/v1/markets/strategy/deposit")
.header("User-Wallet", "<user-wallet>")
.header("Content-Type", "application/json")
.body("{\n \"strategy\": \"<string>\",\n \"amount\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tars.loopscale.com/v1/markets/strategy/deposit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["User-Wallet"] = '<user-wallet>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"strategy\": \"<string>\",\n \"amount\": 123\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"signatures": [
{
"publicKey": "<string>",
"signature": "<string>"
}
]
}"Invalid strategy address""Failed to deserialize the JSON body into the target type."Headers
Wallet address of the lender depositing into the strategy.
Optional fee payer. Defaults to the User-Wallet address when omitted.
Body
application/json
⌘I