nautilus_polymarket/common/urls.rs
1// -------------------------------------------------------------------------------------------------
2// Copyright (C) 2015-2026 Nautech Systems Pty Ltd. All rights reserved.
3// https://nautechsystems.io
4//
5// Licensed under the GNU Lesser General Public License Version 3.0 (the "License");
6// You may not use this file except in compliance with the License.
7// You may obtain a copy of the License at https://www.gnu.org/licenses/lgpl-3.0.en.html
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14// -------------------------------------------------------------------------------------------------
15
16//! URL resolution for the Polymarket API endpoints.
17
18const CLOB_HTTP_URL: &str = "https://clob.polymarket.com";
19const CLOB_WS_URL: &str = "wss://ws-subscriptions-clob.polymarket.com/ws";
20const CLOB_WS_MARKET_URL: &str = "wss://ws-subscriptions-clob.polymarket.com/ws/market";
21const CLOB_WS_USER_URL: &str = "wss://ws-subscriptions-clob.polymarket.com/ws/user";
22const GAMMA_API_URL: &str = "https://gamma-api.polymarket.com";
23
24#[must_use]
25pub const fn clob_http_url() -> &'static str {
26 CLOB_HTTP_URL
27}
28
29#[must_use]
30pub const fn clob_ws_url() -> &'static str {
31 CLOB_WS_URL
32}
33
34#[must_use]
35pub const fn clob_ws_market_url() -> &'static str {
36 CLOB_WS_MARKET_URL
37}
38
39#[must_use]
40pub const fn clob_ws_user_url() -> &'static str {
41 CLOB_WS_USER_URL
42}
43
44#[must_use]
45pub const fn gamma_api_url() -> &'static str {
46 GAMMA_API_URL
47}