Auction Houses
Create Shop
API Enpoint:
POST http://localhost:7292/dstapi/DSTV1/SaveDecShop
Request Params:
{
"Name": "Shop Name",
"DecShopURL": "tutorial-shop",
"Description": "My shop's description...",
"OwnerAddress": "Rabc123...",
"DecShopHostingType": 0,
"AutoUpdateNetworkDNS": true
}
Response:
{
"Success": true,
"Message": "Decentralized Auction Shop has been created with name Shop Name"
}
Code Example
- NodeJS
- Python
const createShop = async () => {
const payload = {
Name: "Shop Name",
DecShopURL: "tutorial-shop",
Description: "My shop's description...",
OwnerAddress: "xDnL4MCGtgHu85JJHdN1fkXinHzKaqVQ59",
DecShopHostingType: 0,
AutoUpdateNetworkDNS: true,
};
const url = `${CLI_BASE_URL}/dstapi/DSTV1/SaveDecShop`;
const request = await fetch(url, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(payload),
});
const data = await request.json();
return data["Success"];
};
def create_shop():
payload = {
"Name": "Shop Name",
"DecShopURL": "tutorial-shop",
"Description": "My shop's description...",
"OwnerAddress": "xDnL4MCGtgHu85JJHdN1fkXinHzKaqVQ59",
"DecShopHostingType": 0,
"AutoUpdateNetworkDNS": True
}
url = f"{CLI_BASE_URL}/dstapi/DSTV1/SaveDecShop"
headers = {"Content-Type": "application/json"}
response = await requests.post(url, json=payload, headers=headers)
data = await response.json()
return data["Success"]
Publish Shop to Network
API Enpoint:
GET http://localhost:7292/dstapi/DSTV1/GetPublishDecShop
Response:
{
"Success": true
}
Code Example
- NodeJS
- Python
const publishShop = async () => {
const url = `${CLI_BASE_URL}/dstapi/DSTV1/GetPublishDecShop`;
const request = await fetch(url);
const data = await request.json();
console.log(data);
return data["Success"];
};
def publish_shop():
url = f"{CLI_BASE_URL}/dstapi/DSTV1/GetPublishDecShop"
response = await requests.get(url)
data = await response.json()
print(data)
return data["Success"]
Get My Shop
API Enpoint:
GET http://localhost:7292/dstapi/DSTV1/GetDecShop
Response:
{
"Success": true,
"DecShop": {
...
}
}
Code Example
- NodeJS
- Python
const retrieveShop = async () => {
const url = `${CLI_BASE_URL}/dstapi/DSTV1/GetDecShop`;
const request = await fetch(url);
const data = await request.json();
if (data["Success"] == true) {
return data["DecShop"];
}
return null;
};
def retrieve_shop():
url = f"{CLI_BASE_URL}/dstapi/DSTV1/GetDecShop"
response = requests.get(url)
data = response.json()
if data["Success"] == True:
return data["DecShop"]
return None
Update Shop
API Enpoint:
POST http://localhost:7292/dstapi/DSTV1/SaveDecShop
Request Params:
{
"Name": "Updated Shop Name",
"DecShopURL": "tutorial-shop",
"Description": "My updated shop's description...",
"OwnerAddress": "xDnL4MCGtgHu85JJHdN1fkXinHzKaqVQ59",
"DecShopHostingType": 0,
"AutoUpdateNetworkDNS": true
}
Response:
{
"Success": true,
"DecShop": {
...
}
}
Toggle Offline/Online
API Enpoint:
GET http://localhost:7292/dstapi/DSTV1/GetSetShopStatus
Code Example
- NodeJS
- Python
const toggleShopOnline = async () => {
const url = `${CLI_BASE_URL}/dstapi/DSTV1/GetSetShopStatus`;
const request = await fetch(url);
const data = await request.json();
console.log(data);
if (data["Success"] == true) {
return data["Message"].replace("Is Offline? ", "") == "True";
}
return null;
};
def toggle_shop_online():
url = f"{CLI_BASE_URL}/dstapi/DSTV1/GetSetShopStatus"
response = requests.get(url)
data = response.json()
print(data)
if data["Success"] == True:
return data["Message"].replace("Is Offline? ", "") == "True"
return None
Delete Shop from Network
API Enpoint:
GET http://localhost:7292/dstapi/DSTV1/GetDeleteDecShop
Code Example
- NodeJS
- Python
const deleteNetworkShop = async () => {
const url = `${CLI_BASE_URL}/dstapi/DSTV1/GetDeleteDecShop`;
const request = await fetch(url);
const data = await request.json();
return data["Success"] == true;
};
def delete_network_shop():
url = f"{CLI_BASE_URL}/dstapi/DSTV1/GetDeleteDecShop"
response = requests.get(url)
data = response.json()
return data["Success"] == True
Delete Shop Locally
API Enpoint:
GET http://localhost:7292/dstapi/DSTV1/GetDeleteLocalDecShop
Code Example
- NodeJS
- Python
const deleteShop = async () => {
const url = `${CLI_BASE_URL}/dstapi/DSTV1/GetDeleteLocalDecShop`;
const request = await fetch(url);
const data = await request.json();
return data["Success"] == true;
};
def delete_shop():
url = f"{CLI_BASE_URL}/dstapi/DSTV1/GetDeleteLocalDecShop"
response = requests.get(url)
data = response.json()
return data["Success"] == True
Retrieve Network Shop
API Enpoint:
GET http://localhost:7292/dstapi/DSTV1/GetNetworkDecShopInfo/{url}
Code Example
- NodeJS
- Python
const retrieveNetworkShop = async (shopUrl) => {
const url = `${CLI_BASE_URL}/dstapi/DSTV1/GetNetworkDecShopInfo/${shopUrl}`;
const request = await fetch(url);
const data = await request.json();
if (data["Success"] == true) {
return data["DecShop"];
}
return null;
};
def retrieve_network_shop(shop_url):
url = f"{CLI_BASE_URL}/dstapi/DSTV1/GetNetworkDecShopInfo/{shop_url}"
response = requests.get(url)
data = response.json()
if data["Success"] == True:
return data["DecShop"]
return None
URL Params:
url
: URL of the shop (ie. rbx://tutorial-shop)
Response:
{
"Success": true,
"DecShop": {
...
}
}