前言
Dynadot是通过ICANN认证的域名注册商,自2002年成立以来,服务于全球108个国家和地区的客户,为数以万计的客户提供简洁,优惠,安全的域名注册以及管理服务。
Dynadot平台操作教程索引(包括域名邮箱,解析,建站,优惠长期更新)
Dynadot.com提供的API是专为效率而构建的高级域名管理和获取工具包。在Dynadot平台上,我们提供了50多个命令来设置,管理,注册和竞标域名。
在具体的功能API代码前,请阅读关于Dynadot的API使用须知。
使用Dynadot API,可以查看用户曾参与的已经结束的域名拍卖情况。
命令参数
如果发送对查看已结束域名拍卖的命令,则须包含下列参数:
获取已关闭拍卖请求参数 | 解释 |
startDate | 拍卖起始日期,yyyy-mm-dd,如2015-05-05 |
endDate | 拍卖结束日期,yyyy-mm-dd,如2015-05-05 |
currency (可选) | 您竞拍的货币,应为"usd", "eur", 或 "cny",,默认货币为美元 |
在成功发送查询已关闭的拍卖命令之后,返回的结果将以XML、CSV或是JSON格式的标签返回,其中XML的结果标签所代表含义由下图所示:
XML结果标签 | 解释 |
<GetClosedAuctionsResponse></GetClosedAuctionsResponse> | 获取已关闭拍卖响应标签,它是响应XML文档的根节点 |
<GetClosedAuctionsHeader></GetClosedAuctionsHeader> | 获取已关闭拍卖标题 |
<SuccessCode></SuccessCode> | 如果操作成功,"0"为成功,"-1"为失败 |
<Status></Status> | 请求状态 |
<Error></Error> | 请求错误信息,仅状态为"error"时使用 |
<GetClosedAuctionsContent></GetClosedAuctionsContent> | 获取已关闭拍卖内容标签,仅当状态为"success"时使用 |
<Auction></Auction> | 拍卖项目标签,仅状态为"success"时使用 |
<AuctionId></AuctionId> | 拍卖ID |
<Domain></Domain> | 拍卖的域名 |
<AuctionStatusId></AuctionStatusId> | 拍卖状态ID,“0”为进行中,“1”为被用户关闭,“2”为被管理员关闭,“3”为因续费关闭,“4”为由于超时关闭,“5”为因迁出关闭 |
<AuctionStatus></AuctionStatus> | 拍卖状态 |
<BidPrice></BidPrice> | 拍卖目前竞标价格 |
<BidPriceCurrency></BidPriceCurrency> | 竞拍价格货币 |
<Bids></Bids> | 竞拍出价次数 |
<AuctionWonStatus></AuctionWonStatus>如 | 果用户在拍卖中胜出 |
<YourHighBid></YourHighBid> | 您对该竞拍的高出价 |
<YourProxyBid></YourProxyBid> | 对此拍卖的代理竞拍出价 |
示例
此处,查看从2000年1月2日至2015年5月15日用户曾经参与过的已结束拍卖。
将高级域API请求发送到以下URL:https://api.dynadot.com/api3.xml。
Request (XML format)
https://api.dynadot.com/api3.xml?key=[API Key]&command=get_closed_auctions&startDate=2000-01-02&endDate=2015-5-15
Response (XML format)
<?xml version="1.0" encoding="UTF-8"?>
<GetClosedAuctionsResponse>
<GetClosedAuctionsHeader>
<SuccessCode>0</SuccessCode>
<Status>success</Status>
</GetClosedAuctionsHeader>
<GetClosedAuctionsContent>
<Auction>
<AuctionId>2</AuctionId>
<Domain>testdomain1.test</Domain>
<AuctionStatusId>4</AuctionStatusId>
<AuctionStatus>Closed by Timeout</AuctionStatus>
<BidPrice>89.99</BidPrice>
<BidPriceCurrency>USD</BidPriceCurrency>
<Bids>1</Bids>
<AuctionWonStatus>won</AuctionWonStatus>
<YourHighBid>89.99</YourHighBid>
<YourProxyBid>1000.0</YourProxyBid>
</Auction>
<Auction>
<AuctionId>3</AuctionId>
<Domain>testdomain2.test</Domain>
<AuctionStatusId>4</AuctionStatusId>
<AuctionStatus>Closed by Timeout</AuctionStatus>
<BidPrice>28.99</BidPrice>
<BidPriceCurrency>USD</BidPriceCurrency>
<Bids>1</Bids>
<AuctionWonStatus>won</AuctionWonStatus>
<YourHighBid>28.99</YourHighBid>
<YourProxyBid>1000.0</YourProxyBid>
</Auction>
</GetClosedAuctionsContent>
</GetClosedAuctionsResponse>
Request (JSON format)
https://api.dynadot.com/api3.json?key=[API Key]&command=get_closed_auctions&startDate=2000-01-02&endDate=2015-5-15
Response (JSON format)
{
"GetClosedAuctionsResponse": {
"ResponseCode": 0,
"Status": "success",
"Auctions": [
{
"AuctionId": "2",
"Domain": "testdomain1.test",
"AuctionStatusId": "4",
"AuctionStatus": "Closed by Timeout",
"BidPrice": "89.99",
"BidPriceCurrency": "USD",
"Bids": "1",
"AuctionWonStatus": "won",
"YourHighBid": "89.99",
"YourProxyBid": "1000.0"
},
{
"AuctionId": "3",
"Domain": "testdomain2.test",
"AuctionStatusId": "4",
"AuctionStatus": "Closed by Timeout",
"BidPrice": "28.99",
"BidPriceCurrency": "USD",
"Bids": "1",
"AuctionWonStatus": "won",
"YourHighBid": "28.99",
"YourProxyBid": "1000.0"
}
]
}
}
Request
https://api.dynadot.com/api3.html?key=[API Key]&command=get_closed_auctions&startDate=2000-01-02&endDate=2015-5-15
Response
ok,success,AuctionId,Domain,AuctionStatusId,AuctionStatus,BidPrice,BidPriceCurrency,Bids,AuctionWonStatus,YourHighBid,YourProxyBid,2,testdomain1.test,4,Closed by Timeout,89.99,USD,1,won,89.99,1000.0,3,testdomain2.test,4,Closed by Timeout,28.99,USD,1,won,28.99,1000.0