# Pointing a SportsGameOdds client at SockOdds
URL: https://sockodds.com/docs/info/migrating-from-sgo/

# Pointing a SportsGameOdds client at SockOdds [#pointing-a-sportsgameodds-client-at-sockodds]

SockOdds is the Australian extension of the SportsGameOdds v2 schema, so an existing SGO integration needs one change: the base URL.

1. Change the base URL to `https://api.sockodds.com/v2` and the key to an SockOdds key.
2. Keep your parsing: `eventID`, `odds[oddID]`, `byBookmaker`, `opposingOddID`, `status`, the envelope — all unchanged.
3. Expect the `leagueID`s SGO doesn't carry (`AFL`, `AFLW`, `NRL`, `RUGBYLEAGUE_NRLW`, `RUGBYLEAGUE_STATE_ORIGIN`, `RUGBYUNION_INTERNATIONALS`, `IPL`) and Australian `bookmakerID`s (`sportsbet`, `unibet`, `tab`, `playup`, `tabtouch`, `betright`, …).
4. Replace any stream subscription with polling every ~2 minutes (`/stream/events` answers 501).
5. Read the extra signals: `decimal` on every book, `info.stale`, `notice`.

## SDK [#sdk]

**TypeScript** · **Python** · **Ruby** · **Go** · **Java**

```typescript
import SportsGameOdds from "sports-odds-api";

const client = new SportsGameOdds({ apiKeyHeader: "YOUR_API_KEY", baseURL: "https://api.sockodds.com/v2" });
const res = await client.events.get({ leagueID: ["AFL"] });
console.log(res.data);
```

```python
from sports_odds_api import SportsGameOdds

client = SportsGameOdds(api_key_header="YOUR_API_KEY", base_url="https://api.sockodds.com/v2")
res = client.events.get({ league_id: ["afl"] })
print(res.data)
```

```ruby
require "sports_odds_api"

client = SportsOddsAPI::Client.new(api_key_header: "YOUR_API_KEY", base_url: "https://api.sockodds.com/v2")
res = client.events.get({ league_id: ["afl"] })
puts res.data
```

```go
client := sportsoddsapi.NewClient(option.WithAPIKeyHeader("YOUR_API_KEY"), option.WithBaseURL("https://api.sockodds.com/v2"))
res, err := client.Events.Get({ leagueID: ["AFL"] })
if err != nil { log.Fatal(err) }
fmt.Println(res.Data)
```

```java
SportsGameOddsClient client = SportsGameOddsOkHttpClient.builder()
    .apiKeyHeader("YOUR_API_KEY").baseUrl("https://api.sockodds.com/v2").build();
var res = client.events.get({ leagueID: ["AFL"] });
System.out.println(res.items());
```

## Differences at a glance [#differences-at-a-glance]

|  | SockOdds | SportsGameOdds |
| --- | --- | --- |
| Base URL | `https://api.sockodds.com/v2` | `https://api.sportsgameodds.com/v2` |
| Key prefix | `so_live_…` | — |
| Bookmakers | 25, 21 Australian | 85+, US/EU |
| Australian codes | AFL, AFLW, NRL, NRLW, State of Origin, rugby union, IPL | Not carried |
| Streaming | 501 | WebSocket on All-Star |
| Open/close odds | Not snapshotted | `includeOpenCloseOdds` |
| Extra fields | `decimal`, `info.stale`, `links.betslip` | — |
| Shape | Identical | Identical |

Using both feeds for two markets is common: join on `eventID` and `oddID`.

> Need help?[FAQ](https://sockodds.com/docs/faq/) · [Email](mailto:api@sockodds.com) · [Contact](https://sockodds.com/contact-us/)
